From 5f3947601a7c2f919aa7802bb1f72b9bf39f8837 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Fri, 20 Sep 2019 15:11:33 +0300 Subject: [PATCH] rename url path collection to collections, delete property in M2M field --- .../migrations/0028_auto_20190920_1205.py | 18 ++++++++++++++++++ apps/establishment/models.py | 2 +- project/urls/web.py | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 apps/establishment/migrations/0028_auto_20190920_1205.py diff --git a/apps/establishment/migrations/0028_auto_20190920_1205.py b/apps/establishment/migrations/0028_auto_20190920_1205.py new file mode 100644 index 00000000..abdd4d7f --- /dev/null +++ b/apps/establishment/migrations/0028_auto_20190920_1205.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.4 on 2019-09-20 12:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('establishment', '0027_auto_20190920_1120'), + ] + + operations = [ + migrations.AlterField( + model_name='establishment', + name='collections', + field=models.ManyToManyField(blank=True, default=None, related_name='establishments', to='collection.Collection', verbose_name='Collections'), + ), + ] diff --git a/apps/establishment/models.py b/apps/establishment/models.py index f731cd74..042c25e0 100644 --- a/apps/establishment/models.py +++ b/apps/establishment/models.py @@ -273,7 +273,7 @@ class Establishment(ProjectBaseMixin, URLImageMixin, TranslatedFieldsMixin): verbose_name=_('Transportation')) collections = models.ManyToManyField(to='collection.Collection', related_name='establishments', - blank=True, null=True, default=None, + blank=True, default=None, verbose_name=_('Collections')) preview_image_url = models.URLField(verbose_name=_('Preview image URL path'), blank=True, null=True, default=None) diff --git a/project/urls/web.py b/project/urls/web.py index 18bb8fd9..0a81672d 100644 --- a/project/urls/web.py +++ b/project/urls/web.py @@ -20,7 +20,7 @@ app_name = 'web' urlpatterns = [ path('account/', include('account.urls.web')), path('re_blocks/', include('advertisement.urls.web')), - path('collection/', include('collection.urls.web')), + path('collections/', include('collection.urls.web')), path('establishments/', include('establishment.urls.web')), path('news/', include('news.urls.web')), path('notifications/', include('notification.urls.web')),