From c5ee0053e4e7c91c169cfeba613c7b3b4188dc4a Mon Sep 17 00:00:00 2001 From: artunit Date: Thu, 5 May 2011 19:30:38 +0000 Subject: [PATCH] add support for notes that are course-specific git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@1439 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/README | 8 ++++++++ conifer/syrup/models.py | 1 + conifer/syrup/views/admin.py | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/conifer/README b/conifer/README index 3da49c8..029b54c 100644 --- a/conifer/README +++ b/conifer/README @@ -66,3 +66,11 @@ C:\src\syrup\trunk\conifer>manage.py syncdb * make yourself a course. * click on all of the links and see what they do. + +If you have been following along +------------------------------ + +If you have an existing database, use south to deal with fields that have been added: + +./manage.py schemamigration --auto conifer.syrup +./manage.py migrate conifer.syrup diff --git a/conifer/syrup/models.py b/conifer/syrup/models.py index bddd160..3bdcd11 100644 --- a/conifer/syrup/models.py +++ b/conifer/syrup/models.py @@ -243,6 +243,7 @@ class Course(BaseModel): code = m.CharField(max_length=64, unique=True) name = m.CharField(max_length=1024) department = m.ForeignKey(Department) + coursenotes = m.TextField('Course Notes', blank=True, null=True) class Meta: ordering = ['code'] diff --git a/conifer/syrup/views/admin.py b/conifer/syrup/views/admin.py index 17a83e0..457a8a4 100644 --- a/conifer/syrup/views/admin.py +++ b/conifer/syrup/views/admin.py @@ -16,7 +16,7 @@ class CourseForm(ModelForm): class Index: title = _('Courses') all = models.Course.objects.order_by('code', 'name').all - cols = ['code', 'name', 'department'] + cols = ['code', 'name', 'department', 'coursenotes'] links = [0, 1] clean_name = strip_and_nonblank('code') -- 2.11.0