]> git.parisson.com Git - teleforma.git/commitdiff
make training category optional
authoryomguy <yomguy@parisson.com>
Sun, 15 Apr 2012 21:45:29 +0000 (23:45 +0200)
committeryomguy <yomguy@parisson.com>
Sun, 15 Apr 2012 21:45:29 +0000 (23:45 +0200)
INSTALL.rst
teleforma/management/commands/teleforma-import-courses.py
teleforma/models.py

index f6d57b18b77dc658ac58c7ce2f31b451cefd07c6..cff362315650eb06b8e0476cbfa8a67b486f0821 100644 (file)
@@ -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
 --------------------------------
index 4e2cec52a718ab36717820c76b4204257b9a3836..d81271ad304da92d8f7b05342e994e35928a5d1a 100644 (file)
@@ -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):
index c5416ab18111839fee4e52faf56b15af2730af9f..28a02a4c0d2f4284cd946c7881e3f71a6a2f712f 100755 (executable)
@@ -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'))