Skip to content

Commit

Permalink
Used the latest django-picklefield version.
Browse files Browse the repository at this point in the history
  • Loading branch information
charettes committed Sep 6, 2015
1 parent dd6991f commit 425a054
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mutant/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Migration(migrations.Migration):
('db_column', models.SlugField(max_length=30, null=True, verbose_name='db column', blank=True)),
('db_index', models.BooleanField(default=False, verbose_name='db index')),
('editable', models.BooleanField(default=True, verbose_name='editable')),
('default', picklefield.fields.PickledObjectField(default=b'gAJjZGphbmdvLmRiLm1vZGVscy5maWVsZHMKTk9UX1BST1ZJREVECnEBLg==', verbose_name='default', null=True, editable=False)),
('default', picklefield.fields.PickledObjectField(default=models.NOT_PROVIDED, verbose_name='default', null=True, editable=False)),
('primary_key', models.BooleanField(default=False, verbose_name='primary key')),
('unique', models.BooleanField(default=False, verbose_name='unique')),
('unique_for_date', mutant.db.fields.python.PythonIdentifierField(max_length=255, null=True, verbose_name='unique for date', blank=True)),
Expand Down
7 changes: 2 additions & 5 deletions mutant/models/field/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.db.models import signals
from django.utils import six
from django.utils.translation import ugettext_lazy as _
from picklefield.fields import dbsafe_encode, PickledObjectField
from picklefield.fields import PickledObjectField
from polymodels.models import BasePolymorphicModel
from polymodels.utils import copy_fields

Expand All @@ -24,9 +24,6 @@
patch_model_option_verbose_name_raw()


NOT_PROVIDED = dbsafe_encode(models.NOT_PROVIDED)


class FieldDefinitionBase(models.base.ModelBase):
FIELD_CLASS_ATTR = 'defined_field_class'
FIELD_OPTIONS_ATTR = 'defined_field_options'
Expand Down Expand Up @@ -183,7 +180,7 @@ class FieldDefinition(six.with_metaclass(FieldDefinitionBase, BasePolymorphicMod
db_index = models.BooleanField(_('db index'), default=False)

editable = models.BooleanField(_('editable'), default=True)
default = PickledObjectField(_('default'), null=True, default=NOT_PROVIDED)
default = PickledObjectField(_('default'), null=True, default=models.NOT_PROVIDED)

primary_key = models.BooleanField(_('primary key'), default=False)
unique = models.BooleanField(_('unique'), default=False)
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
django-picklefield>=0.3.0
django-picklefield>=0.3.2
django-polymodels>=1.3.1

0 comments on commit 425a054

Please sign in to comment.