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 })