On Fri, 2007-06-01 at 14:32 -0700, [EMAIL PROTECTED] wrote:
> Not sure why this isn't working.
>
> I have:
>
> make = models.ForeignKey(Foo)
> model = models.CharField(maxlength=100)
> slug = models.SlugField(prepopulate_from=('make','model'))
>
> Foo has
>
> bar = models.CharField(maxlength=1
The easiest way I know of is letting the javascript do its thing and
then overriding the save method. Basically, just split the generated
slug (which will be something like "1-stuff", where 1 is the id of the
Foo instance and "stuff" is the string typed into the model field).
Then grab the instan
Not sure why this isn't working.
I have:
make = models.ForeignKey(Foo)
model = models.CharField(maxlength=100)
slug = models.SlugField(prepopulate_from=('make','model'))
Foo has
bar = models.CharField(maxlength=100, unique=True)
def __str__(self):
return self.bar
So slug should po
3 matches
Mail list logo