SQL does not allow max_length>255 while using unique=True........so either
you have to minimize the max_length or to remove unique..For more
information just go through the following links
https://groups.google.com/forum/?fromgroups#!topic/django-developers/7fMxLE-h0tQ
https://groups.google.com/forum/?fromgroups#!topic/django-users/rRaMzqhBLg8

On Wed, Jun 20, 2012 at 5:33 PM, Diego pascual lopez <azoti...@gmail.com>wrote:

>
>
> On Tue, Jun 19, 2012 at 8:17 PM, upmauro <upma...@gmail.com> wrote:
>
>>
>>
> HI,
>
>
>>
>> When i begin my application i used inspectdb to generate models, after
>> this when i try use SYNCDB or SQL <APPNAME>
>>
>> Django raise this exception:
>>
>> python2.7 manage.py syncdb
>>
>> Error: One or more models did not validate:
>> core.djangocontenttype: "app_label": CharField cannot have a "max_length"
>> greater than 255 when using "unique=True".
>> core.djangocontenttype: "model": CharField cannot have a "max_length"
>> greater than 255 when using "unique=True".
>> core.authpermission: "codename": CharField cannot have a "max_length"
>> greater than 255 when using "unique=True".
>> core.sessions: "session_id": CharField cannot have a "max_length" greater
>> than 255 when using "unique=True".
>>
>>
> do you use max_length parameter?
>
> could you show us your models.py files?
>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/dTZtUfSDBpEJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to