server/python/django/renkanmanager/models.py
changeset 318 815589aed866
child 387 87555646dd07
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/python/django/renkanmanager/models.py	Tue Jul 22 18:01:03 2014 +0200
@@ -0,0 +1,23 @@
+'''
+Created on Jul 17, 2014
+
+@author: tc
+'''
+from django.conf import settings
+from django.db import models
+from hdabo.models import User
+from easy_thumbnails.fields import ThumbnailerImageField
+
+
+class Renkan(models.Model):
+    
+    owner = models.ForeignKey(User, blank=True, null=True)
+    rk_id = models.CharField(max_length=1024, unique=True, blank=False, null=False) # typically UUID
+    content = models.TextField(blank=True, null=True)
+    title = models.CharField(max_length=1024, null=True)
+    image = ThumbnailerImageField(upload_to="thumbnails/renkan/", default=settings.DEFAULT_RENKAN_ICON)
+    creation_date = models.DateTimeField(auto_now_add=True)
+    modification_date = models.DateTimeField(auto_now=True)
+    
+    class Meta:
+        app_label = 'renkanmanager'