unique_together, how did I miss that?
Thanks alot, I'll give this a try. :)
Björn
On Jun 6, 5:07 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
> > I don't have a problem with two or three or ten users entering Harry
> > Potter into the database; annoyingly though, all but the first user
> > will
> I don't have a problem with two or three or ten users entering Harry
> Potter into the database; annoyingly though, all but the first user
> will get an error saying the slug must be unique. Can I define the
> slug as having to be unique for the user?
Looks like you want the "unique_together"
The idea:
Users can enter books into a database. The books can be accessed as
follows: http://website.com//
Here's a simple model:
class Book(models.Model):
title = models.CharField(maxlength=200)
author = models.CharField(maxlength=200)
slug =
3 matches
Mail list logo