ebird-api-data 0.2.2__tar.gz → 0.3.0__tar.gz
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.
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/PKG-INFO +1 -1
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/pyproject.toml +2 -2
- ebird_api_data-0.3.0/src/ebird/api/data/__init__.py +1 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/loaders.py +1 -1
- ebird_api_data-0.3.0/src/ebird/api/data/migrations/0001_initial.py +202 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/models/checklist.py +4 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/models/country.py +4 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/models/county.py +4 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/models/filter.py +4 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/models/location.py +4 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/models/observation.py +4 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/models/observer.py +4 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/models/species.py +4 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/models/state.py +4 -0
- ebird_api_data-0.2.2/src/ebird/api/data/__init__.py +0 -1
- ebird_api_data-0.2.2/src/ebird/api/data/migrations/0001_initial.py +0 -927
- ebird_api_data-0.2.2/src/ebird/api/data/migrations/0002_convert_foreign_keys_to_integers.py +0 -103
- ebird_api_data-0.2.2/src/ebird/api/data/migrations/0003_make_codes_and_identifiers_primary_keys.py +0 -93
- ebird_api_data-0.2.2/src/ebird/api/data/migrations/0004_rename_foreign_keys.py +0 -103
- ebird_api_data-0.2.2/src/ebird/api/data/migrations/0005_add_new_foreign_keys.py +0 -104
- ebird_api_data-0.2.2/src/ebird/api/data/migrations/0006_set_new_foreign_keys.py +0 -266
- ebird_api_data-0.2.2/src/ebird/api/data/migrations/0007_remove_old_fields_and_ids.py +0 -188
- ebird_api_data-0.2.2/src/ebird/api/data/migrations/0008_rename_created_checklist_added.py +0 -23
- ebird_api_data-0.2.2/src/ebird/api/data/migrations/0009_add_created_timestamps.py +0 -58
- ebird_api_data-0.2.2/src/ebird/api/data/migrations/0010_alter_species_category.py +0 -18
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/.gitignore +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/LICENSE +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/README.md +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/admin.py +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/apps.py +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/fields.py +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/locale/en/LC_MESSAGES/django.mo +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/locale/en/LC_MESSAGES/django.po +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/management/__init__.py +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/management/commands/__init__.py +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/management/commands/add_checklists.py +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/migrations/__init__.py +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/models/__init__.py +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/templates/admin/data/species/change_list_object_tools.html +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/templates/admin/data/species/fetch_species.html +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/templates/data/widgets/translation_field.html +0 -0
- {ebird_api_data-0.2.2 → ebird_api_data-0.3.0}/src/ebird/api/data/widgets.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ebird-api-data"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
description = "eBird API Data is a reusable Django app for loading data from eBird into a database."
|
|
5
5
|
keywords = ["checklists", "observations", "species", "Django", "eBird", "models"]
|
|
6
6
|
license = "MIT"
|
|
@@ -65,7 +65,7 @@ dev-dependencies = [
|
|
|
65
65
|
]
|
|
66
66
|
|
|
67
67
|
[tool.bumpversion]
|
|
68
|
-
current_version = "0.
|
|
68
|
+
current_version = "0.3.0"
|
|
69
69
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
|
70
70
|
serialize = ["{major}.{minor}.{patch}"]
|
|
71
71
|
ignore_missing_version = false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.0"
|
|
@@ -221,7 +221,7 @@ class APILoader:
|
|
|
221
221
|
values["taxon_order"] = int(data["taxonOrder"])
|
|
222
222
|
values["order"] = data.get("order", "")
|
|
223
223
|
values["category"] = data["category"]
|
|
224
|
-
values["family_code"] = data
|
|
224
|
+
values["family_code"] = data.get("familyCode", "")
|
|
225
225
|
values["common_name"][language] = data["comName"]
|
|
226
226
|
values["scientific_name"] = data["sciName"]
|
|
227
227
|
values["family_common_name"][language] = data["familyComName"]
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Generated by Django 5.2.4 on 2025-07-24 12:40
|
|
2
|
+
|
|
3
|
+
import django.core.validators
|
|
4
|
+
import django.db.models.deletion
|
|
5
|
+
from django.db import migrations, models
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Migration(migrations.Migration):
|
|
9
|
+
|
|
10
|
+
initial = True
|
|
11
|
+
|
|
12
|
+
dependencies = [
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
operations = [
|
|
16
|
+
migrations.CreateModel(
|
|
17
|
+
name='Country',
|
|
18
|
+
fields=[
|
|
19
|
+
('code', models.CharField(help_text='The code used to identify the country.', max_length=2, primary_key=True, serialize=False, verbose_name='code')),
|
|
20
|
+
('name', models.TextField(help_text='The name of the country.', verbose_name='name')),
|
|
21
|
+
('place', models.TextField(help_text='The hierarchical name of the country.', verbose_name='place')),
|
|
22
|
+
('created', models.DateTimeField(auto_now_add=True, help_text='When was the record created.', null=True)),
|
|
23
|
+
('modified', models.DateTimeField(auto_now=True, help_text='When was the record updated.', null=True)),
|
|
24
|
+
],
|
|
25
|
+
options={
|
|
26
|
+
'verbose_name': 'country',
|
|
27
|
+
'verbose_name_plural': 'countries',
|
|
28
|
+
},
|
|
29
|
+
),
|
|
30
|
+
migrations.CreateModel(
|
|
31
|
+
name='County',
|
|
32
|
+
fields=[
|
|
33
|
+
('code', models.CharField(help_text='The code used to identify the county.', max_length=10, primary_key=True, serialize=False, verbose_name='code')),
|
|
34
|
+
('name', models.TextField(help_text='The name of the county.', verbose_name='name')),
|
|
35
|
+
('place', models.TextField(help_text='The hierarchical name of the county.', verbose_name='place')),
|
|
36
|
+
('created', models.DateTimeField(auto_now_add=True, help_text='When was the record created.', null=True)),
|
|
37
|
+
('modified', models.DateTimeField(auto_now=True, help_text='When was the record updated.', null=True)),
|
|
38
|
+
],
|
|
39
|
+
options={
|
|
40
|
+
'verbose_name': 'county',
|
|
41
|
+
'verbose_name_plural': 'counties',
|
|
42
|
+
},
|
|
43
|
+
),
|
|
44
|
+
migrations.CreateModel(
|
|
45
|
+
name='Observer',
|
|
46
|
+
fields=[
|
|
47
|
+
('identifier', models.CharField(help_text='The code for the person submitted the checklist.', max_length=15, primary_key=True, serialize=False, verbose_name='identifier')),
|
|
48
|
+
('name', models.TextField(help_text='The display name of the observer.', verbose_name='name')),
|
|
49
|
+
('original', models.TextField(help_text='The original name of the observer from eBird.', verbose_name='original name')),
|
|
50
|
+
('multiple', models.BooleanField(default=False, help_text='Is the name used by more than one eBird account.', verbose_name='Multiple accounts')),
|
|
51
|
+
('enabled', models.BooleanField(default=True, help_text='Load checklists from the eBird observer.', verbose_name='Enabled')),
|
|
52
|
+
('data', models.JSONField(blank=True, default=dict, help_text='Data describing an Observer.', verbose_name='Data')),
|
|
53
|
+
('created', models.DateTimeField(auto_now_add=True, help_text='When was the record created.', null=True)),
|
|
54
|
+
('modified', models.DateTimeField(auto_now=True, help_text='When was the record updated.', null=True)),
|
|
55
|
+
],
|
|
56
|
+
options={
|
|
57
|
+
'verbose_name': 'observer',
|
|
58
|
+
'verbose_name_plural': 'observers',
|
|
59
|
+
},
|
|
60
|
+
),
|
|
61
|
+
migrations.CreateModel(
|
|
62
|
+
name='Species',
|
|
63
|
+
fields=[
|
|
64
|
+
('taxon_order', models.IntegerField(blank=True, help_text='The position in the eBird/Clements taxonomic order.', null=True, verbose_name='taxonomy order')),
|
|
65
|
+
('order', models.TextField(blank=True, help_text='The order, e.g. Struthioniformes, from the eBird/Clements taxonomy.', verbose_name='order')),
|
|
66
|
+
('category', models.TextField(blank=True, choices=[('species', 'Species'), ('slash', 'Species pairs'), ('issf', 'Subspecies'), ('domestic', 'Domestic species'), ('hybrid', 'Hybrids'), ('form', 'Species forms'), ('spuh', 'Unidentified species'), ('intergrade', 'Intergrades')], help_text='The category from the eBird/Clements taxonomy.', verbose_name='category')),
|
|
67
|
+
('species_code', models.CharField(help_text='The species code, e.g. ostric2, used in the eBird API.', max_length=10, primary_key=True, serialize=False, verbose_name='species code')),
|
|
68
|
+
('family_code', models.TextField(blank=True, help_text='The family code, e.g. struth1, used in the eBird API.', verbose_name='family code')),
|
|
69
|
+
('common_name', models.TextField(help_text='The species common name in the eBird/Clements taxonomy.', verbose_name='common name')),
|
|
70
|
+
('scientific_name', models.TextField(help_text='The species scientific name in the eBird/Clements taxonomy.', verbose_name='scientific name')),
|
|
71
|
+
('family_common_name', models.TextField(blank=True, help_text='The common name for the species family in the eBird/Clements taxonomy.', verbose_name='family common name')),
|
|
72
|
+
('family_scientific_name', models.TextField(blank=True, help_text='The scientific name for the species family in the eBird/Clements taxonomy.', verbose_name='family scientific name')),
|
|
73
|
+
('data', models.JSONField(blank=True, default=dict, help_text='Data describing a Species.', verbose_name='Data')),
|
|
74
|
+
('created', models.DateTimeField(auto_now_add=True, help_text='When was the record created.', null=True)),
|
|
75
|
+
('modified', models.DateTimeField(auto_now=True, help_text='When was the record updated.', null=True)),
|
|
76
|
+
],
|
|
77
|
+
options={
|
|
78
|
+
'verbose_name': 'species',
|
|
79
|
+
'verbose_name_plural': 'species',
|
|
80
|
+
},
|
|
81
|
+
),
|
|
82
|
+
migrations.CreateModel(
|
|
83
|
+
name='State',
|
|
84
|
+
fields=[
|
|
85
|
+
('code', models.CharField(help_text='The code used to identify the state.', max_length=6, primary_key=True, serialize=False, verbose_name='code')),
|
|
86
|
+
('name', models.TextField(help_text='The name of the state.', verbose_name='name')),
|
|
87
|
+
('place', models.TextField(help_text='The hierarchical name of the state.', verbose_name='place')),
|
|
88
|
+
('created', models.DateTimeField(auto_now_add=True, help_text='When was the record created.', null=True)),
|
|
89
|
+
('modified', models.DateTimeField(auto_now=True, help_text='When was the record updated.', null=True)),
|
|
90
|
+
],
|
|
91
|
+
options={
|
|
92
|
+
'verbose_name': 'state',
|
|
93
|
+
'verbose_name_plural': 'states',
|
|
94
|
+
},
|
|
95
|
+
),
|
|
96
|
+
migrations.CreateModel(
|
|
97
|
+
name='Location',
|
|
98
|
+
fields=[
|
|
99
|
+
('identifier', models.CharField(help_text='The unique identifier for the location.', max_length=15, primary_key=True, serialize=False, verbose_name='identifier')),
|
|
100
|
+
('original', models.TextField(help_text='The original name of the location from eBird.', verbose_name='original name')),
|
|
101
|
+
('name', models.TextField(help_text='The display name of the location.', verbose_name='name')),
|
|
102
|
+
('latitude', models.DecimalField(blank=True, decimal_places=7, help_text='The decimal latitude of the location, relative to the equator.', max_digits=9, null=True, verbose_name='latitude')),
|
|
103
|
+
('longitude', models.DecimalField(blank=True, decimal_places=7, help_text='The decimal longitude of the location, relative to the prime meridian.', max_digits=10, null=True, verbose_name='longitude')),
|
|
104
|
+
('url', models.URLField(blank=True, help_text='URL of the location page on eBird.', verbose_name='url')),
|
|
105
|
+
('hotspot', models.BooleanField(blank=True, help_text='Is the location a hotspot.', null=True, verbose_name='is hotspot')),
|
|
106
|
+
('data', models.JSONField(blank=True, default=dict, help_text='Data describing a Location.', verbose_name='Data')),
|
|
107
|
+
('created', models.DateTimeField(auto_now_add=True, help_text='When was the record created.', null=True)),
|
|
108
|
+
('modified', models.DateTimeField(auto_now=True, help_text='When was the record updated.', null=True)),
|
|
109
|
+
('country', models.ForeignKey(help_text='The country for the location.', on_delete=django.db.models.deletion.PROTECT, related_name='locations', to='data.country', verbose_name='country')),
|
|
110
|
+
('county', models.ForeignKey(blank=True, help_text='The county for the location.', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='locations', to='data.county', verbose_name='county')),
|
|
111
|
+
('state', models.ForeignKey(help_text='The state for the location.', on_delete=django.db.models.deletion.PROTECT, related_name='locations', to='data.state', verbose_name='state')),
|
|
112
|
+
],
|
|
113
|
+
options={
|
|
114
|
+
'verbose_name': 'location',
|
|
115
|
+
'verbose_name_plural': 'locations',
|
|
116
|
+
},
|
|
117
|
+
),
|
|
118
|
+
migrations.CreateModel(
|
|
119
|
+
name='Checklist',
|
|
120
|
+
fields=[
|
|
121
|
+
('added', models.DateTimeField(blank=True, help_text='The date and time the checklist was added to eBird.', null=True, verbose_name='added')),
|
|
122
|
+
('edited', models.DateTimeField(blank=True, help_text='The date and time the eBird checklist was last edited.', null=True, verbose_name='edited')),
|
|
123
|
+
('published', models.BooleanField(help_text='Is the checklist published?', verbose_name='published')),
|
|
124
|
+
('identifier', models.CharField(help_text='The unique identifier for the checklist.', max_length=15, primary_key=True, serialize=False, verbose_name='identifier')),
|
|
125
|
+
('observer_count', models.IntegerField(blank=True, help_text='The total number of observers.', null=True, verbose_name='observer count')),
|
|
126
|
+
('species_count', models.IntegerField(blank=True, help_text='The number of species reported.', null=True, verbose_name='species count')),
|
|
127
|
+
('date', models.DateField(db_index=True, help_text='The date the checklist was started.', verbose_name='date')),
|
|
128
|
+
('time', models.TimeField(blank=True, help_text='The time the checklist was started.', null=True, verbose_name='time')),
|
|
129
|
+
('started', models.DateTimeField(blank=True, db_index=True, help_text='The date and time the checklist was started.', null=True, verbose_name='date & time')),
|
|
130
|
+
('protocol_code', models.TextField(blank=True, help_text='The code used to identify the protocol.', verbose_name='protocol code')),
|
|
131
|
+
('project_code', models.TextField(blank=True, help_text='The code used to identify the project (portal).', verbose_name='project code')),
|
|
132
|
+
('duration', models.IntegerField(blank=True, help_text='The number of minutes spent counting.', null=True, verbose_name='duration')),
|
|
133
|
+
('distance', models.DecimalField(blank=True, decimal_places=3, help_text='The distance, in metres, covered while travelling.', max_digits=6, null=True, verbose_name='distance')),
|
|
134
|
+
('area', models.DecimalField(blank=True, decimal_places=3, help_text='The area covered, in hectares.', max_digits=6, null=True, verbose_name='area')),
|
|
135
|
+
('complete', models.BooleanField(default=False, help_text='All species seen are reported.', verbose_name='complete')),
|
|
136
|
+
('comments', models.TextField(blank=True, help_text='Any comments about the checklist.', verbose_name='comments')),
|
|
137
|
+
('url', models.URLField(blank=True, help_text='URL where the original checklist can be viewed.', verbose_name='url')),
|
|
138
|
+
('data', models.JSONField(blank=True, default=dict, help_text='Data describing a Checklist.', verbose_name='Data')),
|
|
139
|
+
('created', models.DateTimeField(auto_now_add=True, help_text='When was the record created.', null=True)),
|
|
140
|
+
('modified', models.DateTimeField(auto_now=True, help_text='When was the record updated.', null=True)),
|
|
141
|
+
('country', models.ForeignKey(help_text='The country where the checklist was made.', on_delete=django.db.models.deletion.PROTECT, related_name='checklists', to='data.country', verbose_name='country')),
|
|
142
|
+
('county', models.ForeignKey(blank=True, help_text='The county where the checklist was made.', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='checklists', to='data.county', verbose_name='county')),
|
|
143
|
+
('location', models.ForeignKey(help_text='The location where checklist was made.', on_delete=django.db.models.deletion.PROTECT, related_name='checklists', to='data.location', verbose_name='location')),
|
|
144
|
+
('observer', models.ForeignKey(help_text='The person who submitted the checklist.', on_delete=django.db.models.deletion.PROTECT, related_name='checklists', to='data.observer', verbose_name='observer')),
|
|
145
|
+
('state', models.ForeignKey(help_text='The state where the checklist was made.', on_delete=django.db.models.deletion.PROTECT, related_name='checklists', to='data.state', verbose_name='state')),
|
|
146
|
+
],
|
|
147
|
+
options={
|
|
148
|
+
'verbose_name': 'checklist',
|
|
149
|
+
'verbose_name_plural': 'checklists',
|
|
150
|
+
},
|
|
151
|
+
),
|
|
152
|
+
migrations.CreateModel(
|
|
153
|
+
name='Filter',
|
|
154
|
+
fields=[
|
|
155
|
+
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
156
|
+
('enabled', models.BooleanField(help_text='Is the filter active?', verbose_name='enabled')),
|
|
157
|
+
('name', models.TextField(help_text='The name of the filter.', verbose_name='name')),
|
|
158
|
+
('created', models.DateTimeField(auto_now_add=True, help_text='When was the record created.', null=True)),
|
|
159
|
+
('modified', models.DateTimeField(auto_now=True, help_text='When was the record updated.', null=True)),
|
|
160
|
+
('location', models.ForeignKey(blank=True, help_text='The location used to find matching Observations.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='filtered_on', to='data.location', verbose_name='location')),
|
|
161
|
+
('species', models.ForeignKey(help_text='The species used to find matching Observations.', on_delete=django.db.models.deletion.CASCADE, related_name='filtered_on', to='data.species', verbose_name='species')),
|
|
162
|
+
('update_species', models.ForeignKey(help_text='Matching Observations are updated to this species.', on_delete=django.db.models.deletion.CASCADE, related_name='filtered_by', to='data.species', verbose_name='update species')),
|
|
163
|
+
],
|
|
164
|
+
options={
|
|
165
|
+
'verbose_name': 'filter',
|
|
166
|
+
'verbose_name_plural': 'filters',
|
|
167
|
+
},
|
|
168
|
+
),
|
|
169
|
+
migrations.CreateModel(
|
|
170
|
+
name='Observation',
|
|
171
|
+
fields=[
|
|
172
|
+
('edited', models.DateTimeField(blank=True, help_text='The date and time the eBird checklist was last edited.', null=True, verbose_name='edited')),
|
|
173
|
+
('published', models.BooleanField(help_text='Is the observation published?', verbose_name='published')),
|
|
174
|
+
('identifier', models.CharField(help_text='A global unique identifier for the observation.', max_length=15, primary_key=True, serialize=False, verbose_name='identifier')),
|
|
175
|
+
('date', models.DateField(db_index=True, help_text='The date the observation was made.', verbose_name='date')),
|
|
176
|
+
('time', models.TimeField(blank=True, help_text='The time the observation was made.', null=True, verbose_name='time')),
|
|
177
|
+
('started', models.DateTimeField(blank=True, db_index=True, help_text='The date and time the observation was made.', null=True, verbose_name='date & time')),
|
|
178
|
+
('count', models.IntegerField(help_text='The number of birds seen.', validators=[django.core.validators.MinValueValidator(0)], verbose_name='count')),
|
|
179
|
+
('audio', models.BooleanField(default=False, help_text='Have audio recordings been uploaded to the Macaulay library.', verbose_name='has audio')),
|
|
180
|
+
('photo', models.BooleanField(default=False, help_text='Have photos been uploaded to the Macaulay library.', verbose_name='has photos')),
|
|
181
|
+
('video', models.BooleanField(default=False, help_text='Have video recordings been uploaded to the Macaulay library.', verbose_name='has video')),
|
|
182
|
+
('approved', models.BooleanField(default=True, help_text='Has the observation been accepted.', verbose_name='Approved')),
|
|
183
|
+
('reason', models.TextField(blank=True, help_text='The reason given for the observation to be marked as not approved.', verbose_name='Reason')),
|
|
184
|
+
('comments', models.TextField(blank=True, help_text='Any comments about the observation.', verbose_name='comments')),
|
|
185
|
+
('urn', models.TextField(blank=True, help_text='The globally unique identifier for the observation.', verbose_name='URN')),
|
|
186
|
+
('data', models.JSONField(blank=True, default=dict, help_text='Data describing an Observation.', verbose_name='Data')),
|
|
187
|
+
('created', models.DateTimeField(auto_now_add=True, help_text='When was the record created.', null=True)),
|
|
188
|
+
('modified', models.DateTimeField(auto_now=True, help_text='When was the record updated.', null=True)),
|
|
189
|
+
('checklist', models.ForeignKey(help_text='The checklist this observation belongs to.', on_delete=django.db.models.deletion.CASCADE, related_name='observations', to='data.checklist', verbose_name='checklist')),
|
|
190
|
+
('country', models.ForeignKey(help_text='The country where the observation was made.', on_delete=django.db.models.deletion.PROTECT, related_name='observations', to='data.country', verbose_name='country')),
|
|
191
|
+
('county', models.ForeignKey(blank=True, help_text='The county where the observation was made.', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='observations', to='data.county', verbose_name='county')),
|
|
192
|
+
('location', models.ForeignKey(help_text='The location where the observation was made.', on_delete=django.db.models.deletion.PROTECT, related_name='observations', to='data.location', verbose_name='location')),
|
|
193
|
+
('observer', models.ForeignKey(help_text='The person who made the observation.', on_delete=django.db.models.deletion.PROTECT, related_name='observations', to='data.observer', verbose_name='observer')),
|
|
194
|
+
('species', models.ForeignKey(help_text='The identified species.', on_delete=django.db.models.deletion.PROTECT, related_name='observations', to='data.species', verbose_name='species')),
|
|
195
|
+
('state', models.ForeignKey(help_text='The state where the observation was made.', on_delete=django.db.models.deletion.PROTECT, related_name='observations', to='data.state', verbose_name='state')),
|
|
196
|
+
],
|
|
197
|
+
options={
|
|
198
|
+
'verbose_name': 'observation',
|
|
199
|
+
'verbose_name_plural': 'observations',
|
|
200
|
+
},
|
|
201
|
+
),
|
|
202
|
+
]
|
|
@@ -192,6 +192,10 @@ class Checklist(models.Model):
|
|
|
192
192
|
null=True, auto_now_add=True, help_text=_("When was the record created.")
|
|
193
193
|
)
|
|
194
194
|
|
|
195
|
+
modified = models.DateTimeField(
|
|
196
|
+
null=True, auto_now=True, help_text=_("When was the record updated.")
|
|
197
|
+
)
|
|
198
|
+
|
|
195
199
|
def __repr__(self) -> str:
|
|
196
200
|
return str(self.identifier)
|
|
197
201
|
|
|
@@ -26,6 +26,10 @@ class Country(models.Model):
|
|
|
26
26
|
null=True, auto_now_add=True, help_text=_("When was the record created.")
|
|
27
27
|
)
|
|
28
28
|
|
|
29
|
+
modified = models.DateTimeField(
|
|
30
|
+
null=True, auto_now=True, help_text=_("When was the record updated.")
|
|
31
|
+
)
|
|
32
|
+
|
|
29
33
|
def __repr__(self) -> str:
|
|
30
34
|
return str(self.code)
|
|
31
35
|
|
|
@@ -26,6 +26,10 @@ class County(models.Model):
|
|
|
26
26
|
null=True, auto_now_add=True, help_text=_("When was the record created.")
|
|
27
27
|
)
|
|
28
28
|
|
|
29
|
+
modified = models.DateTimeField(
|
|
30
|
+
null=True, auto_now=True, help_text=_("When was the record updated.")
|
|
31
|
+
)
|
|
32
|
+
|
|
29
33
|
def __repr__(self) -> str:
|
|
30
34
|
return str(self.code)
|
|
31
35
|
|
|
@@ -52,6 +52,10 @@ class Filter(models.Model):
|
|
|
52
52
|
null=True, auto_now_add=True, help_text=_("When was the record created.")
|
|
53
53
|
)
|
|
54
54
|
|
|
55
|
+
modified = models.DateTimeField(
|
|
56
|
+
null=True, auto_now=True, help_text=_("When was the record updated.")
|
|
57
|
+
)
|
|
58
|
+
|
|
55
59
|
def __repr__(self) -> str:
|
|
56
60
|
return str(self.name)
|
|
57
61
|
|
|
@@ -151,6 +151,10 @@ class Location(models.Model):
|
|
|
151
151
|
null=True, auto_now_add=True, help_text=_("When was the record created.")
|
|
152
152
|
)
|
|
153
153
|
|
|
154
|
+
modified = models.DateTimeField(
|
|
155
|
+
null=True, auto_now=True, help_text=_("When was the record updated.")
|
|
156
|
+
)
|
|
157
|
+
|
|
154
158
|
def __repr__(self) -> str:
|
|
155
159
|
return str(self.identifier)
|
|
156
160
|
|
|
@@ -175,6 +175,10 @@ class Observation(models.Model):
|
|
|
175
175
|
null=True, auto_now_add=True, help_text=_("When was the record created.")
|
|
176
176
|
)
|
|
177
177
|
|
|
178
|
+
modified = models.DateTimeField(
|
|
179
|
+
null=True, auto_now=True, help_text=_("When was the record updated.")
|
|
180
|
+
)
|
|
181
|
+
|
|
178
182
|
def __repr__(self) -> str:
|
|
179
183
|
return str(self.identifier)
|
|
180
184
|
|
|
@@ -47,6 +47,10 @@ class Observer(models.Model):
|
|
|
47
47
|
null=True, auto_now_add=True, help_text=_("When was the record created.")
|
|
48
48
|
)
|
|
49
49
|
|
|
50
|
+
modified = models.DateTimeField(
|
|
51
|
+
null=True, auto_now=True, help_text=_("When was the record updated.")
|
|
52
|
+
)
|
|
53
|
+
|
|
50
54
|
def __repr__(self) -> str:
|
|
51
55
|
return str(self.identifier)
|
|
52
56
|
|
|
@@ -97,6 +97,10 @@ class Species(models.Model):
|
|
|
97
97
|
null=True, auto_now_add=True, help_text=_("When was the record created.")
|
|
98
98
|
)
|
|
99
99
|
|
|
100
|
+
modified = models.DateTimeField(
|
|
101
|
+
null=True, auto_now=True, help_text=_("When was the record updated.")
|
|
102
|
+
)
|
|
103
|
+
|
|
100
104
|
def __repr__(self) -> str:
|
|
101
105
|
return str(self.species_code)
|
|
102
106
|
|
|
@@ -26,6 +26,10 @@ class State(models.Model):
|
|
|
26
26
|
null=True, auto_now_add=True, help_text=_("When was the record created.")
|
|
27
27
|
)
|
|
28
28
|
|
|
29
|
+
modified = models.DateTimeField(
|
|
30
|
+
null=True, auto_now=True, help_text=_("When was the record updated.")
|
|
31
|
+
)
|
|
32
|
+
|
|
29
33
|
def __repr__(self) -> str:
|
|
30
34
|
return str(self.code)
|
|
31
35
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.2"
|