From b9f40c0c9df3167d28f131cecd566190e18b459e Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 23 Feb 2011 12:26:56 -0500 Subject: added a code section to the projects for sharing some browser extensions I developed --- apps/projects/models/code.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 apps/projects/models/code.py (limited to 'apps/projects/models/code.py') diff --git a/apps/projects/models/code.py b/apps/projects/models/code.py new file mode 100644 index 0000000..14a66f0 --- /dev/null +++ b/apps/projects/models/code.py @@ -0,0 +1,25 @@ +from django.db import models + + +PUB_STATUS = ( + (0, 'Draft'), + (1, 'Published'), + ) + + + +class Code(models.Model): + name = models.CharField(max_length=254) + slug = models.SlugField() + date_created = models.DateField('Date Created') + status = models.IntegerField(choices=PUB_STATUS, default=0) + body_html = models.TextField(blank=True) + + class Meta: + verbose_name_plural = "Code" + app_label = 'projects' + ordering = ('-date_created',) + # Returns the string representation of the model. + def __unicode__(self): + return self.slug + -- cgit v1.2.3-70-g09d2