Export to GitHub

django-photologue - issue #151

GalleryUpload with len(title) > 50 causes a crash.


Posted on Mar 2, 2010 by Massive Panda

When processing the upload, the title gets sluggified (line 213) and used as a slug in a new Gallery object. The slug field is limited to 50 chars (Django default value) so if the title length is greater than 50 chars, we have a crash.

There is a design flaw: both Gallery and Photo models have title fields with length = 100, but slug fields with length = 50.

When using the admin interface, the JS that fills in the slug form field auto-limits it to 50 chars. However, when a Gallery or a Photo is created in code (for example, in a GalleryUpload) there is no safeguard.

Comment #1

Posted on Mar 2, 2010 by Happy Giraffe

(No comment was entered for this change.)

Comment #2

Posted on Aug 12, 2012 by Massive Panda

See issue 11 on Github project page.

Status: Duplicate