Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f5ab845e55
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (13 sloc) 0.508 kb
from django.db import models
from django.contrib.auth.models import User
class Project(models.Model):
name = models.CharField(max_length=200)
desc = models.TextField(blank=True)
date_added = models.DateTimeField(auto_now_add=True)
last_modified = models.DateTimeField(auto_now=True)
users = models.ManyToManyField(User, related_name='projects')
def __unicode__(self):
return self.name
@models.permalink
def get_absolute_url(self):
return ('projects.views.project', [str(self.id)])
Jump to Line
Something went wrong with that request. Please try again.