igs-slm 0.1.4b0__py3-none-any.whl → 0.1.5b0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. igs_slm-0.1.5b0.dist-info/METADATA +115 -0
  2. {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b0.dist-info}/RECORD +192 -172
  3. {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b0.dist-info}/WHEEL +1 -1
  4. igs_slm-0.1.5b0.dist-info/entry_points.txt +3 -0
  5. {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b0.dist-info/licenses}/LICENSE +1 -1
  6. slm/__init__.py +17 -14
  7. slm/admin.py +32 -5
  8. slm/api/edit/views.py +22 -9
  9. slm/api/public/views.py +9 -7
  10. slm/api/views.py +45 -6
  11. slm/apps.py +28 -6
  12. slm/authentication.py +3 -2
  13. slm/bin/startproject.py +102 -31
  14. slm/bin/templates/{{ project_dir }}/pyproject.toml +30 -21
  15. slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/base.py +12 -1
  16. slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/__init__.py +5 -27
  17. slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/__init__.py +6 -27
  18. slm/bin/templates/{{ project_dir }}/src/sites/{{ site }}/validation.py +29 -0
  19. slm/context.py +5 -0
  20. slm/defines/AlertLevel.py +10 -2
  21. slm/defines/AntennaCalibration.py +6 -4
  22. slm/defines/AntennaFeatures.py +12 -9
  23. slm/defines/AntennaReferencePoint.py +12 -10
  24. slm/defines/Aspiration.py +4 -2
  25. slm/defines/CardinalDirection.py +6 -4
  26. slm/defines/CollocationStatus.py +3 -1
  27. slm/defines/EquipmentState.py +6 -12
  28. slm/defines/FlagSeverity.py +4 -2
  29. slm/defines/FractureSpacing.py +7 -5
  30. slm/defines/FrequencyStandardType.py +6 -4
  31. slm/defines/GeodesyMLVersion.py +2 -0
  32. slm/defines/Instrumentation.py +9 -7
  33. slm/defines/LogEntryType.py +17 -15
  34. slm/defines/SLMFileType.py +4 -2
  35. slm/defines/SiteFileUploadStatus.py +7 -24
  36. slm/defines/SiteLogFormat.py +8 -32
  37. slm/defines/SiteLogStatus.py +9 -28
  38. slm/defines/TectonicPlates.py +18 -16
  39. slm/manage.py +24 -0
  40. slm/management/commands/check_upgrade.py +142 -0
  41. slm/management/commands/generate_sinex.py +110 -92
  42. slm/management/commands/head_from_index.py +11 -8
  43. slm/management/commands/import_archive.py +27 -18
  44. slm/management/commands/import_equipment.py +1 -1
  45. slm/management/commands/sitelog.py +1 -3
  46. slm/management/commands/synchronize.py +1 -1
  47. slm/management/commands/validate_db.py +6 -4
  48. slm/map/defines.py +18 -14
  49. slm/map/templates/slm/map.html +4 -6
  50. slm/migrations/0001_remove_archiveindex_no_overlapping_ranges_per_site_and_more.py +26 -0
  51. slm/migrations/0002_alter_archivedsitelog_file_and_more.py +44 -0
  52. slm/migrations/0003_alter_archivedsitelog_name_and_more.py +35 -0
  53. slm/migrations/0004_alter_site_name.py +24 -0
  54. slm/migrations/0005_slmversion.py +30 -0
  55. slm/migrations/0017_alter_logentry_unique_together_and_more.py +3 -1
  56. slm/migrations/0018_afix_deleted.py +3 -1
  57. slm/migrations/0018_alter_siteantenna_options_and_more.py +87 -56
  58. slm/migrations/0019_remove_siteantenna_marker_enu_siteantenna_marker_une_and_more.py +1 -1
  59. slm/migrations/0023_archivedsitelog_gml_version_and_more.py +1 -1
  60. slm/migrations/0031_alter_antenna_features.py +44 -0
  61. slm/migrations/0032_archiveindex_valid_range_and_more.py +84 -0
  62. slm/migrations/add_index_order_index.py +54 -0
  63. slm/migrations/normalize_index.py +147 -0
  64. slm/migrations/simplify_index.py +48 -0
  65. slm/migrations/verify_index.py +67 -0
  66. slm/models/__init__.py +2 -0
  67. slm/models/alerts.py +7 -10
  68. slm/models/data.py +1 -2
  69. slm/models/equipment.py +1 -1
  70. slm/models/fields.py +41 -0
  71. slm/models/index.py +183 -53
  72. slm/models/sitelog.py +35 -38
  73. slm/models/system.py +72 -31
  74. slm/models/user.py +1 -1
  75. slm/parsing/__init__.py +33 -16
  76. slm/parsing/legacy/binding.py +65 -34
  77. slm/parsing/legacy/parser.py +2 -2
  78. slm/parsing/xsd/binding.py +1 -1
  79. slm/parsing/xsd/parser.py +1 -2
  80. slm/receivers/__init__.py +2 -2
  81. slm/receivers/index.py +2 -1
  82. slm/receivers/migration.py +21 -0
  83. slm/settings/__init__.py +192 -4
  84. slm/settings/assets.py +26 -0
  85. slm/settings/auth.py +18 -14
  86. slm/settings/ckeditor.py +12 -6
  87. slm/settings/debug.py +2 -2
  88. slm/settings/emails.py +50 -0
  89. slm/settings/internationalization.py +8 -6
  90. slm/settings/logging.py +100 -88
  91. slm/settings/platform/darwin.py +16 -6
  92. slm/settings/rest.py +20 -15
  93. slm/settings/root.py +192 -98
  94. slm/settings/routines.py +5 -1
  95. slm/settings/secrets.py +20 -31
  96. slm/settings/security.py +7 -5
  97. slm/settings/slm.py +35 -16
  98. slm/settings/static_templates.py +12 -9
  99. slm/settings/templates.py +31 -25
  100. slm/settings/uploads.py +33 -5
  101. slm/settings/urls.py +1 -1
  102. slm/settings/validation.py +165 -165
  103. slm/signals.py +3 -2
  104. slm/static/slm/css/style.css +37 -36
  105. slm/static/slm/js/autocomplete.js +6 -4
  106. slm/static/slm/js/file_modal.js +62 -0
  107. slm/static/slm/js/form.js +3 -3
  108. slm/static/slm/js/formWidget.js +3 -3
  109. slm/static/slm/js/persistable.js +5 -1
  110. slm/templates/admin/base.html +1 -0
  111. slm/templates/rest_framework/base.html +23 -11
  112. slm/templates/slm/base.html +27 -22
  113. slm/templates/slm/forms/widgets/auto_complete.html +12 -11
  114. slm/templates/slm/forms/widgets/auto_complete_multiple.html +8 -7
  115. slm/templates/slm/station/download.html +6 -6
  116. slm/templates/slm/station/edit.html +9 -17
  117. slm/templates/slm/station/review.html +5 -3
  118. slm/templates/slm/station/upload.html +4 -1
  119. slm/templates/slm/station/uploads/legacy.html +1 -1
  120. slm/templates/slm/widgets/alert_scroll.html +4 -8
  121. slm/templates/slm/widgets/filelist.html +0 -5
  122. slm/templates/slm/widgets/log_scroll.html +2 -13
  123. slm/templates/slm/widgets/stationlist.html +2 -8
  124. slm/templatetags/slm.py +70 -9
  125. slm/utils.py +13 -4
  126. slm/validators.py +14 -14
  127. slm/views.py +6 -6
  128. slm/wsgi.py +16 -0
  129. igs_slm-0.1.4b0.dist-info/METADATA +0 -154
  130. igs_slm-0.1.4b0.dist-info/entry_points.txt +0 -3
  131. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/validation.py +0 -11
  132. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/__init__.py +0 -0
  133. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/__init__.py +0 -0
  134. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/local.py +0 -0
  135. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/wsgi.py +0 -0
  136. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/manage.py +0 -0
  137. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/wsgi.py +0 -0
  138. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/urls.py +0 -0
  139. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/__init__.py +0 -0
  140. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/admin.py +0 -0
  141. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/apps.py +0 -0
  142. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/__init__.py +0 -0
  143. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/__init__.py +0 -0
  144. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/import_archive.py +0 -0
  145. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/migrations/__init__.py +0 -0
  146. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/models.py +0 -0
  147. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/templates/slm/base.html +0 -0
  148. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/urls.py +0 -0
  149. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/views.py +0 -0
