Commit 7b3a0a8f5cd6676cc9347e8fcf10fe4f80224b99

Authored by Etienne Pallier
2 parents 1ff79f8d 509509a8
Exists in master and in 1 other branch dev

Merge branch 'master' of https://gitlab.irap.omp.eu/epallier/pyros.git

Conflicts:
	.project
	.pydevproject
.project
... ... @@ -12,7 +12,7 @@
12 12 </buildCommand>
13 13 </buildSpec>
14 14 <natures>
15   - <nature>org.python.pydev.django.djangoNature</nature>
16 15 <nature>org.python.pydev.pythonNature</nature>
  16 + <nature>org.python.pydev.django.djangoNature</nature>
17 17 </natures>
18 18 </projectDescription>
... ...
.pydevproject
... ... @@ -2,13 +2,4 @@
2 2 <?eclipse-pydev version="1.0"?><pydev_project>
3 3 <pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">venv_py35_pyros</pydev_property>
4 4 <pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 3.0</pydev_property>
5   -<pydev_variables_property name="org.python.pydev.PROJECT_VARIABLE_SUBSTITUTION">
6   -<key>DJANGO_MANAGE_LOCATION</key>
7   -<value>src/manage.py</value>
8   -<key>DJANGO_SETTINGS_MODULE</key>
9   -<value>pyros.settings</value>
10   -</pydev_variables_property>
11   -<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
12   -<path>/${PROJECT_DIR_NAME}/src</path>
13   -</pydev_pathproperty>
14 5 </pydev_project>
... ...
.pydevproject.bak 0 → 100644
... ... @@ -0,0 +1,26 @@
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<?eclipse-pydev version="1.0"?><pydev_project>
  3 +<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">venv_py35_pyros</pydev_property>
  4 +<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 3.0</pydev_property>
  5 +<<<<<<< HEAD
  6 +<pydev_variables_property name="org.python.pydev.PROJECT_VARIABLE_SUBSTITUTION">
  7 +<key>DJANGO_MANAGE_LOCATION</key>
  8 +<value>src/manage.py</value>
  9 +<key>DJANGO_SETTINGS_MODULE</key>
  10 +<value>pyros.settings</value>
  11 +</pydev_variables_property>
  12 +<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
  13 +<path>/${PROJECT_DIR_NAME}/src</path>
  14 +</pydev_pathproperty>
  15 +=======
  16 +<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
  17 +<path>/${PROJECT_DIR_NAME}/src</path>
  18 +</pydev_pathproperty>
  19 +<pydev_variables_property name="org.python.pydev.PROJECT_VARIABLE_SUBSTITUTION">
  20 +<key>DJANGO_MANAGE_LOCATION</key>
  21 +<value>src/manage.py</value>
  22 +<key>DJANGO_SETTINGS_MODULE</key>
  23 +<value>pyros.settings</value>
  24 +</pydev_variables_property>
  25 +>>>>>>> branch 'master' of https://gitlab.irap.omp.eu/epallier/pyros.git
  26 +</pydev_project>
... ...
classes_No_Name.dot 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +digraph "classes_No_Name" {
  2 +charset="utf-8"
  3 +rankdir=BT
  4 +}
