Answer the question
In order to leave comments, you need to log in
Slugfield how to use it correctly?
from django.db.models import permalink
class Tags(models.Model):
slug = models.SlugField(max_length=100, unique=True)
title = models.CharField(max_length=100, db_index=True)
@permalink
def get_absolute_url(self):
return ('view_blog_tags', None, { 'slug': self.slug })
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question