@@ -1,9 +1,9 @@
1
1
  """
2
2
  The SLM supports pluggable validation logic for all site log sections and fields. Since
3
- this logic is configuraton specific, it may change, diverging from the validation flags
3
+ this logic is configuration specific, it may change, diverging from the validation flags
4
4
  recorded against the previous validation configuration in the database.
5
5
 
6
- Run this command to run all validation routines against all current sitelog fields
6
+ Run this command to run all validation routines against all current site log fields
7
7
  in the database.
8
8
  """
9
9
 
@@ -159,7 +159,7 @@ class Command(TyperCommand):
159
159
 
160
160
  new_flags = Site.objects.aggregate(Sum("num_flags"))["num_flags__sum"]
161
161
 
162
- delta = new_flags - old_flag_count
162
+ delta = (new_flags or 0) - (old_flag_count or 0)
163
163
 
164
164
  if delta >= 0:
165
165
  change = "added"
@@ -180,7 +180,9 @@ class Command(TyperCommand):
180
180
  "There are a total of {new_flags} validation flags across "
181
181
  "{site_count} sites. {critical} are critical."
182
182
  ).format(
183
- new_flags=new_flags, site_count=sites.count(), critical=critical
183
+ new_flags=(new_flags or 0),
184
+ site_count=sites.count(),
185
+ critical=critical,
184
186
  )