... ...
src/classes_No_Name.dot 0 → 100644
... ... @@ -0,0 +1,55 @@
  1 +digraph "classes_No_Name" {
  2 +charset="utf-8"
  3 +rankdir=BT
  4 +"0" [label="{Album|created : DateTimeField\ldesc : TextField\ldetector : ForeignKey\lname : CharField\lsequence : ForeignKey\lupdated : DateTimeField\l|}", shape="record"];
  5 +"1" [label="{Alert|burst_dec : CharField\lburst_jd : CharField\lburst_ra : CharField\lclient : CharField\ldef_not_grb : IntegerField\leditor : CharField\lequinox : CharField\lflag : CharField\lgrb_error : CharField\lidgcn_notice : IntegerField\ljd_pkt : IntegerField\ljd_received : IntegerField\ljd_send : IntegerField\lrequest : ForeignKey\lstrategyobs : ForeignKey\ltrigger_instrum : CharField\ltrigger_num : CharField\ltype : CharField\lvoevent_xml : TextField\l|}", shape="record"];
  6 +"2" [label="{Country|desc : TextField\lname : CharField\lquota : FloatField\l|}", shape="record"];
  7 +"3" [label="{Detector|acq_start : DateTimeField\lacq_stop : DateTimeField\lcheck_temp : FloatField\ldevice : ForeignKey\lequivalent_foc_len : CharField\lgain : FloatField\lhas_shutter : IntegerField\lidcam_readout_mode : IntegerField\lnb_photo_x : IntegerField\lnb_photo_y : IntegerField\lphoto_size_x : IntegerField\lphoto_size_y : IntegerField\lreadout_noise : FloatField\lreadout_time : FloatField\lstatus : CharField\ltelescope : ForeignKey\l|}", shape="record"];
  8 +"4" [label="{Device|created : DateTimeField\ldesc : TextField\lis_online : IntegerField\lmaintenance_date : DateTimeField\lname : CharField\lstatus : CharField\lupdated : DateTimeField\l|}", shape="record"];
  9 +"5" [label="{Filter|category : CharField\ldetector : ForeignKey\ldevice : ForeignKey\ltransmission_curve_doc : CharField\l|}", shape="record"];
  10 +"6" [label="{Image|created : DateTimeField\ldate_from_gps : CharField\ldesc : TextField\ldwn : CharField\ldwncata : CharField\ldwnimg : CharField\lexposure : CharField\lflaggps : CharField\lhumidext : CharField\llevel : IntegerField\llevel0_fits_name : CharField\llevel1a_fits_name : CharField\llevel1b_fits_name : CharField\lname : CharField\lnrtanalysis : ForeignKey\lplan : ForeignKey\lpressure : CharField\lquality : CharField\ltempext : CharField\ltype : CharField\lupdated : DateTimeField\lwind : CharField\lwind_dir : CharField\l|}", shape="record"];
  11 +"7" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  12 +"8" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  13 +"9" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  14 +"10" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  15 +"11" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  16 +"12" [label="{Meta|db_table : str\lmanaged : bool\lunique_together : tuple\l|}", shape="record"];
  17 +"13" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  18 +"14" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  19 +"15" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  20 +"16" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  21 +"17" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  22 +"18" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  23 +"19" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  24 +"20" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  25 +"21" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  26 +"22" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  27 +"23" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  28 +"24" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  29 +"25" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  30 +"26" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  31 +"27" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  32 +"28" [label="{Meta|db_table : str\lmanaged : bool\lunique_together : tuple\l|}", shape="record"];
  33 +"29" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  34 +"30" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  35 +"31" [label="{Meta|db_table : str\lmanaged : bool\l|}", shape="record"];
  36 +"32" [label="{Nrtanalysis|analysis : TextField\lcreated : DateTimeField\ldesc : TextField\lname : CharField\lupdated : DateTimeField\l|}", shape="record"];
  37 +"33" [label="{Plan|album : ForeignKey\lcreated : DateTimeField\ldesc : CharField\ldithering : IntegerField\lduration : FloatField\lexposure_time : FloatField\lfilter : ForeignKey\lname : CharField\lnb_images : IntegerField\lposition : CharField\lupdated : DateTimeField\l|}", shape="record"];
  38 +"34" [label="{PyrosappConfig|name : str\l|}", shape="record"];
  39 +"35" [label="{Request|autodeposit : IntegerField\lcheckpoint : CharField\lcreated : DateTimeField\ldesc : TextField\lflag : CharField\lis_alert : IntegerField\lname : CharField\lpriority : IntegerField\lscientificprogram : ForeignKey\lstatus : CharField\ltarget_or_theme : CharField\ltype : CharField\lupdated : DateTimeField\luser : ForeignKey\l|}", shape="record"];
  40 +"36" [label="{Schedule|created : DateTimeField\lday_start : DateTimeField\lday_stop : DateTimeField\lflag : CharField\l|}", shape="record"];
  41 +"37" [label="{ScheduleHasSequences|schedulehistory : ForeignKey\lsequence : ForeignKey\l|}", shape="record"];
  42 +"38" [label="{Schedulehistory|created : DateTimeField\lday_start : DateTimeField\lday_stop : DateTimeField\lflag : CharField\l|}", shape="record"];
  43 +"39" [label="{Scientificprogram|desc : TextField\lname : CharField\lpriority : IntegerField\lquota : FloatField\l|}", shape="record"];
  44 +"40" [label="{Sequence|alt_min : IntegerField\lanalysis_method : CharField\lcreated : DateTimeField\ldesc : TextField\lduration : FloatField\lexec_start : DateTimeField\lexec_stop : DateTimeField\lflag : CharField\limg_current : CharField\limg_total : CharField\lis_alert : IntegerField\lmoon_min : IntegerField\lname : CharField\lnot_obs : IntegerField\lobsolete : IntegerField\lpointing : CharField\lpriority : IntegerField\lprocessing : IntegerField\lrequest : ForeignKey\lschedule : ForeignKey\lsequencetype : ForeignKey\lstatus : CharField\ltype : CharField\lupdated : DateTimeField\lwith_drift : IntegerField\l|}", shape="record"];
  45 +"41" [label="{Sequencetype|desc : TextField\lname : CharField\lpriority : IntegerField\l|}", shape="record"];
  46 +"42" [label="{Sitewatch|dome : CharField\ldoors : CharField\llights : CharField\ltemperature : FloatField\lupdated : DateTimeField\l|}", shape="record"];
  47 +"43" [label="{Sitewatchhistory|id : IntegerField\l|}", shape="record"];
  48 +"44" [label="{Strategyobs|desc : TextField\ljson_file : CharField\lname : CharField\l|}", shape="record"];
  49 +"45" [label="{Telescope|address : CharField\laltitude : FloatField\ldevice : ForeignKey\ldiameter : FloatField\lhorizon_def : FloatField\lhorizon_type : CharField\llatitude : FloatField\llim_dec_max : FloatField\llim_dec_min : FloatField\llim_ha_rise : FloatField\llim_ha_set : FloatField\llongitude : FloatField\lmount_type : CharField\lmpc_code : CharField\lnight_elev_sun : FloatField\lreadout_time : IntegerField\lsens : CharField\lslew_dead : IntegerField\lslew_rate_max : FloatField\lslew_time : IntegerField\lstatus : CharField\l|}", shape="record"];
  50 +"46" [label="{User|acqvalid_beg : CharField\lacqvalid_end : CharField\laddress : CharField\lcan_del_void_req : IntegerField\lcountry : ForeignKey\lcreated : DateTimeField\lcur_connect : DateTimeField\ldesc : TextField\ldir_level : IntegerField\lemail : CharField\lfirstname : CharField\llast_connect : DateTimeField\llogin : CharField\lname : CharField\lp_priority : IntegerField\lpass_field : CharField\lputvalid_beg : DateTimeField\lputvalid_end : DateTimeField\lquota : FloatField\lquota_rea : FloatField\ltel1 : CharField\ltel2 : CharField\lu_priority : IntegerField\lupdated : DateTimeField\lurl : CharField\luserlevel : ForeignKey\l|}", shape="record"];
  51 +"47" [label="{UserHasScientificprograms|scientificprogram : ForeignKey\luser : ForeignKey\l|}", shape="record"];
  52 +"48" [label="{Userlevel|desc : TextField\lname : CharField\lpriority : IntegerField\lquota : FloatField\l|}", shape="record"];
  53 +"49" [label="{Weatherwatch|dwn : CharField\lhumid_ext : FloatField\lhumid_int : FloatField\lpressure : FloatField\lrain : FloatField\ltemp_ext : FloatField\ltemp_int : FloatField\lupdated : DateTimeField\lwind : FloatField\lwind_dir : CharField\l|}", shape="record"];
  54 +"50" [label="{Weatherwatchhistory|datetime : DateTimeField\ldwn : CharField\lhumid_ext : CharField\lhumid_int : CharField\lpressure : CharField\lrain : CharField\ltemp_ext : CharField\ltemp_int : CharField\lwind : CharField\lwind_dir : CharField\l|}", shape="record"];
  55 +}
