[open-ils-commits] r27 - servres/trunk/conifer/syrup
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Nov 19 17:12:46 EST 2008
Author: artunit
Date: 2008-11-19 17:12:41 -0500 (Wed, 19 Nov 2008)
New Revision: 27
Modified:
servres/trunk/conifer/syrup/admin.py
servres/trunk/conifer/syrup/models.py
Log:
Modified: servres/trunk/conifer/syrup/admin.py
===================================================================
--- servres/trunk/conifer/syrup/admin.py 2008-11-19 20:57:18 UTC (rev 26)
+++ servres/trunk/conifer/syrup/admin.py 2008-11-19 22:12:41 UTC (rev 27)
@@ -22,5 +22,5 @@
# value.__unicode__ = unicode_fn(firstcharfield)
# admin.site.register(value)
-for m in [Member, Course, Term, UserProfile, NewsItem]:
+for m in [LibraryUnit, ServiceDesk, Member, Department, Course, Term, UserProfile, NewsItem]:
admin.site.register(m)
Modified: servres/trunk/conifer/syrup/models.py
===================================================================
--- servres/trunk/conifer/syrup/models.py 2008-11-19 20:57:18 UTC (rev 26)
+++ servres/trunk/conifer/syrup/models.py 2008-11-19 22:12:41 UTC (rev 27)
@@ -39,6 +39,27 @@
return 'UserProfile(%s)' % self.user
#----------------------------------------------------------------------
+# LIBRARIES, SERVICE DESKS
+
+class LibraryUnit(m.Model):
+ name = m.CharField(max_length=100)
+ nickname = m.CharField(max_length=15,blank=True,default='')
+ url = m.URLField()
+ contact_email = m.EmailField()
+
+ def __unicode__(self):
+ return self.name
+
+class ServiceDesk(m.Model):
+ library = m.ForeignKey(LibraryUnit)
+ abbreviation = m.CharField(max_length=8,db_index=True)
+ name = m.TextField(db_index=True)
+ active = m.BooleanField(default=True)
+
+ def __unicode__(self):
+ return self.name
+
+#----------------------------------------------------------------------
# TERMS, COURSES, MEMBERSHIP
class Term(m.Model):
@@ -50,7 +71,14 @@
def __unicode__(self):
return self.code or self.name
+class Department(m.Model):
+ abbreviation = m.CharField(max_length=8,db_index=True)
+ name = m.TextField(db_index=True)
+ active = m.BooleanField(default=True)
+ def __unicode__(self):
+ return self.name
+
class Course(m.Model):
"""An offering of a course."""
# some courses may be ad-hoc and have no code?
More information about the open-ils-commits
mailing list