185
187
  )
186
188
  )
slm/map/defines.py CHANGED
@@ -10,15 +10,17 @@ class MapBoxStyle(IntegerChoices, s("slug", case_fold=True), p("version")):
10
10
 
11
11
  _symmetric_builtins_ = ["name", s("label", case_fold=True), "uri"]
12
12
 
13
+ # fmt: off
13
14
  # name value label slug version
14
- STREETS = 1, _("Streets"), "streets", 12
15
- OUTDOORS = 2, _("Outdoors"), "outdoors", 12
16
- LIGHT = 3, _("Light"), "light", 11
17
- DARK = 4, _("Dark"), "dark", 11
18
- SATELLITE = 5, _("Satellite"), "satellite", 9
15
+ STREETS = 1, _("Streets"), "streets", 12
16
+ OUTDOORS = 2, _("Outdoors"), "outdoors", 12
17
+ LIGHT = 3, _("Light"), "light", 11
18
+ DARK = 4, _("Dark"), "dark", 11
19
+ SATELLITE = 5, _("Satellite"), "satellite", 9
19
20
  SATELLITE_STREETS = 6, _("Satellite Streets"), "satellite-streets", 12
20
- NAVIGATION_DAY = 7, _("Navigation Day"), "navigation-day", 1
21
- NAVIGATION_NIGHT = 8, _("Navigation Night"), "navigation-night", 1
21
+ NAVIGATION_DAY = 7, _("Navigation Day"), "navigation-day", 1
22
+ NAVIGATION_NIGHT = 8, _("Navigation Night"), "navigation-night", 1
23
+ # fmt: on
22
24
 
23
25
  @property
24
26
  def uri(self):
@@ -39,15 +41,17 @@ class MapBoxProjection(IntegerChoices, s("slug", case_fold=True)):
39
41
 
40
42
  _symmetric_builtins_ = ["name", "label"]
41
43
 
44
+ # fmt: off
42
45
  # name value label slug
43
- ALBERS = 0, _("Albers"), "albers"
44
- EQUAL_EARTH = 1, _("Equal Earth"), "equalEarth"
45
- EQUI_RECTANGULAR = 2, _("Equi-Rectangular"), "equirectangular"
46
+ ALBERS = 0, _("Albers"), "albers"
47
+ EQUAL_EARTH = 1, _("Equal Earth"), "equalEarth"
48
+ EQUI_RECTANGULAR = 2, _("Equi-Rectangular"), "equirectangular"
46
49
  LAMBERT_CONFORMAL_CONIC = 3, _("Lambert Conformal Conic"), "lambertConformalConic"