... ...
src/classes_No_Name.png 0 → 100644

3.75 KB

src/packages_No_Name.dot 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +digraph "packages_No_Name" {
  2 +charset="utf-8"
  3 +rankdir=BT
  4 +"0" [label="pyrosapp", shape="box"];
  5 +"1" [label="pyrosapp.admin", shape="box"];
  6 +"2" [label="pyrosapp.apps", shape="box"];
  7 +"3" [label="pyrosapp.migrations", shape="box"];
  8 +"4" [label="pyrosapp.models_ORIG", shape="box"];
  9 +"5" [label="pyrosapp.tests", shape="box"];
  10 +"6" [label="pyrosapp.views", shape="box"];
  11 +}
... ...
src/packages_No_Name.png 0 → 100644

7.33 KB

src/pyros/__init__.pyc 0 → 100644
No preview for this file type
src/pyros/settings.pyc 0 → 100644
No preview for this file type
src/pyrosapp/__init__.pyc 0 → 100644
No preview for this file type
src/pyrosapp/admin.py
  1 +from django import forms
1 2 from django.contrib import admin
  3 +from pyrosapp.models import *
2 4  
3   -# Register your models here.
  5 +# Many To Many interface adapter
  6 +
  7 +class UserAndSPInline(admin.TabularInline):
  8 + model = ScientificProgram.users.through
  9 +
  10 +class SequenceAndSHInline(admin.TabularInline):
  11 + model = ScheduleHistory.sequences.through
  12 +
  13 +class ScheduleHistoryAdmin(admin.ModelAdmin):
  14 + inlines = [
  15 + SequenceAndSHInline,
  16 + ]
  17 + exclude = ('sequences',)
  18 +
  19 +
  20 +# One To Many interface adapters
  21 +
  22 +class SequenceInline(admin.TabularInline):
  23 + model = Sequence
  24 + fields = ("name",)
  25 + show_change_link = True
  26 +
  27 +class RequestInline(admin.TabularInline):
  28 + model = Request
  29 + fields = ("name",)
  30 + show_change_link = True
  31 +
  32 +class AlbumInline(admin.TabularInline):
  33 + model = Album
  34 + fields = ("name",)
  35 + show_change_link = True
  36 +
  37 +class PlanInline(admin.TabularInline):
  38 + model = Plan
  39 + fields = ("name",)
  40 + show_change_link = True
  41 +
  42 +class ImageInline(admin.TabularInline):
  43 + model = Image
  44 + fields = ("name",)
  45 + show_change_link = True
  46 +
  47 +class DetectorInline(admin.TabularInline):
  48 + model = Detector
  49 + fields = ("name",)
  50 + show_change_link = True
  51 +
  52 +class UserInline(admin.TabularInline):
  53 + model = User
  54 + fields = ("name",)
  55 + show_change_link = True
  56 +
  57 +class FilterInline(admin.TabularInline):
  58 + model = Filter
  59 + fields = ("name",)
  60 + show_change_link = True
  61 +
  62 +class AlertInline(admin.TabularInline):
  63 + model = Alert
  64 + fields = ("request.name",)
  65 + show_change_link = True
  66 +
  67 +
  68 +
  69 +class RequestAdmin(admin.ModelAdmin):
  70 + inlines = [
  71 + SequenceInline,
  72 + ]
  73 +
  74 +class ScheduleAdmin(admin.ModelAdmin):
  75 + inlines = [
  76 + SequenceInline,
  77 + ]
  78 +
  79 +class SequenceAdmin(admin.ModelAdmin):
  80 + inlines = [
  81 + AlbumInline,
  82 + SequenceAndSHInline, # for M2M interface
  83 + ]
  84 +
  85 +class UserAdmin(admin.ModelAdmin):
  86 + inlines = [
  87 + RequestInline,
  88 + UserAndSPInline, # for M2M interface
  89 + ]
  90 +
  91 +class StrategyObsAdmin(admin.ModelAdmin):
  92 + inlines = [
  93 + AlertInline,
  94 + ]
  95 +
  96 +class ScientificProgramAdmin(admin.ModelAdmin):
  97 + inlines = [
  98 + RequestInline,
  99 + UserAndSPInline, # for M2M interface
  100 + ]
  101 + exclude = ('users',) # for M2M interface
  102 +
  103 +class CountryAdmin(admin.ModelAdmin):
  104 + inlines = [
  105 + UserInline,
  106 + ]
  107 +
  108 +class UserLevelAdmin(admin.ModelAdmin):
  109 + inlines = [
  110 + UserInline,
  111 + ]
  112 +
  113 +class FilterAdmin(admin.ModelAdmin):
  114 + inlines = [
  115 + PlanInline,
  116 + ]
  117 +
  118 +class NrtAnalysisAdmin(admin.ModelAdmin):
  119 + inlines = [
  120 + ImageInline,
  121 + ]
  122 +
  123 +class DetectorAdmin(admin.ModelAdmin):
  124 + inlines = [
  125 + FilterInline,
  126 + AlbumInline,
  127 + ]
  128 +
  129 +class TelescopeAdmin(admin.ModelAdmin):
  130 + inlines = [
  131 + DetectorInline,
  132 + ]
  133 +
  134 +class PlanAdmin(admin.ModelAdmin):
  135 + inlines = [
  136 + ImageInline,
  137 + ]
  138 +
  139 +class AlbumAdmin(admin.ModelAdmin):
  140 + inlines = [
  141 + PlanInline,
  142 + ]
  143 +
  144 +class SequenceTypeAdmin(admin.ModelAdmin):
  145 + inlines = [
  146 + SequenceInline,
  147 + ]
  148 +
  149 +
  150 +# Link the models to the admin interface
  151 +
  152 +admin.site.register(Album, AlbumAdmin)
  153 +admin.site.register(Alert)
  154 +admin.site.register(Country, CountryAdmin)
  155 +admin.site.register(Detector, DetectorAdmin)
  156 +admin.site.register(Device)
  157 +admin.site.register(Filter, FilterAdmin)
  158 +admin.site.register(Image)
  159 +admin.site.register(NrtAnalysis, NrtAnalysisAdmin)
  160 +admin.site.register(Plan, PlanAdmin)
  161 +admin.site.register(Request, RequestAdmin)
  162 +admin.site.register(Schedule, ScheduleAdmin)
  163 +admin.site.register(ScheduleHistory, ScheduleHistoryAdmin)
  164 +admin.site.register(ScientificProgram, ScientificProgramAdmin)
  165 +admin.site.register(Sequence, SequenceAdmin)
  166 +admin.site.register(SequenceType, SequenceTypeAdmin)
  167 +admin.site.register(SiteWatch)
  168 +admin.site.register(SiteWatchHistory)
  169 +admin.site.register(StrategyObs, StrategyObsAdmin)
  170 +admin.site.register(Telescope, TelescopeAdmin)
  171 +admin.site.register(User, UserAdmin)
  172 +admin.site.register(UserLevel, UserLevelAdmin)
  173 +admin.site.register(WeatherWatch)
  174 +admin.site.register(WeatherWatchHistory)
