summaryrefslogtreecommitdiff
path: root/apps/projects/models/code.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2011-02-23 11:28:37 -0600
committerluxagraf <sng@luxagraf.net>2011-02-23 11:28:37 -0600
commit98cbbb27f83c8d7b38cad810cab83f7e5e639d4e (patch)
tree8c740f3661ff2b6c55e2b33cb9574a2ba37c379e /apps/projects/models/code.py
parentfc776ae0e6d85ed5e51b83291ca943f2d740bd43 (diff)
parentb9f40c0c9df3167d28f131cecd566190e18b459e (diff)
Merge branch 'master' of http://git.luxagraf.net/luxagraf
Diffstat (limited to 'apps/projects/models/code.py')
-rw-r--r--apps/projects/models/code.py25
1 files changed, 25 insertions, 0 deletions
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
+