47
- MERCATOR = 4, _("Mercator"), "mercator"
48
- NATURAL_EARTH = 5, _("Natural Earth"), "naturalEarth"
49
- WINKEL_TRIPEL = 6, _("Winkel Tripel"), "winkelTripel"
50
- GLOBE = 7, _("Globe"), "globe"
50
+ MERCATOR = 4, _("Mercator"), "mercator"
51
+ NATURAL_EARTH = 5, _("Natural Earth"), "naturalEarth"
52
+ WINKEL_TRIPEL = 6, _("Winkel Tripel"), "winkelTripel"
53
+ GLOBE = 7, _("Globe"), "globe"
54
+ # fmt: on
51
55
 
52
56
  def __str__(self):
53
57
  return self.slug
@@ -3,9 +3,9 @@
3
3
 
4
4
  {% block stylesheets %}
5
5
  {{ block.super }}
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mapbox-gl/3.9.3/mapbox-gl.min.css" integrity="sha512-9RAPfS3YMZi1yEe+yT65HNwrqhOw++yaDYFxElkl141OBieVWznObzeAYNijFmvVe97u9Oh5oNXyTZTZD04iGQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <link href='https://cdn.datatables.net/1.13.2/css/jquery.dataTables.min.css' rel='stylesheet' />
6
8
  {% compress css %}
7
- <link href='https://api.mapbox.com/mapbox-gl-js/v2.13.0/mapbox-gl.css' rel='stylesheet' />
8
- <link href='https://cdn.datatables.net/1.13.2/css/jquery.dataTables.min.css' rel='stylesheet' />
9
9
  <link rel='stylesheet' type='text/css' media='screen' href='{% static "slm/css/map.css" %}'>
10
10
  {% endcompress %}
11
11
  {% endblock %}
@@ -14,9 +14,9 @@
14
14
  {{ block.super }}
15
15
  {% compress js %}
16
16
  <script src="{% static 'slm/js/map.js' %}"></script>
17
- <script src='https://api.mapbox.com/mapbox-gl-js/v2.13.0/mapbox-gl.js'></script>
18
- <script src='https://cdn.datatables.net/1.13.2/js/jquery.dataTables.min.js'></script>
19
17
  {% endcompress %}
18
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/mapbox-gl/3.9.3/mapbox-gl.js" integrity="sha512-tJBCVRTEYq4MVF7pQQNJ0vWc+ij9oTnNq10/txpa2ISQ/cIUzwb9VEwHKSQVe2l4Ni5EyrwjB2/R+4WIRJSVXg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
19
+ <script src='https://cdn.datatables.net/1.13.2/js/jquery.dataTables.min.js'></script>
20
20
  {% endblock %}
21
21
 
22
22
  {% block page_content %}
@@ -133,7 +133,6 @@
133
133
  </table>
134
134
  </div>
135
135
  </div>
136
- {% compress js %}
137
136
  <script>
138
137
  const agencySelect = $('#slm-agency-select');
139
138
  const networkSelect = $('#slm-network-select');
@@ -366,7 +365,6 @@
366
365
  });
367
366
  //slm.addColumnFiltering( stationTable );
368
367
  </script>
369
- {% endcompress %}
370
368
  {% else %}
371
369
  {% trans "To enable maps, create a MapBox account and configure the api key in the admin:" %} <a href="https://mapbox.com">mapbox.com</a>
372
370
  {% endif %}
