drf-appkit 1.6.1__tar.gz → 1.6.2__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.6.1/drf_appkit.egg-info → drf_appkit-1.6.2}/PKG-INFO +1 -1
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/models.py +9 -6
- {drf_appkit-1.6.1 → drf_appkit-1.6.2/drf_appkit.egg-info}/PKG-INFO +1 -1
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/setup.cfg +1 -1
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/LICENSE +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/MANIFEST.in +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/README.md +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/__init__.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/api/__init__.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/api/filters.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/api/mixins.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/api/pagination.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/api/relations.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/api/renderers.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/api/serializers.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/api/tests.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/api/views.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/apps.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/auth/__init__.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/auth/backends.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/auth/decorators.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/auth/email.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/auth/permissions.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/debug.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf/__init__.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf/adapters.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf/authentication.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf/backends.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf/endpoints.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf/exceptions.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf/fields.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf/filters.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf/mixins.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf/permissions.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf/serializers.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf_appkit.egg-info/PKG-INFO +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf_appkit.egg-info/SOURCES.txt +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf_appkit.egg-info/dependency_links.txt +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/drf_appkit.egg-info/top_level.txt +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/forms/__init__.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/forms/widgets.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/handlers.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/jinja2/appkit/forms/widgets/money_widget.html +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/managers.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0001_initial.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0002_arrangement_tags.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0003_auto_20210221_0852.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0004_auto_20210309_0655.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0005_auto_20210324_1046.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0006_sitealias.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0007_auto_20211021_1901.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0008_update_autofields.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0009_alter_arrangement_unique_together_and_more.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0010_arrangement_name.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0011_alter_sitealias_options.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0012_alter_sitealias_site.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0013_usergroup.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0014_remove_note_notes_note_content_type_note_object_id.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0015_alter_note_content_type_alter_note_object_id.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0016_alter_arrangementitem_unique_together_and_more.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0017_alter_imageattachment_image.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0018_place_geoposition.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0019_alter_place_geoposition.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0020_remove_arrangement_type_arrangement_content_type.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0021_rename_content_type_arrangement_item_type.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0022_imageattachment_rendition_key_imageattachment_warm.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0023_delete_usergroup.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0024_place_city_place_country_place_postal_code_and_more.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0025_mediaattachment_placeholder.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0026_mediaattachment_attributes_and_more.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/__init__.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/notification.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/settings.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/shortcuts.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/storages.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/tests.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/transformers.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/util.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/views.py +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/drf_appkit.egg-info/SOURCES.txt +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/drf_appkit.egg-info/dependency_links.txt +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/drf_appkit.egg-info/top_level.txt +0 -0
- {drf_appkit-1.6.1 → drf_appkit-1.6.2}/setup.py +0 -0
|
@@ -185,7 +185,7 @@ class Place(ModelBase):
|
|
|
185
185
|
try:
|
|
186
186
|
address_components = self.info['address_components']
|
|
187
187
|
except KeyError:
|
|
188
|
-
return
|
|
188
|
+
return self.info.get('formattedAddress')
|
|
189
189
|
|
|
190
190
|
address_parts = []
|
|
191
191
|
for component_type in component_types:
|
|
@@ -303,6 +303,11 @@ class MediaTypeChoices(models.TextChoices):
|
|
|
303
303
|
VIDEO = 'video', _('Video')
|
|
304
304
|
|
|
305
305
|
|
|
306
|
+
class MediaAttachmentManager(models.Manager):
|
|
307
|
+
def ready_videos(self):
|
|
308
|
+
return self.filter(media_type=MediaTypeChoices.VIDEO, attributes__mux__status='ready')
|
|
309
|
+
|
|
310
|
+
|
|
306
311
|
class MediaAttachment(Document):
|
|
307
312
|
content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
|
|
308
313
|
object_id = models.PositiveIntegerField()
|
|
@@ -320,6 +325,8 @@ class MediaAttachment(Document):
|
|
|
320
325
|
rendition_key = models.CharField(max_length=20, blank=False, null=True)
|
|
321
326
|
warm = models.BooleanField(default=False, help_text='Indicates whether renditions have been created')
|
|
322
327
|
|
|
328
|
+
objects = MediaAttachmentManager()
|
|
329
|
+
|
|
323
330
|
class Meta:
|
|
324
331
|
ordering = ('position',)
|
|
325
332
|
|
|
@@ -364,7 +371,7 @@ class Thing(models.Model):
|
|
|
364
371
|
description = models.TextField(blank=True)
|
|
365
372
|
|
|
366
373
|
attachments = GenericRelation(Attachment)
|
|
367
|
-
|
|
374
|
+
media_attachments = GenericRelation(MediaAttachment)
|
|
368
375
|
notes = GenericRelation(Note)
|
|
369
376
|
feature_image = models.OneToOneField(MediaAttachment, blank=True, null=True, on_delete=models.SET_NULL)
|
|
370
377
|
place = models.ForeignKey(Place, blank=True, null=True, on_delete=models.SET_NULL)
|
|
@@ -379,10 +386,6 @@ class Thing(models.Model):
|
|
|
379
386
|
def __str__(self):
|
|
380
387
|
return self.name
|
|
381
388
|
|
|
382
|
-
@property
|
|
383
|
-
def image_count(self):
|
|
384
|
-
return self.images.count()
|
|
385
|
-
|
|
386
389
|
|
|
387
390
|
class AbstractProduct(Thing):
|
|
388
391
|
price = MoneyField(max_digits=14, decimal_places=2, blank=True, null=True, default_currency=None)
|
|
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
|
{drf_appkit-1.6.1 → drf_appkit-1.6.2}/appkit/migrations/0026_mediaattachment_attributes_and_more.py
RENAMED
|
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
|