rename url path collection to collections, delete property in M2M field

This commit is contained in:
Anatoly 2019-09-20 15:11:33 +03:00
parent 09c9d666b5
commit 5f3947601a
3 changed files with 20 additions and 2 deletions

View File

@ -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'),
),
]

View File

@ -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)

View File

@ -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')),