@@ -0,0 +1,26 @@
1
+ # Generated by Django 4.2.20 on 2025-05-09 21:04
2
+
3
+ import django.contrib.postgres.constraints
4
+ import django.db.models.constraints
5
+ from django.db import migrations
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("slm", "verify_index"),
11
+ ]
12
+
13
+ operations = [
14
+ migrations.RemoveConstraint(
15
+ model_name="archiveindex",
16
+ name="no_overlapping_ranges_per_site",
17
+ ),
18
+ migrations.AddConstraint(
19
+ model_name="archiveindex",
20
+ constraint=django.contrib.postgres.constraints.ExclusionConstraint(
21
+ deferrable=django.db.models.constraints.Deferrable["DEFERRED"],
22
+ expressions=[("site", "="), ("valid_range", "&&")],
23
+ name="no_overlapping_ranges_per_site",
24
+ ),
25
+ ),
26
+ ]
@@ -0,0 +1,44 @@
1
+ # Generated by Django 4.2.20 on 2025-06-27 20:37
2
+
3
+ from django.db import migrations, models
4
+
5
+ import slm.models.system
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("slm", "0001_remove_archiveindex_no_overlapping_ranges_per_site_and_more"),
11
+ ]
12
+
13
+ operations = [
14
+ migrations.AlterField(
15
+ model_name="archivedsitelog",
16
+ name="file",
17
+ field=models.FileField(
18
+ help_text="A pointer to the uploaded file on disk.",
19
+ max_length=255,
20
+ unique=True,
21
+ upload_to=slm.models.system.site_upload_path,
22
+ ),
23
+ ),
24
+ migrations.AlterField(
25
+ model_name="geodesymlinvalid",
26
+ name="file",
27
+ field=models.FileField(
28
+ help_text="A pointer to the uploaded file on disk.",
29
+ max_length=255,
30
+ unique=True,
31
+ upload_to=slm.models.system.site_upload_path,
32
+ ),
33
+ ),
34
+ migrations.AlterField(
35
+ model_name="sitefileupload",
36
+ name="file",
37
+ field=models.FileField(
38
+ help_text="A pointer to the uploaded file on disk.",
39
+ max_length=255,
40
+ unique=True,
41
+ upload_to=slm.models.system.site_upload_path,
42
+ ),
43
+ ),
44
+ ]
@@ -0,0 +1,35 @@
1
+ # Generated by Django 4.2.20 on 2025-06-30 18:12
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("slm", "0002_alter_archivedsitelog_file_and_more"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AlterField(
13
+ model_name="archivedsitelog",
14
+ name="name",
15
+ field=models.CharField(db_index=True, max_length=50),
16
+ ),
17
+ migrations.AlterField(
18
+ model_name="archivedsitelog",
19
+ name="timestamp",
20
+ field=models.DateTimeField(
21
+ auto_now_add=True,
22
+ db_index=True,
23
+ help_text="When the file was created or uploaded.",
24
+ ),
25
+ ),
26
+ migrations.AlterField(
27
+ model_name="sitefileupload",
28
+ name="timestamp",
29
+ field=models.DateTimeField(
30
+ auto_now_add=True,
31
+ db_index=True,
32
+ help_text="When the file was created or uploaded.",
33
+ ),
34
+ ),
35
+ ]
@@ -0,0 +1,24 @@
1
+ # Generated by Django 4.2.20 on 2025-07-08 19:42
2
+
3
+ from django.db import migrations
4
+
5
+ import slm.models.fields
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("slm", "0003_alter_archivedsitelog_name_and_more"),
11
+ ]
12
+
13
+ operations = [
14
+ migrations.AlterField(
15
+ model_name="site",
16
+ name="name",
17
+ field=slm.models.fields.StationNameField(
18
+ db_index=True,
19
+ help_text="The name of the station.",
20
+ max_length=50,
21
+ unique=True,
22
+ ),
23
+ ),
24
+ ]
@@ -0,0 +1,30 @@
1
+ # Generated by Django 4.2.20 on 2025-07-09 22:10
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("slm", "0004_alter_site_name"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.CreateModel(
13
+ name="SLMVersion",
14
+ fields=[
15
+ (
16
+ "id",
17
+ models.BigAutoField(
18
+ auto_created=True,
19
+ primary_key=True,
20
+ serialize=False,
21
+ verbose_name="ID",
22
+ ),
23
+ ),
24
+ ("version_str", models.CharField(blank=True, default="")),
25
+ ],
26
+ options={
27
+ "abstract": False,
28
+ },
29
+ ),
30
+ ]
@@ -46,7 +46,9 @@ class Migration(migrations.Migration):
46
46
  name="logentry",
