Issue 13 in django-blocks: No support for South's freezing fields

2 views
Skip to first unread message

django...@googlecode.com

unread,
Aug 20, 2010, 6:59:24 PM8/20/10
to django...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 13 by fahhem2: No support for South's freezing fields
http://code.google.com/p/django-blocks/issues/detail?id=13

Since BlocksImageField is, from the database's perspective, just another
ImageField, adding South's freezing is straightforward:

# For Django-South to be able to freeze this field --fahhem

try:
from south.modelsinspector import add_introspection_rules
except:
pass
else:
rules = [
(
(BlocksImageField,),
[],
{
},
)
(
(GeoLocationField,),
[],
{
'max_length':['max_length',{'max_length':30}]
},
)
]
add_introspection_rules(rules, ["^blocks\.forms\.fields"])


I haven't tested the GeoLocationField rules, but the BlocksImageField rule
is part of my own migrations.

Also, for GeoLocationField I don't see why you didn't inherit from
CharField instead of from Field.

django...@googlecode.com

unread,
Aug 20, 2010, 7:12:05 PM8/20/10
to django...@googlegroups.com
Updates:
Status: Accepted

Comment #1 on issue 13 by kimus.linuxus: No support for South's freezing
fields
http://code.google.com/p/django-blocks/issues/detail?id=13

are you saying that the support for django-south should be supported by
django-blocks?

django...@googlecode.com

unread,
Aug 20, 2010, 7:16:10 PM8/20/10
to django...@googlegroups.com

Comment #2 on issue 13 by fahhem2: No support for South's freezing fields
http://code.google.com/p/django-blocks/issues/detail?id=13

By putting the code in a try/except, then you would be allowing your fields
to be used by projects using South as well as work with non-South projects.
It's a win/win as I'm sure I'm not the first South user using your
apps/fields (to be honest, I'm only using the BlocksImageField as it's a
better version of StdImageField)

django...@googlecode.com

unread,
Aug 21, 2010, 2:05:01 PM8/21/10
to django...@googlegroups.com
Updates:
Status: Fixed

Comment #3 on issue 13 by kimus.linuxus: No support for South's freezing
fields
http://code.google.com/p/django-blocks/issues/detail?id=13

The south support was added to the django-blocks fields in r238.

If you need to freeze django-blocks applications we recommend doing this in
your settings:
SOUTH_MIGRATION_MODULES = {
'blog': 'myproject.migrations.blog',
...
}

Reply all
Reply to author
Forward
0 new messages