google-code-export / django-photologue

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

titles must be unique across galleries #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create two galleries
2. upload a photo to each of the galleries, both photos with identical titles

What is the expected output? What do you see instead?
Uploading the second photo fails, because there's a unique=True constraint
in the Photo model.

What version of the product are you using? On what operating system?
2.0 branch revision 188.

Please provide any additional information below.
I don't think there should be any limitation to the photo title. At least
the requirement for the title not to be identical to any photo in any
gallery feels too strict.

A developer might even want to implement photo galleries in which photos
have no titles at all, just filenames. For such a case, "null=True,
blank=True" for the title would make sense.

Different constraints could still be enforced in the upload form by the
developer.

Original issue reported on code.google.com by akaih...@gmail.com on 19 Apr 2008 at 7:26

GoogleCodeExporter commented 9 years ago
I think the problem here is, that you can use photos without galleries. In this 
case
the unique name could be useful.

Original comment by schla...@gmail.com on 9 May 2008 at 10:58

GoogleCodeExporter commented 9 years ago
As said in the previous comment, photos are not really tied to galleries and 
therefore galleries can not provide 
any uniqueness to a photo outside of that gallery.

The photo title is also the bases for the photo's "slug" which is required for 
get_absolute_url unless you want 
to use ID numbers and have ugly urls. As a "natural" primary key, I like the 
photo title better than the file 
name for a few reasons, including the fact that Django will automatically alter 
the filename if a duplicate is 
found.

I'm going to mark this wontfix for now but I'm open to further debate if you 
feel strongly about this.

- Justin

Original comment by justin.d...@gmail.com on 11 May 2008 at 2:28