47
47
  index_together={("timestamp", "type", "site", "section", "subsection")},
48
48
  ),
49
- migrations.RunPython(clean_duplicate_logs, migrations.RunPython.noop),
49
+ migrations.RunPython(
50
+ clean_duplicate_logs, migrations.RunPython.noop, elidable=True
51
+ ),
50
52
  migrations.AlterUniqueTogether(
51
53
  name="logentry",
52
54
  unique_together={("timestamp", "type", "site", "section", "subsection")},
@@ -31,4 +31,6 @@ class Migration(migrations.Migration):
31
31
  ("slm", "0017_alter_logentry_unique_together_and_more"),
32
32
  ]
33
33
 
34
- operations = [migrations.RunPython(migrate_deleted, migrations.RunPython.noop)]
34
+ operations = [
35
+ migrations.RunPython(migrate_deleted, migrations.RunPython.noop, elidable=True)
36
+ ]
@@ -1,7 +1,10 @@
1
1
  # Generated by Django 4.2.6 on 2023-10-25 23:57
2
2
 
3
+ from django import VERSION
3
4
  from django.db import migrations, models
4
5
 
6
+ check_param = "check" if VERSION[0:2] < (5, 1) else "condition"
7
+
5
8
 
6
9
  class Migration(migrations.Migration):
