added help_text and verbose_name to models where required and removed import of seed_db from urls.py
authornishanth
Fri, 12 Feb 2010 23:30:57 +0530
changeset 38 7910ff503036
parent 37 40651a873f44
child 39 476613c3ab0a
added help_text and verbose_name to models where required and removed import of seed_db from urls.py
taskapp/models.py
urls.py
--- a/taskapp/models.py	Fri Feb 12 23:09:11 2010 +0530
+++ b/taskapp/models.py	Fri Feb 12 23:30:57 2010 +0530
@@ -25,15 +25,15 @@
 class Profile(models.Model):
 	
     user = models.ForeignKey(User, unique = True)
-    dob = models.DateField(help_text = "YYYY-MM-DD")
+    dob = models.DateField(verbose_name = u"Date of Birth", help_text = "YYYY-MM-DD")
     gender = models.CharField(max_length = 1, choices = GENDER_CHOICES)
     rights = models.CharField(max_length = 2, choices = RIGHTS_CHOICES, default = u"CT")
     credits = models.PositiveSmallIntegerField(default = 0)
     
     aboutme = models.TextField(blank = True)
-    foss_comm = models.CharField(max_length = 80, blank = True)
-    phonenum = models.CharField(max_length = 15, blank = True)
-    homepage = models.URLField(blank = True)
+    foss_comm = models.CharField(max_length = 80, blank = True, verbose_name = u"Foss Communities", help_text = u"Comma seperated list of foss communities you are involved in.")
+    phonenum = models.CharField(max_length = 15, blank = True, verbose_name = u"Phone Number")
+    homepage = models.URLField(blank = True, verbose_name = u"Homepage/Blog")
     street = models.CharField(max_length = 80, blank = True)
     city = models.CharField(max_length = 25, blank = True)
     country = models.CharField(max_length = 25, blank = True)
@@ -46,8 +46,8 @@
 
 class Task(models.Model):
     
-    title = models.CharField(max_length = 100, unique = True)
-    desc = models.TextField()
+    title = models.CharField(max_length = 100, unique = True, verbose_name = u"Title", help_text = u"Keep it simple and below 100 chars.")
+    desc = models.TextField(verbose_name = u"Description")
     status = models.CharField(max_length = 2, choices = STATUS_CHOICES, default = "UP")
     tags = models.CharField(max_length = 200, blank = True)
     
--- a/urls.py	Fri Feb 12 23:09:11 2010 +0530
+++ b/urls.py	Fri Feb 12 23:30:57 2010 +0530
@@ -7,7 +7,6 @@
 from pytask.taskapp.views import user as userViews
 from pytask.taskapp.views import task as taskViews
 
-from pytask.taskapp.utils.seed_db import seed_db
 
 urlpatterns = patterns('',
     # Example: