google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Pagealias model doesn't verify #131

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
update to r611

What is the expected output? What do you see instead?

When syncing:

Error: One or more models did not validate:
pages.pagealias: "url": CharField cannot have a "max_length" greater than
255 when using "unique=True"

Django trunk, django-pages-cms r611

Original issue reported on code.google.com by dreg...@gmail.com on 21 Jul 2009 at 8:04

GoogleCodeExporter commented 9 years ago
which database backend are you using?

Original comment by chris.vigelius on 21 Jul 2009 at 9:41

GoogleCodeExporter commented 9 years ago
I have MySQL.

I had to change my models.py decreasing the max_length param to 255 of the url
charfiled for the PageAlias class in order to make it work.

Original comment by dreg...@gmail.com on 22 Jul 2009 at 12:40

GoogleCodeExporter commented 9 years ago
ok, apparently Django trunk checks this, whereas Django 1.0.2 does not (and 
leaves it
up to the database).

Attached is a patch which sets max_length to 255, hopefully this is still long 
enough
for the aliases.

Original comment by chris.vigelius on 22 Jul 2009 at 4:20

Attachments:

GoogleCodeExporter commented 9 years ago
fixed in trunk

Original comment by chris.vigelius on 22 Jul 2009 at 7:40