mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-12-14 07:42:24 +03:00
no need inheritance from LocalizedModel anymore. Introduction of LocalizedValueDescriptor
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
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 LocalizedModel, AtomicSlugRetryMixin
|
||||
from localized_fields import AtomicSlugRetryMixin
|
||||
|
||||
|
||||
def define_fake_model(name='TestModel', fields=None):
|
||||
@@ -14,7 +15,7 @@ def define_fake_model(name='TestModel', fields=None):
|
||||
|
||||
if fields:
|
||||
attributes.update(fields)
|
||||
model = type(name, (AtomicSlugRetryMixin,LocalizedModel,), attributes)
|
||||
model = type(name, (AtomicSlugRetryMixin, models.Model), attributes)
|
||||
|
||||
return model
|
||||
|
||||
|
||||
Reference in New Issue
Block a user