... ...
src/pyrosapp/models.py 0 → 100644
... ... @@ -0,0 +1,464 @@
  1 +# This is an auto-generated Django model module.
  2 +# You'll have to do the following manually to clean this up:
  3 +# * Rearrange models' order
  4 +# * Make sure each model has one field with primary_key=True
  5 +# * Make sure each ForeignKey has `on_delete` set to the desired behavior.
  6 +# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
  7 +# Feel free to rename the models, but don't rename db_table values or field names.
  8 +from __future__ import unicode_literals
  9 +
  10 +from django.db import models
  11 +
  12 +
  13 +class Album(models.Model):
  14 + sequence = models.ForeignKey('Sequence', models.CASCADE, related_name="albums")
  15 + detector = models.ForeignKey('Detector', models.DO_NOTHING, related_name="albums")
  16 + name = models.CharField(max_length=45, blank=True, null=True)
  17 + desc = models.TextField(blank=True, null=True)
  18 + created = models.DateTimeField(blank=True, null=True)
  19 + updated = models.DateTimeField(blank=True, null=True)
  20 +
  21 + class Meta:
  22 + managed = True
  23 + db_table = 'album'
  24 +
  25 + def __str__(self):
  26 + return (str(self.name))
  27 +
  28 +
  29 +class Alert(models.Model):
  30 + request = models.OneToOneField('Request', models.CASCADE)
  31 + strategyobs = models.ForeignKey('StrategyObs', models.DO_NOTHING, related_name="alerts")
  32 + voevent_xml = models.TextField(blank=True, null=True)
  33 + type = models.CharField(max_length=45, blank=True, null=True)
  34 + client = models.CharField(max_length=45, blank=True, null=True)
  35 + burst_jd = models.CharField(max_length=45, blank=True, null=True)
  36 + burst_ra = models.CharField(max_length=45, blank=True, null=True)
  37 + burst_dec = models.CharField(max_length=45, blank=True, null=True)
  38 + equinox = models.CharField(max_length=45, blank=True, null=True)
  39 + jd_pkt = models.IntegerField(blank=True, null=True)
  40 + jd_send = models.IntegerField(blank=True, null=True)
  41 + jd_received = models.IntegerField(blank=True, null=True)
  42 + trigger_instrum = models.CharField(max_length=45, blank=True, null=True)
  43 + trigger_num = models.CharField(max_length=45, blank=True, null=True)
  44 + grb_error = models.CharField(max_length=45, blank=True, null=True)
  45 + def_not_grb = models.IntegerField(blank=True, null=True)
  46 + editor = models.CharField(max_length=45, blank=True, null=True)
  47 + flag = models.CharField(max_length=45, blank=True, null=True)
  48 + idgcn_notice = models.IntegerField(blank=True, null=True)
  49 +
  50 + class Meta:
  51 + managed = True
  52 + db_table = 'alert'
  53 +
  54 + def __str__(self):
  55 + return (self.request.name)
  56 +
  57 +
  58 +class Country(models.Model):
  59 + name = models.CharField(max_length=45, blank=True, null=True)
  60 + desc = models.TextField(blank=True, null=True)
  61 + quota = models.FloatField(blank=True, null=True)
  62 +
  63 + class Meta:
  64 + managed = True
  65 + db_table = 'country'
  66 +
  67 + def __str__(self):
  68 + return (str(self.name))
  69 +
  70 +
  71 +class Detector(models.Model):
  72 + device = models.OneToOneField('Device', models.CASCADE)
  73 + telescope = models.ForeignKey('Telescope', models.DO_NOTHING, related_name="detectors")
  74 + status = models.CharField(max_length=7, blank=True, null=True)
  75 + nb_photo_x = models.IntegerField(blank=True, null=True)
  76 + nb_photo_y = models.IntegerField(blank=True, null=True)
  77 + photo_size_x = models.IntegerField(blank=True, null=True)
  78 + photo_size_y = models.IntegerField(blank=True, null=True)
  79 + has_shutter = models.IntegerField(blank=True, null=True)
  80 + equivalent_foc_len = models.CharField(max_length=45, blank=True, null=True)
  81 + acq_start = models.DateTimeField(blank=True, null=True)
  82 + acq_stop = models.DateTimeField(blank=True, null=True)
  83 + check_temp = models.FloatField(blank=True, null=True)
  84 + gain = models.FloatField(blank=True, null=True)
  85 + readout_noise = models.FloatField(blank=True, null=True)
  86 + readout_time = models.FloatField(blank=True, null=True)
  87 + idcam_readout_mode = models.IntegerField(blank=True, null=True)
  88 +
  89 + class Meta:
  90 + managed = True
  91 + db_table = 'detector'
  92 +
  93 + def __str__(self):
  94 + return (self.device.name)
  95 +
  96 +class Device(models.Model):
  97 + name = models.CharField(max_length=45, blank=True, null=True)
  98 + desc = models.TextField(blank=True, null=True)
  99 + created = models.DateTimeField(blank=True, null=True)
  100 + updated = models.DateTimeField(blank=True, null=True)
  101 + is_online = models.IntegerField(blank=True, null=True)
  102 + status = models.CharField(max_length=11, blank=True, null=True)
  103 + maintenance_date = models.DateTimeField(blank=True, null=True)
  104 +
  105 + class Meta:
  106 + managed = True
  107 + db_table = 'device'
  108 +
  109 + def __str__(self):
  110 + return (str(self.name))
  111 +
  112 +class Filter(models.Model):
  113 + device = models.OneToOneField(Device, models.CASCADE)
  114 + detector = models.ForeignKey(Detector, models.DO_NOTHING, related_name="filters")
  115 + category = models.CharField(max_length=1, blank=True, null=True)
  116 + transmission_curve_doc = models.CharField(max_length=45, blank=True, null=True)
  117 +
  118 + class Meta:
  119 + managed = True
  120 + db_table = 'filter'
  121 +
  122 + def __str__(self):
  123 + return (self.device.name)
  124 +
  125 +
  126 +class Image(models.Model):
  127 + plan = models.ForeignKey('Plan', models.CASCADE, related_name="images")
  128 + nrtanalysis = models.ForeignKey('NrtAnalysis', models.DO_NOTHING, blank=True, null=True, related_name="images")
  129 + name = models.CharField(max_length=45, blank=True, null=True)
  130 + desc = models.TextField(blank=True, null=True)
  131 + created = models.DateTimeField(blank=True, null=True)
  132 + updated = models.DateTimeField(blank=True, null=True)
  133 + date_from_gps = models.CharField(max_length=45, blank=True, null=True)
  134 + level = models.IntegerField(blank=True, null=True)
  135 + type = models.CharField(max_length=5, blank=True, null=True)
  136 + quality = models.CharField(max_length=45, blank=True, null=True)
  137 + flaggps = models.CharField(max_length=45, blank=True, null=True)
  138 + exposure = models.CharField(max_length=45, blank=True, null=True)
  139 + tempext = models.CharField(max_length=45, blank=True, null=True)
  140 + pressure = models.CharField(max_length=45, blank=True, null=True)
  141 + humidext = models.CharField(max_length=45, blank=True, null=True)
  142 + wind = models.CharField(max_length=45, blank=True, null=True)
  143 + wind_dir = models.CharField(max_length=45, blank=True, null=True)
  144 + dwnimg = models.CharField(max_length=45, blank=True, null=True)
  145 + dwncata = models.CharField(max_length=45, blank=True, null=True)
  146 + dwn = models.CharField(max_length=45, blank=True, null=True)
  147 + level0_fits_name = models.CharField(max_length=45, blank=True, null=True)
  148 + level1a_fits_name = models.CharField(max_length=45, blank=True, null=True)
  149 + level1b_fits_name = models.CharField(max_length=45, blank=True, null=True)
  150 +
  151 + class Meta:
  152 + managed = True
  153 + db_table = 'image'
  154 +
  155 + def __str__(self):
  156 + return (str(self.name))
  157 +
  158 +
  159 +class NrtAnalysis(models.Model):
  160 + name = models.CharField(max_length=45, blank=True, null=True)
  161 + desc = models.TextField(blank=True, null=True)
  162 + created = models.DateTimeField(blank=True, null=True)
  163 + updated = models.DateTimeField(blank=True, null=True)
  164 + analysis = models.TextField(blank=True, null=True)
  165 +
  166 + class Meta:
  167 + managed = True
  168 + db_table = 'nrtanalysis'
  169 +
  170 + def __str__(self):
  171 + return (str(self.name))
  172 +
  173 +
  174 +class Plan(models.Model):
  175 + album = models.ForeignKey(Album, models.CASCADE, related_name="plans")
  176 + filter = models.ForeignKey(Filter, models.DO_NOTHING, related_name="plans")
  177 + name = models.CharField(max_length=45, blank=True, null=True)
  178 + desc = models.CharField(max_length=45, blank=True, null=True)
  179 + created = models.DateTimeField(blank=True, null=True)
  180 + updated = models.DateTimeField(blank=True, null=True)
  181 + duration = models.FloatField(blank=True, null=True)
  182 + position = models.CharField(max_length=45, blank=True, null=True)
  183 + exposure_time = models.FloatField(blank=True, null=True)
  184 + nb_images = models.IntegerField(blank=True, null=True)
  185 + dithering = models.IntegerField(blank=True, null=True)
  186 +
  187 + class Meta:
  188 + managed = True
  189 + db_table = 'plan'
  190 +
  191 + def __str__(self):
  192 + return (str(self.name))
  193 +
  194 +
  195 +class Request(models.Model):
  196 + user = models.ForeignKey('User', models.DO_NOTHING, related_name="requests")
  197 + scientificprogram = models.ForeignKey('ScientificProgram', models.DO_NOTHING, related_name="requests")
  198 + name = models.CharField(max_length=45, blank=True, null=True)
  199 + desc = models.TextField(blank=True, null=True)
  200 + created = models.DateTimeField(blank=True, null=True)
  201 + updated = models.DateTimeField(blank=True, null=True)
  202 + is_alert = models.IntegerField(blank=True, null=True)
  203 + type = models.CharField(max_length=8, blank=True, null=True)
  204 + status = models.CharField(max_length=10, blank=True, null=True)
  205 + target_or_theme = models.CharField(max_length=45, blank=True, null=True)
  206 + priority = models.IntegerField(blank=True, null=True)
  207 + autodeposit = models.IntegerField(blank=True, null=True)
  208 + checkpoint = models.CharField(max_length=45, blank=True, null=True)
  209 + flag = models.CharField(max_length=45, blank=True, null=True)
  210 +
  211 + class Meta:
  212 + managed = True
  213 + db_table = 'request'
  214 +
  215 + def __str__(self):
  216 + return (str(self.name))
  217 +
  218 +
  219 +class Schedule(models.Model):
  220 + created = models.DateTimeField(blank=True, null=True)
  221 + day_start = models.DateTimeField(blank=True, null=True)
  222 + day_stop = models.DateTimeField(blank=True, null=True)
  223 + flag = models.CharField(max_length=45, blank=True, null=True)
  224 +
  225 + class Meta:
  226 + managed = True
  227 + db_table = 'schedule'
  228 +
  229 + def __str__(self):
  230 + return (str(self.created))
  231 +
  232 +
  233 +class ScheduleHistory(models.Model):
  234 + sequences = models.ManyToManyField('Sequence', related_name='schedulehistorys')
  235 + created = models.DateTimeField(blank=True, null=True)
  236 + day_start = models.DateTimeField(blank=True, null=True)
  237 + day_stop = models.DateTimeField(blank=True, null=True)
  238 + flag = models.CharField(max_length=45, blank=True, null=True)
  239 +
  240 + class Meta:
  241 + managed = True
  242 + db_table = 'schedulehistory'
  243 +
  244 + def __str__(self):
  245 + return (str(self.created))
  246 +
  247 +
  248 +class ScientificProgram(models.Model):
  249 + users = models.ManyToManyField('User', related_name="scientificprograms")
  250 + name = models.CharField(max_length=45, blank=True, null=True)
  251 + desc = models.TextField(blank=True, null=True)
  252 + quota = models.FloatField(blank=True, null=True)
  253 + priority = models.IntegerField(blank=True, null=True)
  254 +
  255 + class Meta:
  256 + managed = True
  257 + db_table = 'scientificprogram'
  258 +
  259 + def __str__(self):
  260 + return (str(self.name))
  261 +
  262 +class Sequence(models.Model):
  263 + request = models.ForeignKey(Request, models.CASCADE, related_name="sequences")
  264 + sequencetype = models.ForeignKey('SequenceType', models.DO_NOTHING, related_name="sequences")
  265 + schedule = models.ForeignKey(Schedule, models.DO_NOTHING, related_name="sequences")
  266 + name = models.CharField(max_length=45, blank=True, null=True)
  267 + desc = models.TextField(blank=True, null=True)
  268 + created = models.DateTimeField(blank=True, null=True)
  269 + updated = models.DateTimeField(blank=True, null=True)
  270 + is_alert = models.IntegerField(blank=True, null=True)
  271 + status = models.CharField(max_length=11, blank=True, null=True)
  272 + duration = models.FloatField(blank=True, null=True)
  273 + pointing = models.CharField(max_length=45, blank=True, null=True)
  274 + with_drift = models.IntegerField(blank=True, null=True)
  275 + priority = models.IntegerField(blank=True, null=True)
  276 + analysis_method = models.CharField(max_length=45, blank=True, null=True)
  277 + exec_start = models.DateTimeField()
  278 + exec_stop = models.DateTimeField(blank=True, null=True)
  279 + moon_min = models.IntegerField(blank=True, null=True)
  280 + alt_min = models.IntegerField(blank=True, null=True)
  281 + type = models.CharField(max_length=6, blank=True, null=True)
  282 + img_current = models.CharField(max_length=45, blank=True, null=True)
  283 + img_total = models.CharField(max_length=45, blank=True, null=True)
  284 + not_obs = models.IntegerField(blank=True, null=True)
  285 + obsolete = models.IntegerField(blank=True, null=True)
  286 + processing = models.IntegerField(blank=True, null=True)
  287 + flag = models.CharField(max_length=45, blank=True, null=True)
  288 +
  289 + class Meta:
  290 + managed = True
  291 + db_table = 'sequence'
  292 +
  293 + def __str__(self):
  294 + return (str(self.name))
  295 +
  296 +
  297 +class SequenceType(models.Model):
  298 + name = models.CharField(max_length=45, blank=True, null=True)
  299 + desc = models.TextField(blank=True, null=True)
  300 + priority = models.IntegerField(blank=True, null=True)
  301 +
  302 + class Meta:
  303 + managed = True
  304 + db_table = 'sequencetype'
  305 +
  306 + def __str__(self):
  307 + return (str(self.name))
  308 +
  309 +
  310 +class SiteWatch(models.Model):
  311 + updated = models.DateTimeField(blank=True, null=True)
  312 + lights = models.CharField(max_length=45, blank=True, null=True)
  313 + dome = models.CharField(max_length=45, blank=True, null=True)
  314 + doors = models.CharField(max_length=45, blank=True, null=True)
  315 + temperature = models.FloatField(blank=True, null=True)
  316 +
  317 + class Meta:
  318 + managed = True
  319 + db_table = 'sitewatch'
  320 +
  321 + def __str__(self):
  322 + return (str(self.updated))
  323 +
  324 +
  325 +class SiteWatchHistory(models.Model):
  326 + id = models.IntegerField(primary_key=True)
  327 +
  328 + class Meta:
  329 + managed = True
  330 + db_table = 'sitewatchhistory'
  331 +
  332 +
  333 +class StrategyObs(models.Model):
  334 + name = models.CharField(max_length=45, blank=True, null=True)
  335 + desc = models.TextField(blank=True, null=True)
  336 + json_file = models.CharField(max_length=45, blank=True, null=True)
  337 +
  338 + class Meta:
  339 + managed = True
  340 + db_table = 'strategyobs'
  341 +
  342 + def __str__(self):
  343 + return (str(self.name))
  344 +
  345 +
  346 +class Telescope(models.Model):
  347 + device = models.OneToOneField(Device, models.CASCADE)
  348 + mount_type = models.CharField(max_length=9, blank=True, null=True)
  349 + diameter = models.FloatField(blank=True, null=True)
  350 + status = models.CharField(max_length=45, blank=True, null=True)
  351 + latitude = models.FloatField(blank=True, null=True)
  352 + longitude = models.FloatField(blank=True, null=True)
  353 + sens = models.CharField(max_length=1, blank=True, null=True)
  354 + altitude = models.FloatField(blank=True, null=True)
  355 + readout_time = models.IntegerField(blank=True, null=True)
  356 + slew_time = models.IntegerField(blank=True, null=True)
  357 + slew_dead = models.IntegerField(blank=True, null=True)
  358 + slew_rate_max = models.FloatField(blank=True, null=True)
  359 + horizon_type = models.CharField(max_length=45, blank=True, null=True)
  360 + horizon_def = models.FloatField(blank=True, null=True)
  361 + lim_dec_max = models.FloatField(blank=True, null=True)
  362 + lim_dec_min = models.FloatField(blank=True, null=True)
  363 + lim_ha_rise = models.FloatField(blank=True, null=True)
  364 + lim_ha_set = models.FloatField(blank=True, null=True)
  365 + address = models.CharField(max_length=45, blank=True, null=True)
  366 + night_elev_sun = models.FloatField(blank=True, null=True)
  367 + mpc_code = models.CharField(max_length=45, blank=True, null=True)
  368 +
  369 + class Meta:
  370 + managed = True
  371 + db_table = 'telescope'
  372 +
  373 + def __str__(self):
  374 + return (self.device.name)
  375 +
  376 +
  377 +class User(models.Model):
  378 + country = models.ForeignKey(Country, models.DO_NOTHING, related_name="users")
  379 + userlevel = models.ForeignKey('UserLevel', models.DO_NOTHING, related_name="users")
  380 + name = models.CharField(max_length=45, blank=True, null=True)
  381 + desc = models.TextField(blank=True, null=True)
  382 + created = models.DateTimeField(blank=True, null=True)
  383 + updated = models.DateTimeField(blank=True, null=True)
  384 + firstname = models.CharField(max_length=45, blank=True, null=True)
  385 + email = models.CharField(max_length=45, blank=True, null=True)
  386 + url = models.CharField(max_length=45, blank=True, null=True)
  387 + tel1 = models.CharField(max_length=45, blank=True, null=True)
  388 + tel2 = models.CharField(max_length=45, blank=True, null=True)
  389 + address = models.CharField(max_length=45, blank=True, null=True)
  390 + login = models.CharField(max_length=15, blank=True, null=True)
  391 + pass_field = models.CharField(db_column='pass', max_length=45, blank=True, null=True) # Field renamed because it was a Python reserved word.
  392 + last_connect = models.DateTimeField(blank=True, null=True)
  393 + cur_connect = models.DateTimeField(blank=True, null=True)
  394 + putvalid_beg = models.DateTimeField(blank=True, null=True)
  395 + putvalid_end = models.DateTimeField(blank=True, null=True)
  396 + acqvalid_beg = models.CharField(max_length=45, blank=True, null=True)
  397 + acqvalid_end = models.CharField(max_length=45, blank=True, null=True)
  398 + quota = models.FloatField(blank=True, null=True)
  399 + quota_rea = models.FloatField(blank=True, null=True)
  400 + u_priority = models.IntegerField(blank=True, null=True)
  401 + p_priority = models.IntegerField(blank=True, null=True)
  402 + dir_level = models.IntegerField(blank=True, null=True)
  403 + can_del_void_req = models.IntegerField(blank=True, null=True)
  404 +
  405 + class Meta:
  406 + managed = True
  407 + db_table = 'user'
  408 +
  409 + def __str__(self):
  410 + return (str(self.name))
  411 +
  412 +
  413 +class UserLevel(models.Model):
  414 + name = models.CharField(max_length=45, blank=True, null=True)
  415 + desc = models.TextField(blank=True, null=True)
  416 + priority = models.IntegerField(blank=True, null=True)
  417 + quota = models.FloatField(blank=True, null=True)
  418 +
  419 + class Meta:
  420 + managed = True
  421 + db_table = 'userlevel'
  422 +
  423 + def __str__(self):
  424 + return (str(self.name))
  425 +
  426 +
  427 +class WeatherWatch(models.Model):
  428 + updated = models.DateTimeField(blank=True, null=True)
  429 + humid_int = models.FloatField(blank=True, null=True)
  430 + humid_ext = models.FloatField(blank=True, null=True)
  431 + wind = models.FloatField(blank=True, null=True)
  432 + wind_dir = models.CharField(max_length=1, blank=True, null=True)
  433 + temp_int = models.FloatField(blank=True, null=True)
  434 + temp_ext = models.FloatField(blank=True, null=True)
  435 + pressure = models.FloatField(blank=True, null=True)
  436 + rain = models.FloatField(blank=True, null=True)
  437 + dwn = models.CharField(max_length=45, blank=True, null=True)
  438 +
  439 + class Meta:
  440 + managed = True
  441 + db_table = 'weatherwatch'
  442 +
  443 + def __str__(self):
  444 + return (str(self.updated))
  445 +
  446 +
  447 +class WeatherWatchHistory(models.Model):
  448 + datetime = models.DateTimeField(blank=True, null=True)
  449 + humid_int = models.CharField(max_length=45, blank=True, null=True)
  450 + humid_ext = models.CharField(max_length=45, blank=True, null=True)
  451 + wind = models.CharField(max_length=45, blank=True, null=True)
  452 + wind_dir = models.CharField(max_length=45, blank=True, null=True)
  453 + temp_int = models.CharField(max_length=45, blank=True, null=True)
  454 + temp_ext = models.CharField(max_length=45, blank=True, null=True)
  455 + pressure = models.CharField(max_length=45, blank=True, null=True)
  456 + rain = models.CharField(max_length=45, blank=True, null=True)
  457 + dwn = models.CharField(max_length=45, blank=True, null=True)
  458 +
  459 + class Meta:
  460 + managed = True
  461 + db_table = 'weatherwatchhistory'
  462 +
  463 + def __str__(self):
  464 + return (str(self.datetime))
... ...