Thursday, March 31, 2011

Re: south for django

On Mar 31, 2011, at 1:18 PM, jay K. wrote:

>
> I think i found the source of all problems
>
> I am not a python expert, so I was wondering if anybody can tell me what this code means
>
> // beginning of code
>
> from django.db import models
>
>
> class TranslationForeignKey(models.ForeignKey):
> """
> """
> pass
>
> // end of code
>
> This piece of code has been generating an error when executing the python manage.py schemamigration myApp --initial command in South
>
> If the above code has doesn't do anything, I will comment it out

See:
http://south.aeracode.org/docs/tutorial/part4.html#simple-inheritance

Add to the bottom of the file that defines TranslationForeignKey:
replace my_app.fields with a that matches the definition
try:
from south.modelsinspector import add_introspection_rules
add_introspection_rules([], ['^my_app\.fields\.TranslationForeignKey'])
except ImportError:
pass

Jason


>
>
> On Thu, Mar 31, 2011 at 5:04 PM, jay K. <jay.developer2000@gmail.com> wrote:
>
> Hello,
>
> I've been using south to migrate a database
>
> I followed all the commands to make the migrations in south (--initial and --auto), all
> of this, after making my desired changes in modes.py
>
> but when I refresh my page I still get a "Error 505" messages
>
> I've checked spelling mistakes etc but found nothing
>
> Any other suggestions would be great
>
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment