diff --git a/apps/establishment/urls/common.py b/apps/establishment/urls/common.py index 25f2b14f..0bb13cf6 100644 --- a/apps/establishment/urls/common.py +++ b/apps/establishment/urls/common.py @@ -15,7 +15,7 @@ urlpatterns = [ name='create-comment'), path('slug//comments//', views.EstablishmentCommentRUDView.as_view(), name='rud-comment'), - path('slug//collections/', views.EstablishmentFavoritesCreateDestroyView.as_view(), + path('slug//favorites/', views.EstablishmentFavoritesCreateDestroyView.as_view(), name='create-destroy-favorites'), # similar establishments by type/subtype diff --git a/apps/location/models.py b/apps/location/models.py index a50b1f41..579addd1 100644 --- a/apps/location/models.py +++ b/apps/location/models.py @@ -178,12 +178,12 @@ class City(models.Model, TranslatedFieldsMixin): verbose_name = _('city') def __str__(self): - return self.name + return self.name_dumped @property def name_dumped(self): """Used for indexing as string""" - return dumps(self.name) + return f'{self.id}: {dumps(self.name)}' @property def image_object(self):