From 59502526eb5b028530374cbddfdb829fba749ffd Mon Sep 17 00:00:00 2001 From: yomguy Date: Sun, 15 Apr 2012 23:45:29 +0200 Subject: [PATCH] make training category optional --- INSTALL.rst | 10 ++++++++++ .../management/commands/teleforma-import-courses.py | 2 +- teleforma/models.py | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/INSTALL.rst b/INSTALL.rst index f6d57b18..cff36231 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -11,6 +11,16 @@ See http://djangoproject.com. Other needed librairies are listed below. +telemeta +django-markup-mixin +django-pagination +django-notes +django-extensions +postman +django-timezones +xlwt +xlrd + Install the system dependencies -------------------------------- diff --git a/teleforma/management/commands/teleforma-import-courses.py b/teleforma/management/commands/teleforma-import-courses.py index 4e2cec52..d81271ad 100644 --- a/teleforma/management/commands/teleforma-import-courses.py +++ b/teleforma/management/commands/teleforma-import-courses.py @@ -11,7 +11,7 @@ import codecs class Command(BaseCommand): help = "Import courses from a txt file (see an example in example/data/" - args = "path" + args = "organization path" admin_email = 'webmaster@parisson.com' def handle(self, *args, **options): diff --git a/teleforma/models.py b/teleforma/models.py index c5416ab1..28a02a4c 100755 --- a/teleforma/models.py +++ b/teleforma/models.py @@ -299,7 +299,8 @@ class Training(Model): code = CharField(_('code'), max_length=255) name = CharField(_('name'), max_length=255, blank=True) - category = ForeignKey('Category', related_name='course', verbose_name=_('category')) + category = ForeignKey('Category', related_name='course', verbose_name=_('category'), + blank=True, null=True) courses = ManyToManyField('Course', related_name="training", verbose_name=_('courses'), blank=True, null=True) synthesis_note = BooleanField(_('synthesis note')) -- 2.39.5