7
10
  dependencies = [
@@ -118,127 +121,155 @@ class Migration(migrations.Migration):
118
121
  migrations.AddConstraint(
119
122
  model_name="siteantenna",
120
123
  constraint=models.CheckConstraint(
121
- check=models.Q(
122
- ("published", False), ("is_deleted", True), _negated=True
123
- ),
124
- name="slm_siteantenna_no_mod_deleted",
124
+ **{
125
+ check_param: models.Q(
126
+ ("published", False), ("is_deleted", True), _negated=True
127
+ ),
128
+ "name": "slm_siteantenna_no_mod_deleted",
129
+ }
125
130
  ),
126
131
  ),
127
132
  migrations.AddConstraint(
128
133
  model_name="sitecollocation",
129
134
  constraint=models.CheckConstraint(
130
- check=models.Q(
131
- ("published", False), ("is_deleted", True), _negated=True
132
- ),
133
- name="slm_sitecollocation_no_mod_deleted",
135
+ **{
136
+ check_param: models.Q(
137
+ ("published", False), ("is_deleted", True), _negated=True
138
+ ),
139
+ "name": "slm_sitecollocation_no_mod_deleted",
140
+ }
134
141
  ),
135
142
  ),
136
143
  migrations.AddConstraint(
137
144
  model_name="sitefrequencystandard",
138
145
  constraint=models.CheckConstraint(
139
- check=models.Q(
140
- ("published", False), ("is_deleted", True), _negated=True
141
- ),
142
- name="slm_sitefrequencystandard_no_mod_deleted",
146
+ **{
147
+ check_param: models.Q(
148
+ ("published", False), ("is_deleted", True), _negated=True
149
+ ),
150
+ "name": "slm_sitefrequencystandard_no_mod_deleted",
151
+ }
143
152
  ),
144
153
  ),
145
154
  migrations.AddConstraint(
146
155
  model_name="sitehumiditysensor",
147
156
  constraint=models.CheckConstraint(
148
- check=models.Q(
149
- ("published", False), ("is_deleted", True), _negated=True
150
- ),
151
- name="slm_sitehumiditysensor_no_mod_deleted",
157
+ **{
158
+ check_param: models.Q(
159
+ ("published", False), ("is_deleted", True), _negated=True
160
+ ),
161
+ "name": "slm_sitehumiditysensor_no_mod_deleted",
162
+ }
152
163
  ),
153
164
  ),
154
165
  migrations.AddConstraint(
155
166
  model_name="sitelocalepisodiceffects",
156
167
  constraint=models.CheckConstraint(
157
- check=models.Q(
158
- ("published", False), ("is_deleted", True), _negated=True
159
- ),
160
- name="slm_sitelocalepisodiceffects_no_mod_deleted",
168
+ **{
169
+ check_param: models.Q(
170
+ ("published", False), ("is_deleted", True), _negated=True
171
+ ),
172
+ "name": "slm_sitelocalepisodiceffects_no_mod_deleted",
173
+ }
161
174
  ),
162
175
  ),
163
176
  migrations.AddConstraint(
164
177
  model_name="sitemultipathsources",
165
178
  constraint=models.CheckConstraint(
166
- check=models.Q(
167
- ("published", False), ("is_deleted", True), _negated=True
168
- ),
169
- name="slm_sitemultipathsources_no_mod_deleted",
179
+ **{
180
+ check_param: models.Q(
181
+ ("published", False), ("is_deleted", True), _negated=True
182
+ ),
183
+ "name": "slm_sitemultipathsources_no_mod_deleted",
184
+ }
170
185
  ),
171
186
  ),
172
187
  migrations.AddConstraint(
173
188
  model_name="siteotherinstrumentation",
174
189
  constraint=models.CheckConstraint(
175
- check=models.Q(
176
- ("published", False), ("is_deleted", True), _negated=True
177
- ),
178
- name="slm_siteotherinstrumentation_no_mod_deleted",
190
+ **{
191
+ check_param: models.Q(
192
+ ("published", False), ("is_deleted", True), _negated=True
193
+ ),
194
+ "name": "slm_siteotherinstrumentation_no_mod_deleted",
195
+ }
179
196
  ),
180
197
  ),
181
198
  migrations.AddConstraint(
182
199
  model_name="sitepressuresensor",
183
200
  constraint=models.CheckConstraint(
184
- check=models.Q(
185
- ("published", False), ("is_deleted", True), _negated=True
186
- ),
187
- name="slm_sitepressuresensor_no_mod_deleted",
201
+ **{
202
+ check_param: models.Q(
203
+ ("published", False), ("is_deleted", True), _negated=True
204
+ ),
205
+ "name": "slm_sitepressuresensor_no_mod_deleted",
206
+ }
188
207
  ),
189
208
  ),
190
209
  migrations.AddConstraint(
191
210
  model_name="siteradiointerferences",
192
211
  constraint=models.CheckConstraint(
193
- check=models.Q(
194
- ("published", False), ("is_deleted", True), _negated=True
195
- ),
196
- name="slm_siteradiointerferences_no_mod_deleted",
212
+ **{
213
+ check_param: models.Q(
214
+ ("published", False), ("is_deleted", True), _negated=True
215
+ ),
216
+ "name": "slm_siteradiointerferences_no_mod_deleted",
217
+ }
197
218
  ),
198
219
  ),
199
220
  migrations.AddConstraint(
200
221
  model_name="sitereceiver",
201
222
  constraint=models.CheckConstraint(
202
- check=models.Q(
203
- ("published", False), ("is_deleted", True), _negated=True
204
- ),
205
- name="slm_sitereceiver_no_mod_deleted",
223
+ **{
224
+ check_param: models.Q(
225
+ ("published", False), ("is_deleted", True), _negated=True
226
+ ),
227
+ "name": "slm_sitereceiver_no_mod_deleted",
228
+ }
206
229
  ),
207
230
  ),
208
231
  migrations.AddConstraint(
209
232
  model_name="sitesignalobstructions",
210
233
  constraint=models.CheckConstraint(
211
- check=models.Q(
212
- ("published", False), ("is_deleted", True), _negated=True
213
- ),
214
- name="slm_sitesignalobstructions_no_mod_deleted",
234
+ **{
235
+ check_param: models.Q(
236
+ ("published", False), ("is_deleted", True), _negated=True
237
+ ),
238
+ "name": "slm_sitesignalobstructions_no_mod_deleted",
239
+ }
215
240
  ),
216
241
  ),
217
242
  migrations.AddConstraint(
218
243
  model_name="sitesurveyedlocalties",
219
244
  constraint=models.CheckConstraint(
220
- check=models.Q(
221
- ("published", False), ("is_deleted", True), _negated=True
222
- ),
223
- name="slm_sitesurveyedlocalties_no_mod_deleted",
245
+ **{
246
+ check_param: models.Q(
247
+ ("published", False), ("is_deleted", True), _negated=True
248
+ ),
249
+ "name": "slm_sitesurveyedlocalties_no_mod_deleted",
250
+ }
224
251
  ),
225
252
  ),
226
253
  migrations.AddConstraint(
227
254
  model_name="sitetemperaturesensor",
228
255
  constraint=models.CheckConstraint(
229
- check=models.Q(
230
- ("published", False), ("is_deleted", True), _negated=True
231
- ),
232
- name="slm_sitetemperaturesensor_no_mod_deleted",
256
+ **{
257
+ check_param: models.Q(
258
+ ("published", False), ("is_deleted", True), _negated=True
259
+ ),
260
+ "name": "slm_sitetemperaturesensor_no_mod_deleted",
261
+ }
233
262
  ),
234
263
  ),
235
264
  migrations.AddConstraint(
236
265
  model_name="sitewatervaporradiometer",
237
266
  constraint=models.CheckConstraint(
238
- check=models.Q(
239
- ("published", False), ("is_deleted", True), _negated=True
240
- ),
241
- name="slm_sitewatervaporradiometer_no_mod_deleted",
267
+ **{
268
+ check_param: models.Q(
269
+ ("published", False), ("is_deleted", True), _negated=True
270
+ ),
271
+ "name": "slm_sitewatervaporradiometer_no_mod_deleted",
272
+ }
242
273
  ),
243
274
  ),
244
275
  ]
