drf-appkit 1.4.5__tar.gz → 1.4.6__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.5/drf_appkit.egg-info → drf_appkit-1.4.6}/PKG-INFO +1 -1
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/models.py +5 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/transformers.py +16 -1
- {drf_appkit-1.4.5 → drf_appkit-1.4.6/drf_appkit.egg-info}/PKG-INFO +1 -1
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/setup.cfg +1 -1
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/LICENSE +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/MANIFEST.in +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/README.md +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/__init__.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/api/__init__.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/api/filters.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/api/mixins.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/api/pagination.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/api/relations.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/api/renderers.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/api/serializers.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/api/tests.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/api/views.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/apps.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/auth/__init__.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/auth/backends.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/auth/decorators.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/auth/email.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/auth/permissions.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/debug.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf/__init__.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf/adapters.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf/authentication.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf/backends.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf/endpoints.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf/exceptions.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf/fields.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf/filters.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf/mixins.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf/permissions.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf/serializers.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf_appkit.egg-info/PKG-INFO +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf_appkit.egg-info/SOURCES.txt +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf_appkit.egg-info/dependency_links.txt +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/drf_appkit.egg-info/top_level.txt +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/forms/__init__.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/forms/widgets.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/handlers.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/jinja2/appkit/forms/widgets/money_widget.html +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/managers.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0001_initial.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0002_arrangement_tags.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0003_auto_20210221_0852.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0004_auto_20210309_0655.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0005_auto_20210324_1046.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0006_sitealias.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0007_auto_20211021_1901.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0008_update_autofields.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0009_alter_arrangement_unique_together_and_more.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0010_arrangement_name.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0011_alter_sitealias_options.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0012_alter_sitealias_site.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0013_usergroup.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0014_remove_note_notes_note_content_type_note_object_id.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0015_alter_note_content_type_alter_note_object_id.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0016_alter_arrangementitem_unique_together_and_more.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0017_alter_imageattachment_image.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0018_place_geoposition.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0019_alter_place_geoposition.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0020_remove_arrangement_type_arrangement_content_type.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0021_rename_content_type_arrangement_item_type.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0022_imageattachment_rendition_key_imageattachment_warm.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0023_delete_usergroup.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/0024_place_city_place_country_place_postal_code_and_more.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/migrations/__init__.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/notification.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/settings.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/shortcuts.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/storages.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/tasks.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/tests.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/util.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/appkit/views.py +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/drf_appkit.egg-info/SOURCES.txt +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/drf_appkit.egg-info/dependency_links.txt +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/drf_appkit.egg-info/top_level.txt +0 -0
- {drf_appkit-1.4.5 → drf_appkit-1.4.6}/setup.py +0 -0
|
@@ -179,6 +179,11 @@ class Place(ModelBase):
|
|
|
179
179
|
return self.info['formatted_address']
|
|
180
180
|
return self.place_id
|
|
181
181
|
|
|
182
|
+
@property
|
|
183
|
+
def address_parts(self):
|
|
184
|
+
formatted_address = self.info.get('formatted_address', '')
|
|
185
|
+
return formatted_address.split(', ')
|
|
186
|
+
|
|
182
187
|
|
|
183
188
|
class Region(MP_Node):
|
|
184
189
|
name = models.CharField(max_length=150)
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
from django.db.models.fields import BLANK_CHOICE_DASH
|
|
2
|
+
|
|
3
|
+
|
|
1
4
|
def img_src(image_attachment, size):
|
|
2
5
|
image = image_attachment.image
|
|
3
6
|
|
|
@@ -10,7 +13,19 @@ def img_src(image_attachment, size):
|
|
|
10
13
|
return image.url
|
|
11
14
|
|
|
12
15
|
|
|
13
|
-
def to_choices(
|
|
16
|
+
def to_choices(values, key=None, include_blank=True):
|
|
17
|
+
choices = [(
|
|
18
|
+
value[key] if key else value,
|
|
19
|
+
value
|
|
20
|
+
) for value in values]
|
|
21
|
+
|
|
22
|
+
if include_blank:
|
|
23
|
+
choices.insert(0, ("", "---------"))
|
|
24
|
+
|
|
25
|
+
return choices
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def to_choice_info_list(choice_list, nullable=False):
|
|
14
29
|
choices = []
|
|
15
30
|
for item in choice_list:
|
|
16
31
|
if isinstance(item, tuple):
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|