drf-appkit 1.4.3__tar.gz → 1.4.5__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.
- {drf-appkit-1.4.3/drf_appkit.egg-info → drf_appkit-1.4.5}/PKG-INFO +1 -1
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/api/serializers.py +4 -1
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0018_place_geoposition.py +1 -1
- drf_appkit-1.4.5/appkit/migrations/0023_delete_usergroup.py +16 -0
- drf_appkit-1.4.5/appkit/migrations/0024_place_city_place_country_place_postal_code_and_more.py +33 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/models.py +5 -21
- {drf-appkit-1.4.3 → drf_appkit-1.4.5/drf_appkit.egg-info}/PKG-INFO +1 -1
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/drf_appkit.egg-info/SOURCES.txt +2 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/setup.cfg +1 -1
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/LICENSE +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/MANIFEST.in +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/README.md +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/__init__.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/api/__init__.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/api/filters.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/api/mixins.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/api/pagination.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/api/relations.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/api/renderers.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/api/tests.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/api/views.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/apps.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/auth/__init__.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/auth/backends.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/auth/decorators.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/auth/email.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/auth/permissions.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/debug.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf/__init__.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf/adapters.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf/authentication.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf/backends.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf/endpoints.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf/exceptions.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf/fields.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf/filters.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf/mixins.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf/permissions.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf/serializers.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf_appkit.egg-info/PKG-INFO +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf_appkit.egg-info/SOURCES.txt +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf_appkit.egg-info/dependency_links.txt +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/drf_appkit.egg-info/top_level.txt +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/forms/__init__.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/forms/widgets.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/handlers.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/jinja2/appkit/forms/widgets/money_widget.html +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/managers.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0001_initial.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0002_arrangement_tags.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0003_auto_20210221_0852.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0004_auto_20210309_0655.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0005_auto_20210324_1046.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0006_sitealias.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0007_auto_20211021_1901.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0008_update_autofields.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0009_alter_arrangement_unique_together_and_more.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0010_arrangement_name.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0011_alter_sitealias_options.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0012_alter_sitealias_site.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0013_usergroup.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0014_remove_note_notes_note_content_type_note_object_id.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0015_alter_note_content_type_alter_note_object_id.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0016_alter_arrangementitem_unique_together_and_more.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0017_alter_imageattachment_image.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0019_alter_place_geoposition.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0020_remove_arrangement_type_arrangement_content_type.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0021_rename_content_type_arrangement_item_type.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/0022_imageattachment_rendition_key_imageattachment_warm.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/migrations/__init__.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/notification.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/settings.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/shortcuts.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/storages.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/tasks.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/tests.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/transformers.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/util.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/appkit/views.py +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/drf_appkit.egg-info/dependency_links.txt +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/drf_appkit.egg-info/top_level.txt +0 -0
- {drf-appkit-1.4.3 → drf_appkit-1.4.5}/setup.py +0 -0
|
@@ -139,7 +139,10 @@ class PlaceSerializer(serializers.ModelSerializer):
|
|
|
139
139
|
|
|
140
140
|
class Meta:
|
|
141
141
|
model = Place
|
|
142
|
-
fields = (
|
|
142
|
+
fields = (
|
|
143
|
+
'place_id', 'info',
|
|
144
|
+
'city', 'state', 'country', 'postal_code',
|
|
145
|
+
)
|
|
143
146
|
|
|
144
147
|
|
|
145
148
|
class RegionSerializer(serializers.HyperlinkedModelSerializer):
|
|
@@ -29,5 +29,5 @@ class Migration(migrations.Migration):
|
|
|
29
29
|
field=django.contrib.gis.db.models.fields.PointField(blank=True, geography=True, null=True, srid=4326),
|
|
30
30
|
),
|
|
31
31
|
|
|
32
|
-
migrations.RunPython(populate_existing_place_geopositions, reverse_code=migrations.RunPython.noop)
|
|
32
|
+
migrations.RunPython(populate_existing_place_geopositions, reverse_code=migrations.RunPython.noop, elidable=True)
|
|
33
33
|
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Generated by Django 4.2.11 on 2024-04-09 04:11
|
|
2
|
+
|
|
3
|
+
from django.db import migrations
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
('appkit', '0022_imageattachment_rendition_key_imageattachment_warm'),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.DeleteModel(
|
|
14
|
+
name='UserGroup',
|
|
15
|
+
),
|
|
16
|
+
]
|
drf_appkit-1.4.5/appkit/migrations/0024_place_city_place_country_place_postal_code_and_more.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Generated by Django 4.2.11 on 2024-04-14 14:48
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
('appkit', '0023_delete_usergroup'),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AddField(
|
|
14
|
+
model_name='place',
|
|
15
|
+
name='city',
|
|
16
|
+
field=models.CharField(blank=True, max_length=50),
|
|
17
|
+
),
|
|
18
|
+
migrations.AddField(
|
|
19
|
+
model_name='place',
|
|
20
|
+
name='country',
|
|
21
|
+
field=models.CharField(blank=True, max_length=30),
|
|
22
|
+
),
|
|
23
|
+
migrations.AddField(
|
|
24
|
+
model_name='place',
|
|
25
|
+
name='postal_code',
|
|
26
|
+
field=models.CharField(blank=True, max_length=7),
|
|
27
|
+
),
|
|
28
|
+
migrations.AddField(
|
|
29
|
+
model_name='place',
|
|
30
|
+
name='state',
|
|
31
|
+
field=models.CharField(blank=True, max_length=2),
|
|
32
|
+
),
|
|
33
|
+
]
|
|
@@ -167,26 +167,18 @@ class ModelBase(models.Model):
|
|
|
167
167
|
class Place(ModelBase):
|
|
168
168
|
place_id = models.CharField(max_length=255, unique=True)
|
|
169
169
|
geoposition = PointField(geography=True)
|
|
170
|
+
|
|
170
171
|
info = models.JSONField()
|
|
172
|
+
city = models.CharField(max_length=50, blank=True)
|
|
173
|
+
state = models.CharField(max_length=2, blank=True)
|
|
174
|
+
country = models.CharField(max_length=30, blank=True)
|
|
175
|
+
postal_code = models.CharField(max_length=7, blank=True)
|
|
171
176
|
|
|
172
177
|
def __str__(self):
|
|
173
178
|
if 'formatted_address' in self.info:
|
|
174
179
|
return self.info['formatted_address']
|
|
175
180
|
return self.place_id
|
|
176
181
|
|
|
177
|
-
@property
|
|
178
|
-
def city(self):
|
|
179
|
-
formatted_address = self.info.get('formatted_address')
|
|
180
|
-
if formatted_address:
|
|
181
|
-
try:
|
|
182
|
-
# ASSUME: address is of the form: <city>, <state>, <country>
|
|
183
|
-
# and <state> is exactly two characters
|
|
184
|
-
return formatted_address[0:formatted_address.index(',') + 4]
|
|
185
|
-
except ValueError:
|
|
186
|
-
return None
|
|
187
|
-
|
|
188
|
-
return None
|
|
189
|
-
|
|
190
182
|
|
|
191
183
|
class Region(MP_Node):
|
|
192
184
|
name = models.CharField(max_length=150)
|
|
@@ -410,14 +402,6 @@ class SiteAlias(ModelBase):
|
|
|
410
402
|
verbose_name_plural = _('Site Aliases')
|
|
411
403
|
|
|
412
404
|
|
|
413
|
-
class UserGroup(Document):
|
|
414
|
-
group = models.OneToOneField(Group, on_delete=models.CASCADE)
|
|
415
|
-
description = models.CharField(max_length=512, blank=True)
|
|
416
|
-
|
|
417
|
-
def __str__(self):
|
|
418
|
-
return str(self.group)
|
|
419
|
-
|
|
420
|
-
|
|
421
405
|
# ------------------------------------------------------------------------------
|
|
422
406
|
document_event = ModelSignal(use_caching=True)
|
|
423
407
|
|
|
@@ -72,6 +72,8 @@ appkit/migrations/0019_alter_place_geoposition.py
|
|
|
72
72
|
appkit/migrations/0020_remove_arrangement_type_arrangement_content_type.py
|
|
73
73
|
appkit/migrations/0021_rename_content_type_arrangement_item_type.py
|
|
74
74
|
appkit/migrations/0022_imageattachment_rendition_key_imageattachment_warm.py
|
|
75
|
+
appkit/migrations/0023_delete_usergroup.py
|
|
76
|
+
appkit/migrations/0024_place_city_place_country_place_postal_code_and_more.py
|
|
75
77
|
appkit/migrations/__init__.py
|
|
76
78
|
drf_appkit.egg-info/PKG-INFO
|
|
77
79
|
drf_appkit.egg-info/SOURCES.txt
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|