Yes, you need to create the slug in your save() method. Something
like:
class Review(models.Model):
...
def save(self):
# add slug if there isn't one already
if not self.slug:
from django.template.defaultfilters import slugify
self.slug = slugify(self.title
I think my problem might be that I'm not saving the slug. When I save a
review I do...
review = Review(.) #< Everything but a slug gets passed as a kwarg
review.save() #<--- Then I save the review.
How do I save the slug when I save the review. Does Django automajically do
thi
2 matches
Mail list logo