@@ -39,7 +39,7 @@ class Migration(migrations.Migration):
39
39
  verbose_name="Marker->ARP UNE Ecc (m)",
40
40
  ),
41
41
  ),
42
- migrations.RunPython(switch_enu_to_une, switch_une_to_enu),
42
+ migrations.RunPython(switch_enu_to_une, switch_une_to_enu, elidable=True),
43
43
  migrations.RemoveField(
44
44
  model_name="siteantenna",
45
45
  name="marker_enu",
@@ -51,5 +51,5 @@ class Migration(migrations.Migration):
51
51
  null=True,
52
52
  ),
53
53
  ),
54
- migrations.RunPython(populate_gml_versions),
54
+ migrations.RunPython(populate_gml_versions, elidable=True),
55
55
  ]
@@ -0,0 +1,44 @@
1
+ # Generated by Django 4.2.14 on 2024-11-13 23:19
2
+
3
+ import django_enum.fields
4
+ from django.db import migrations
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+ dependencies = [
9
+ ("slm", "0030_alter_antenna_state_alter_radome_state_and_more"),
10
+ ]
11
+
12
+ operations = [
13
+ migrations.AlterField(
14
+ model_name="antenna",
15
+ name="features",
16
+ field=django_enum.fields.EnumPositiveSmallIntegerField(
17
+ blank=True,
18
+ choices=[
19
+ (1, "(MMI) Man-Machine Interface"),
20
+ (2, "(NOM) North Orientation Mark"),
21
+ (3, "(RXC) Receiver Connector"),
22
+ (4, "(BAT) Battery Compartment Door Release"),
23
+ (5, "(BTD) Bottom of Tear Drop Shape"),
24
+ (6, "(CMP) Mounted Compass"),
25
+ (7, "(DIS) Display/Digital Readout"),
26
+ (8, "(DRY) Cap or Cover for Drying Agent"),
27
+ (9, "(PCS) PC Card Slot"),
28
+ (10, "(TMT) Tape Measure Tab or Notch for Slant Height Pole"),
29
+ (11, "(CAC) Nonspecific Cable Connector"),
30
+ (12, "(CTC) External Controller Connector"),
31
+ (13, "(DAC) Data Cable Connector"),
32
+ (14, "(PWC) Power Port"),
33
+ (15, "(RTC) RTK Connector"),
34
+ (16, "(UNK) Unknown"),
35
+ (17, "(OMM) Opposite of Man-Machine Interface"),
36
+ ],
37
+ db_index=True,
38
+ default=None,
39
+ help_text='NOM/RXC/XXX from "antenna.gra"; see NRP abbreviations.',
40
+ null=True,
41
+ verbose_name="Antenna Features",
42
+ ),
43
+ ),
44
+ ]