Merge remote-tracking branch 'beer/uniqueslug'

# Conflicts:
#	README.rst
#	tests/fake_model.py
This commit is contained in:
Swen Kooij
2017-04-03 14:54:25 +03:00
4 changed files with 99 additions and 75 deletions

View File

@@ -1,9 +1,8 @@
from django.db import connection, migrations
from django.db import models
from django.db.migrations.executor import MigrationExecutor
from django.contrib.postgres.operations import HStoreExtension
from localized_fields import AtomicSlugRetryMixin
from localized_fields import LocalizedModel
def define_fake_model(name='TestModel', fields=None):
@@ -15,8 +14,8 @@ def define_fake_model(name='TestModel', fields=None):
if fields:
attributes.update(fields)
model = type(name, (AtomicSlugRetryMixin, models.Model), attributes)
model = type(name, (LocalizedModel,), attributes)
return model