rename application to GaiaDBInterface
This commit is contained in:
parent
2437eff8fc
commit
96148bac02
@ -3,4 +3,4 @@ from django.apps import AppConfig
|
||||
|
||||
class SampleAppConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'sample_app'
|
||||
name = 'GaiaDBInterface'
|
@ -9,7 +9,7 @@ import pandas as pd
|
||||
import django
|
||||
from asgiref.sync import sync_to_async
|
||||
from django.core.management.base import BaseCommand
|
||||
from sample_app.models import GaiaSource, CatalogFile
|
||||
from GaiaDBInterface.models import GaiaSource, CatalogFile
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
@ -1,5 +1,14 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## This is a prototype way to create models on the fly using pandas as the type parser.\n",
|
||||
"### It was phased out in favor of creating models manually to avoid any mistakes pandas could make. \n",
|
||||
"### However it is kept here for just in case."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
|
@ -31,7 +31,7 @@ ALLOWED_HOSTS = []
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'sample_app',
|
||||
'GaiaDBInterface',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
|
@ -1,48 +0,0 @@
|
||||
# Generated by Django 5.1.1 on 2024-09-10 11:15
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='CatalogFile',
|
||||
fields=[
|
||||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||||
('name', models.CharField(max_length=32)),
|
||||
('status', models.CharField(choices=[('PENDING', 'Pending'), ('IN_PROGRESS', 'In Progress'), ('INGESTED', 'Ingested'), ('INDEXED', 'Indexed')], default='PENDING', max_length=11)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='GaiaSource',
|
||||
fields=[
|
||||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||||
('solution_id', models.CharField(blank=True, default='', max_length=19)),
|
||||
('designation', models.CharField(blank=True, default='', max_length=30)),
|
||||
('source_id', models.CharField(blank=True, default='', max_length=19)),
|
||||
('ref_epoch', models.FloatField(default=0.0, null=True)),
|
||||
('ra', models.FloatField(default=0.0, null=True)),
|
||||
('ra_error', models.FloatField(default=0.0, null=True)),
|
||||
('dec', models.FloatField(default=0.0, null=True)),
|
||||
('dec_error', models.FloatField(default=0.0, null=True)),
|
||||
('parallax', models.FloatField(default=0.0, null=True)),
|
||||
('parallax_error', models.FloatField(default=0.0, null=True)),
|
||||
('pmra', models.FloatField(default=0.0, null=True)),
|
||||
('pmra_error', models.FloatField(default=0.0, null=True)),
|
||||
('pmdec', models.FloatField(default=0.0, null=True)),
|
||||
('pmdec_error', models.FloatField(default=0.0, null=True)),
|
||||
('phot_g_mean_mag', models.FloatField(default=0.0, null=True)),
|
||||
('phot_bp_mean_mag', models.FloatField(default=0.0, null=True)),
|
||||
('phot_rp_mean_mag', models.FloatField(default=0.0, null=True)),
|
||||
('catalog_file', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sources', to='sample_app.catalogfile')),
|
||||
],
|
||||
),
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user