Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d5977aa431
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (15 sloc) 0.535 kb
from django.db import models
class SimpleModel(models.Model):
"""
(SimpleModel description)
"""
name = models.CharField(max_length=255)
slug = models.SlugField(unique=True)
description = models.TextField(blank=True)
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
def __unicode__(self):
return self.name
@models.permalink
def get_absolute_url(self):
return ('simplemodel_detail_view_name', [str(self.id)])
Jump to Line
Something went wrong with that request. Please try again.