igs-slm 0.1.4b0__py3-none-any.whl → 0.1.5b1__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.
- igs_slm-0.1.5b1.dist-info/METADATA +115 -0
- {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b1.dist-info}/RECORD +193 -173
- {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b1.dist-info}/WHEEL +1 -1
- igs_slm-0.1.5b1.dist-info/entry_points.txt +3 -0
- {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b1.dist-info/licenses}/LICENSE +1 -1
- slm/__init__.py +17 -14
- slm/admin.py +32 -5
- slm/api/edit/views.py +22 -9
- slm/api/public/views.py +9 -7
- slm/api/views.py +45 -6
- slm/apps.py +28 -6
- slm/authentication.py +3 -2
- slm/bin/startproject.py +102 -31
- slm/bin/templates/{{ project_dir }}/pyproject.toml +30 -21
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/base.py +12 -1
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/__init__.py +5 -27
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/__init__.py +6 -27
- slm/bin/templates/{{ project_dir }}/src/sites/{{ site }}/urls.py +15 -0
- slm/bin/templates/{{ project_dir }}/src/sites/{{ site }}/validation.py +29 -0
- slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/urls.py +1 -0
- slm/context.py +5 -0
- slm/defines/AlertLevel.py +10 -2
- slm/defines/AntennaCalibration.py +6 -4
- slm/defines/AntennaFeatures.py +12 -9
- slm/defines/AntennaReferencePoint.py +12 -10
- slm/defines/Aspiration.py +4 -2
- slm/defines/CardinalDirection.py +6 -4
- slm/defines/CollocationStatus.py +3 -1
- slm/defines/EquipmentState.py +6 -12
- slm/defines/FlagSeverity.py +4 -2
- slm/defines/FractureSpacing.py +7 -5
- slm/defines/FrequencyStandardType.py +6 -4
- slm/defines/GeodesyMLVersion.py +2 -0
- slm/defines/Instrumentation.py +9 -7
- slm/defines/LogEntryType.py +17 -15
- slm/defines/SLMFileType.py +4 -2
- slm/defines/SiteFileUploadStatus.py +7 -24
- slm/defines/SiteLogFormat.py +8 -32
- slm/defines/SiteLogStatus.py +9 -28
- slm/defines/TectonicPlates.py +18 -16
- slm/manage.py +24 -0
- slm/management/commands/check_upgrade.py +142 -0
- slm/management/commands/generate_sinex.py +110 -92
- slm/management/commands/head_from_index.py +11 -8
- slm/management/commands/import_archive.py +27 -18
- slm/management/commands/import_equipment.py +1 -1
- slm/management/commands/sitelog.py +1 -3
- slm/management/commands/synchronize.py +1 -1
- slm/management/commands/validate_db.py +6 -4
- slm/map/defines.py +18 -14
- slm/map/templates/slm/map.html +5 -7
- slm/migrations/0001_remove_archiveindex_no_overlapping_ranges_per_site_and_more.py +26 -0
- slm/migrations/0002_alter_archivedsitelog_file_and_more.py +44 -0
- slm/migrations/0003_alter_archivedsitelog_name_and_more.py +35 -0
- slm/migrations/0004_alter_site_name.py +24 -0
- slm/migrations/0005_slmversion.py +30 -0
- slm/migrations/0017_alter_logentry_unique_together_and_more.py +3 -1
- slm/migrations/0018_afix_deleted.py +3 -1
- slm/migrations/0018_alter_siteantenna_options_and_more.py +87 -56
- slm/migrations/0019_remove_siteantenna_marker_enu_siteantenna_marker_une_and_more.py +1 -1
- slm/migrations/0023_archivedsitelog_gml_version_and_more.py +1 -1
- slm/migrations/0031_alter_antenna_features.py +44 -0
- slm/migrations/0032_archiveindex_valid_range_and_more.py +84 -0
- slm/migrations/add_index_order_index.py +54 -0
- slm/migrations/normalize_index.py +147 -0
- slm/migrations/simplify_index.py +48 -0
- slm/migrations/verify_index.py +67 -0
- slm/models/__init__.py +2 -0
- slm/models/alerts.py +7 -10
- slm/models/data.py +1 -2
- slm/models/equipment.py +1 -1
- slm/models/fields.py +41 -0
- slm/models/index.py +183 -53
- slm/models/sitelog.py +35 -38
- slm/models/system.py +72 -31
- slm/models/user.py +1 -1
- slm/parsing/__init__.py +33 -16
- slm/parsing/legacy/binding.py +65 -34
- slm/parsing/legacy/parser.py +2 -2
- slm/parsing/xsd/binding.py +1 -1
- slm/parsing/xsd/parser.py +1 -2
- slm/receivers/__init__.py +2 -2
- slm/receivers/index.py +2 -1
- slm/receivers/migration.py +21 -0
- slm/settings/__init__.py +192 -4
- slm/settings/assets.py +26 -0
- slm/settings/auth.py +18 -14
- slm/settings/ckeditor.py +12 -6
- slm/settings/debug.py +2 -2
- slm/settings/emails.py +50 -0
- slm/settings/internationalization.py +8 -6
- slm/settings/logging.py +100 -88
- slm/settings/platform/darwin.py +16 -6
- slm/settings/rest.py +20 -15
- slm/settings/root.py +192 -98
- slm/settings/routines.py +5 -1
- slm/settings/secrets.py +20 -31
- slm/settings/security.py +7 -5
- slm/settings/slm.py +35 -23
- slm/settings/static_templates.py +12 -9
- slm/settings/templates.py +31 -25
- slm/settings/uploads.py +33 -5
- slm/settings/urls.py +7 -12
- slm/settings/validation.py +165 -165
- slm/signals.py +3 -2
- slm/static/slm/css/style.css +37 -36
- slm/static/slm/js/autocomplete.js +6 -4
- slm/static/slm/js/enums.js +6 -5
- slm/static/slm/js/file_modal.js +62 -0
- slm/static/slm/js/form.js +3 -3
- slm/static/slm/js/formWidget.js +3 -3
- slm/static/slm/js/persistable.js +5 -1
- slm/templates/admin/base.html +1 -0
- slm/templates/rest_framework/base.html +23 -11
- slm/templates/slm/base.html +27 -22
- slm/templates/slm/forms/widgets/auto_complete.html +12 -11
- slm/templates/slm/forms/widgets/auto_complete_multiple.html +8 -7
- slm/templates/slm/station/download.html +6 -6
- slm/templates/slm/station/edit.html +9 -17
- slm/templates/slm/station/review.html +5 -3
- slm/templates/slm/station/upload.html +4 -1
- slm/templates/slm/station/uploads/legacy.html +1 -1
- slm/templates/slm/widgets/alert_scroll.html +4 -8
- slm/templates/slm/widgets/filelist.html +0 -5
- slm/templates/slm/widgets/log_scroll.html +2 -13
- slm/templates/slm/widgets/stationlist.html +2 -8
- slm/templatetags/slm.py +70 -9
- slm/utils.py +13 -4
- slm/validators.py +14 -14
- slm/views.py +6 -6
- slm/wsgi.py +16 -0
- igs_slm-0.1.4b0.dist-info/METADATA +0 -154
- igs_slm-0.1.4b0.dist-info/entry_points.txt +0 -3
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/urls.py +0 -7
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/validation.py +0 -11
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/local.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/wsgi.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/manage.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/wsgi.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/admin.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/apps.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/import_archive.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/migrations/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/models.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/templates/slm/base.html +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/views.py +0 -0
slm/settings/templates.py
CHANGED
|
@@ -1,29 +1,35 @@
|
|
|
1
1
|
from jinja2 import select_autoescape
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
from slm.settings import set_default
|
|
4
|
+
|
|
5
|
+
set_default(
|
|
6
|
+
"TEMPLATES",
|
|
7
|
+
[
|
|
8
|
+
{
|
|
9
|
+
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
|
10
|
+
"APP_DIRS": True,
|
|
11
|
+
"OPTIONS": {
|
|
12
|
+
"context_processors": [
|
|
13
|
+
"slm.context.globals",
|
|
14
|
+
"django.template.context_processors.debug",
|
|
15
|
+
"django.template.context_processors.request",
|
|
16
|
+
"django.contrib.auth.context_processors.auth",
|
|
17
|
+
"django.contrib.messages.context_processors.messages",
|
|
18
|
+
],
|
|
19
|
+
"builtins": ["slm.templatetags.slm"],
|
|
20
|
+
},
|
|
15
21
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
{
|
|
23
|
+
"BACKEND": "django.template.backends.jinja2.Jinja2",
|
|
24
|
+
"APP_DIRS": True,
|
|
25
|
+
"OPTIONS": {
|
|
26
|
+
"autoescape": select_autoescape(
|
|
27
|
+
disabled_extensions=("log",),
|
|
28
|
+
default_for_string=True,
|
|
29
|
+
default=True,
|
|
30
|
+
),
|
|
31
|
+
"environment": "slm.templatetags.jinja2.compat",
|
|
32
|
+
},
|
|
27
33
|
},
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
],
|
|
35
|
+
)
|
slm/settings/uploads.py
CHANGED
|
@@ -1,8 +1,36 @@
|
|
|
1
|
-
from slm.settings import
|
|
1
|
+
from slm.settings import env as settings_environment
|
|
2
|
+
from slm.settings import get_setting, set_default, slm_path_mk_dirs_must_exist
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
env = settings_environment()
|
|
5
|
+
|
|
6
|
+
set_default("MEDIA_URL", "/media/")
|
|
7
|
+
|
|
8
|
+
DEBUG = get_setting("DEBUG", False)
|
|
9
|
+
|
|
10
|
+
MEDIA_ROOT = env(
|
|
11
|
+
"MEDIA_ROOT",
|
|
12
|
+
slm_path_mk_dirs_must_exist,
|
|
13
|
+
default=get_setting("MEDIA_ROOT", get_setting("BASE_DIR") / "media"),
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
FILE_UPLOAD_MAX_MEMORY_SIZE = env(
|
|
17
|
+
"FILE_UPLOAD_MAX_MEMORY_SIZE",
|
|
18
|
+
int,
|
|
19
|
+
default=get_setting("FILE_UPLOAD_MAX_MEMORY_SIZE", 2621440),
|
|
20
|
+
)
|
|
5
21
|
|
|
6
22
|
# set RWX for Owner and Group for any uploaded files
|
|
7
|
-
FILE_UPLOAD_PERMISSIONS =
|
|
8
|
-
|
|
23
|
+
FILE_UPLOAD_PERMISSIONS = env(
|
|
24
|
+
"FILE_UPLOAD_PERMISSIONS",
|
|
25
|
+
int,
|
|
26
|
+
default=get_setting("FILE_UPLOAD_PERMISSIONS", 0o664 if DEBUG else 0o660),
|
|
27
|
+
)
|
|
28
|
+
FILE_UPLOAD_DIRECTORY_PERMISSIONS = env(
|
|
29
|
+
"FILE_UPLOAD_DIRECTORY_PERMISSIONS",
|
|
30
|
+
int,
|
|
31
|
+
default=get_setting("FILE_UPLOAD_DIRECTORY_PERMISSIONS", 0o775 if DEBUG else 0o770),
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
FILE_UPLOAD_TEMP_DIR = env(
|
|
35
|
+
"FILE_UPLOAD_TEMP_DIR", str, default=get_setting("FILE_UPLOAD_TEMP_DIR", None)
|
|
36
|
+
)
|
slm/settings/urls.py
CHANGED
|
@@ -38,16 +38,6 @@ APIS dictionary. For example the slm.map app extends the public API like so:
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
Other third party apps may be included at customizable mount points by
|
|
42
|
-
providing a settings.SLM_URL_MOUNTS list. For example to include your app at
|
|
43
|
-
the myapp path you might do this:
|
|
44
|
-
|
|
45
|
-
.. code-block: python
|
|
46
|
-
|
|
47
|
-
SLM_URL_MOUNTS = [
|
|
48
|
-
('myapp/', 'myapp.urls')
|
|
49
|
-
]
|
|
50
|
-
|
|
51
41
|
"""
|
|
52
42
|
|
|
53
43
|
from importlib import import_module
|
|
@@ -80,7 +70,11 @@ def bring_in_urls(urlpatterns):
|
|
|
80
70
|
|
|
81
71
|
for app in reversed(settings.INSTALLED_APPS):
|
|
82
72
|
try:
|
|
83
|
-
|
|
73
|
+
url_module_str = f"{app}.urls"
|
|
74
|
+
url_module = import_module(url_module_str)
|
|
75
|
+
slm_include = getattr(url_module, "SLM_INCLUDE", False)
|
|
76
|
+
if not slm_include:
|
|
77
|
+
continue
|
|
84
78
|
api = getattr(url_module, "APIS", None)
|
|
85
79
|
if api:
|
|
86
80
|
for api, endpoints in api.items():
|
|
@@ -95,6 +89,7 @@ def bring_in_urls(urlpatterns):
|
|
|
95
89
|
endpoint[0] if len(endpoint) < 3 else endpoint[2]
|
|
96
90
|
),
|
|
97
91
|
)
|
|
92
|
+
urlpatterns.insert(0, path("", include(url_module_str)))
|
|
98
93
|
|
|
99
94
|
except ImportError:
|
|
100
95
|
if app in {"slm", "slm.map", "network_map", "igs_ext"}:
|
|
@@ -117,7 +112,7 @@ urlpatterns = [
|
|
|
117
112
|
path("", include("slm.urls")),
|
|
118
113
|
]
|
|
119
114
|
|
|
120
|
-
if getattr(settings, "
|
|
115
|
+
if getattr(settings, "SLM_DEBUG_TOOLBAR", False):
|
|
121
116
|
urlpatterns.append(path("__debug__/", include("debug_toolbar.urls")))
|
|
122
117
|
|
|
123
118
|
# allows us to use static files like images
|
slm/settings/validation.py
CHANGED
|
@@ -11,6 +11,7 @@ The format of SLM_DATA_VALIDATORS is
|
|
|
11
11
|
}
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
|
+
from slm.settings import set_default
|
|
14
15
|
from slm.validators import (
|
|
15
16
|
ActiveEquipmentValidator,
|
|
16
17
|
ARPValidator,
|
|
@@ -24,173 +25,172 @@ from slm.validators import (
|
|
|
24
25
|
|
|
25
26
|
# toggling this off will prevent any validation configured to block edit saves
|
|
26
27
|
# from doing so - instead flags will be issued.
|
|
27
|
-
SLM_VALIDATION_BYPASS_BLOCK
|
|
28
|
+
set_default("SLM_VALIDATION_BYPASS_BLOCK", False)
|
|
28
29
|
|
|
29
30
|
# do not allow a log to be published without these sections
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
31
|
+
set_default(
|
|
32
|
+
"SLM_REQUIRED_SECTIONS_TO_PUBLISH",
|
|
33
|
+
[
|
|
34
|
+
"siteform",
|
|
35
|
+
"siteidentification",
|
|
36
|
+
"sitelocation",
|
|
37
|
+
"sitereceiver",
|
|
38
|
+
"siteantenna",
|
|
39
|
+
# 'sitesurveyedlocalties',
|
|
40
|
+
# 'sitefrequencystandard',
|
|
41
|
+
# 'sitecollocation',
|
|
42
|
+
# 'sitehumiditysensor',
|
|
43
|
+
# 'sitepressuresensor',
|
|
44
|
+
# 'sitetemperaturesensor',
|
|
45
|
+
# 'sitewatervaporradiometer',
|
|
46
|
+
# 'siteotherinstrumentation',
|
|
47
|
+
# 'siteradiointerferences',
|
|
48
|
+
# 'sitemultipathsources',
|
|
49
|
+
# 'sitesignalobstructions',
|
|
50
|
+
# 'sitelocalepisodiceffects',
|
|
51
|
+
"siteoperationalcontact",
|
|
52
|
+
# 'siteresponsibleagency',
|
|
53
|
+
# 'sitemoreinformation'
|
|
54
|
+
],
|
|
55
|
+
)
|
|
52
56
|
|
|
53
57
|
# the model field to validator map
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
TimeRangeValidator(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
TimeRangeValidator(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"
|
|
100
|
-
FieldRequired(),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
"
|
|
108
|
-
|
|
109
|
-
FieldRequired(),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
58
|
+
set_default(
|
|
59
|
+
"SLM_DATA_VALIDATORS",
|
|
60
|
+
{
|
|
61
|
+
"slm.SiteIdentification": {
|
|
62
|
+
"site_name": [FieldRequired()],
|
|
63
|
+
"fracture_spacing": [FieldRequired(desired=True), EnumValidator()],
|
|
64
|
+
"iers_domes_number": [FieldRequired()],
|
|
65
|
+
"date_installed": [FieldRequired()],
|
|
66
|
+
},
|
|
67
|
+
"slm.SiteLocation": {
|
|
68
|
+
"city": [FieldRequired()],
|
|
69
|
+
"country": [FieldRequired(), EnumValidator()],
|
|
70
|
+
"tectonic": [EnumValidator()],
|
|
71
|
+
"xyz": [FieldRequired()],
|
|
72
|
+
"llh": [FieldRequired()],
|
|
73
|
+
},
|
|
74
|
+
"slm.SiteReceiver": {
|
|
75
|
+
"receiver_type": [VerifiedEquipmentValidator(), ActiveEquipmentValidator()],
|
|
76
|
+
"satellite_system": [NonEmptyValidator()],
|
|
77
|
+
"serial_number": [FieldRequired()],
|
|
78
|
+
"firmware": [FieldRequired()],
|
|
79
|
+
"installed": [FieldRequired(), TimeRangeValidator(end_field="removed")],
|
|
80
|
+
"removed": [
|
|
81
|
+
TimeRangeValidator(start_field="installed"),
|
|
82
|
+
TimeRangeBookendValidator(),
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
"slm.SiteAntenna": {
|
|
86
|
+
"antenna_type": [VerifiedEquipmentValidator(), ActiveEquipmentValidator()],
|
|
87
|
+
"radome_type": [VerifiedEquipmentValidator(), ActiveEquipmentValidator()],
|
|
88
|
+
"serial_number": [FieldRequired()],
|
|
89
|
+
"reference_point": [FieldRequired(), ARPValidator(), EnumValidator()],
|
|
90
|
+
"installed": [FieldRequired(), TimeRangeValidator(end_field="removed")],
|
|
91
|
+
"removed": [
|
|
92
|
+
TimeRangeValidator(start_field="installed"),
|
|
93
|
+
TimeRangeBookendValidator(),
|
|
94
|
+
],
|
|
95
|
+
"marker_une": [FieldRequired(allow_legacy_nulls=True)],
|
|
96
|
+
"alignment": [FieldRequired(allow_legacy_nulls=True)],
|
|
97
|
+
},
|
|
98
|
+
"slm.SiteSurveyedLocalTies": {
|
|
99
|
+
"name": [FieldRequired()],
|
|
100
|
+
"measured": [FieldRequired(allow_legacy_nulls=True)],
|
|
101
|
+
"diff_xyz": [FieldRequired(allow_legacy_nulls=True)],
|
|
102
|
+
},
|
|
103
|
+
"slm.SiteFrequencyStandard": {
|
|
104
|
+
"standard_type": [FieldRequired(), EnumValidator()],
|
|
105
|
+
"effective_start": [
|
|
106
|
+
FieldRequired(),
|
|
107
|
+
TimeRangeValidator(end_field="effective_end"),
|
|
108
|
+
],
|
|
109
|
+
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
110
|
+
},
|
|
111
|
+
"slm.SiteCollocation": {
|
|
112
|
+
"instrument_type": [FieldRequired()],
|
|
113
|
+
"status": [FieldRequired(allow_legacy_nulls=True), EnumValidator()],
|
|
114
|
+
"effective_start": [
|
|
115
|
+
FieldRequired(),
|
|
116
|
+
TimeRangeValidator(end_field="effective_end"),
|
|
117
|
+
],
|
|
118
|
+
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
119
|
+
},
|
|
120
|
+
"slm.SiteHumiditySensor": {
|
|
121
|
+
"model": [FieldRequired()],
|
|
122
|
+
"manufacturer": [FieldRequired()],
|
|
123
|
+
"height_diff": [FieldRequired(allow_legacy_nulls=True)],
|
|
124
|
+
"effective_start": [TimeRangeValidator(end_field="effective_end")],
|
|
125
|
+
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
126
|
+
"aspiration": [FieldRequired(allow_legacy_nulls=True), EnumValidator()],
|
|
127
|
+
},
|
|
128
|
+
"slm.SitePressureSensor": {
|
|
129
|
+
"model": [FieldRequired()],
|
|
130
|
+
"manufacturer": [FieldRequired()],
|
|
131
|
+
"height_diff": [FieldRequired(allow_legacy_nulls=True)],
|
|
132
|
+
"effective_start": [TimeRangeValidator(end_field="effective_end")],
|
|
133
|
+
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
134
|
+
},
|
|
135
|
+
"slm.SiteTemperatureSensor": {
|
|
136
|
+
"model": [FieldRequired()],
|
|
137
|
+
"manufacturer": [FieldRequired()],
|
|
138
|
+
"height_diff": [FieldRequired(allow_legacy_nulls=True)],
|
|
139
|
+
"effective_start": [TimeRangeValidator(end_field="effective_end")],
|
|
140
|
+
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
141
|
+
"aspiration": [FieldRequired(allow_legacy_nulls=True), EnumValidator()],
|
|
142
|
+
},
|
|
143
|
+
"slm.SiteWaterVaporRadiometer": {
|
|
144
|
+
"model": [FieldRequired()],
|
|
145
|
+
"manufacturer": [FieldRequired()],
|
|
146
|
+
"distance_to_antenna": [FieldRequired(allow_legacy_nulls=True)],
|
|
147
|
+
"height_diff": [FieldRequired(allow_legacy_nulls=True)],
|
|
148
|
+
"effective_start": [TimeRangeValidator(end_field="effective_end")],
|
|
149
|
+
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
150
|
+
},
|
|
151
|
+
"slm.SiteOtherInstrumentation": {"instrumentation": [FieldRequired()]},
|
|
152
|
+
"slm.SiteRadioInterferences": {
|
|
153
|
+
"interferences": [FieldRequired(allow_legacy_nulls=True)],
|
|
154
|
+
"effective_start": [
|
|
155
|
+
FieldRequired(),
|
|
156
|
+
TimeRangeValidator(end_field="effective_end"),
|
|
157
|
+
],
|
|
158
|
+
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
159
|
+
},
|
|
160
|
+
"slm.SiteMultiPathSources": {
|
|
161
|
+
"sources": [FieldRequired(allow_legacy_nulls=True)],
|
|
162
|
+
"effective_start": [
|
|
163
|
+
FieldRequired(),
|
|
164
|
+
TimeRangeValidator(end_field="effective_end"),
|
|
165
|
+
],
|
|
166
|
+
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
167
|
+
},
|
|
168
|
+
"slm.SiteSignalObstructions": {
|
|
169
|
+
"obstructions": [FieldRequired(allow_legacy_nulls=True)],
|
|
170
|
+
"effective_start": [
|
|
171
|
+
FieldRequired(),
|
|
172
|
+
TimeRangeValidator(end_field="effective_end"),
|
|
173
|
+
],
|
|
174
|
+
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
175
|
+
},
|
|
176
|
+
"slm.SiteLocalEpisodicEffects": {
|
|
177
|
+
"event": [FieldRequired(allow_legacy_nulls=True)],
|
|
178
|
+
"effective_start": [
|
|
179
|
+
FieldRequired(),
|
|
180
|
+
TimeRangeValidator(end_field="effective_end"),
|
|
181
|
+
],
|
|
182
|
+
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
183
|
+
},
|
|
184
|
+
"slm.SiteOperationalContact": {
|
|
185
|
+
"agency": [FieldRequired()],
|
|
186
|
+
"preferred_abbreviation": [FieldRequired()],
|
|
187
|
+
"primary_name": [FieldRequired()],
|
|
188
|
+
"primary_phone1": [FieldRequired(desired=True)],
|
|
189
|
+
"primary_email": [FieldRequired(allow_legacy_nulls=True)],
|
|
190
|
+
},
|
|
191
|
+
"slm.SiteMoreInformation": {
|
|
192
|
+
"primary": [FieldRequired()],
|
|
193
|
+
"secondary": [FieldRequired()],
|
|
194
|
+
},
|
|
136
195
|
},
|
|
137
|
-
|
|
138
|
-
"model": [FieldRequired()],
|
|
139
|
-
"manufacturer": [FieldRequired()],
|
|
140
|
-
"distance_to_antenna": [FieldRequired(allow_legacy_nulls=True)],
|
|
141
|
-
"height_diff": [FieldRequired(allow_legacy_nulls=True)],
|
|
142
|
-
"effective_start": [TimeRangeValidator(end_field="effective_end")],
|
|
143
|
-
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
144
|
-
},
|
|
145
|
-
"slm.SiteOtherInstrumentation": {"instrumentation": [FieldRequired()]},
|
|
146
|
-
"slm.SiteRadioInterferences": {
|
|
147
|
-
"interferences": [FieldRequired(allow_legacy_nulls=True)],
|
|
148
|
-
"effective_start": [
|
|
149
|
-
FieldRequired(),
|
|
150
|
-
TimeRangeValidator(end_field="effective_end"),
|
|
151
|
-
],
|
|
152
|
-
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
153
|
-
},
|
|
154
|
-
"slm.SiteMultiPathSources": {
|
|
155
|
-
"sources": [FieldRequired(allow_legacy_nulls=True)],
|
|
156
|
-
"effective_start": [
|
|
157
|
-
FieldRequired(),
|
|
158
|
-
TimeRangeValidator(end_field="effective_end"),
|
|
159
|
-
],
|
|
160
|
-
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
161
|
-
},
|
|
162
|
-
"slm.SiteSignalObstructions": {
|
|
163
|
-
"obstructions": [FieldRequired(allow_legacy_nulls=True)],
|
|
164
|
-
"effective_start": [
|
|
165
|
-
FieldRequired(),
|
|
166
|
-
TimeRangeValidator(end_field="effective_end"),
|
|
167
|
-
],
|
|
168
|
-
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
169
|
-
},
|
|
170
|
-
"slm.SiteLocalEpisodicEffects": {
|
|
171
|
-
"event": [FieldRequired(allow_legacy_nulls=True)],
|
|
172
|
-
"effective_start": [
|
|
173
|
-
FieldRequired(),
|
|
174
|
-
TimeRangeValidator(end_field="effective_end"),
|
|
175
|
-
],
|
|
176
|
-
"effective_end": [TimeRangeValidator(start_field="effective_start")],
|
|
177
|
-
},
|
|
178
|
-
"slm.SiteOperationalContact": {
|
|
179
|
-
"agency": [FieldRequired()],
|
|
180
|
-
"preferred_abbreviation": [FieldRequired()],
|
|
181
|
-
"primary_name": [FieldRequired()],
|
|
182
|
-
"primary_phone1": [FieldRequired(desired=True)],
|
|
183
|
-
"primary_email": [FieldRequired(allow_legacy_nulls=True)],
|
|
184
|
-
},
|
|
185
|
-
"slm.SiteResponsibleAgency": {
|
|
186
|
-
"agency": [FieldRequired()],
|
|
187
|
-
"preferred_abbreviation": [FieldRequired()],
|
|
188
|
-
"primary_name": [FieldRequired()],
|
|
189
|
-
"primary_phone1": [FieldRequired(desired=True)],
|
|
190
|
-
"primary_email": [FieldRequired(allow_legacy_nulls=True)],
|
|
191
|
-
},
|
|
192
|
-
"slm.SiteMoreInformation": {
|
|
193
|
-
"primary": [FieldRequired()],
|
|
194
|
-
"secondary": [FieldRequired()],
|
|
195
|
-
},
|
|
196
|
-
}
|
|
196
|
+
)
|
slm/signals.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""
|
|
2
2
|
All SLM specific signals sent by the system are defined here. These signals
|
|
3
|
-
mostly include events relating to the site log edit/moderate/publish
|
|
3
|
+
mostly include events relating to the site log edit/moderate/publish life cycle.
|
|
4
4
|
|
|
5
5
|
All signals contain a request object that holds the request that initiated the
|
|
6
6
|
event. This object is provided mostly for logging purposes and is not
|
|
@@ -51,6 +51,7 @@ The published timestamp will have increased.
|
|
|
51
51
|
:param site: The Site object.
|
|
52
52
|
:param previous_status: The previous status
|
|
53
53
|
:param new_status: The new status
|
|
54
|
+
:param reverted: If true this status change was the result of a reversion
|
|
54
55
|
:param kwargs: Misc other key word arguments
|
|
55
56
|
"""
|
|
56
57
|
site_status_changed = Signal()
|
|
@@ -156,7 +157,7 @@ site_file_published = Signal()
|
|
|
156
157
|
|
|
157
158
|
|
|
158
159
|
"""
|
|
159
|
-
Sent when a moderator
|
|
160
|
+
Sent when a moderator retracts a site file upload - could be an attachment
|
|
160
161
|
or an image.
|
|
161
162
|
|
|
162
163
|
:param sender: The sending object (unreliable).
|