From: yomguy Date: Sun, 15 Apr 2012 21:45:29 +0000 (+0200) Subject: make training category optional X-Git-Tag: 0.2~31 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=59502526eb5b028530374cbddfdb829fba749ffd;p=teleforma.git make training category optional --- 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'))