summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2014-02-06 15:30:00 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2014-02-06 15:30:00 (GMT)
commit700b8848c2b7d3d4039007d9ac90319cc176ccd0 (patch)
tree646a27020829bfd0fca47f13f54fa7909e42088d
parent2c780b234e0fc0bb6e757d3d8a9ad8962a46e4f6 (diff)
downloadpolynum-blackboard-700b8848c2b7d3d4039007d9ac90319cc176ccd0.zip
polynum-blackboard-700b8848c2b7d3d4039007d9ac90319cc176ccd0.tar.gz
polynum-blackboard-700b8848c2b7d3d4039007d9ac90319cc176ccd0.tar.bz2
enregistre le code des cours dans les demande d'envois pour l'afficher dans le menu gauche
-rw-r--r--polynum_blackboard/forms.py6
-rw-r--r--polynum_blackboard/management/commands/send-to-mycourse.py5
-rw-r--r--polynum_blackboard/migrations/0005_auto__chg_field_blackboardpush_course_name.py202
-rw-r--r--polynum_blackboard/migrations/0006_auto__add_field_blackboardpush_modified.py205
-rw-r--r--polynum_blackboard/migrations/0007_rename_field_coursename.py202
-rw-r--r--polynum_blackboard/migrations/0008_auto__add_field_blackboardpush_course_name.py206
-rw-r--r--polynum_blackboard/models.py14
-rw-r--r--polynum_blackboard/templates/document_copyrights.new_request.html13
8 files changed, 838 insertions, 15 deletions
diff --git a/polynum_blackboard/forms.py b/polynum_blackboard/forms.py
index 5d686e0..8b0dab6 100644
--- a/polynum_blackboard/forms.py
+++ b/polynum_blackboard/forms.py
@@ -100,7 +100,8 @@ class MyCourseForm(request_forms.CopyrigtsForm):
ue = forms.ModelChoiceField(Entity.objects.all(),
label=u'Sinon sélectionnez l\'unité d\'enseignement dans \
laquelle vous souhaitez diffuser votre document')
- course_name = forms.CharField(max_length=64)
+ course_code = forms.CharField(max_length=128, widget=forms.HiddenInput)
+ course_name = forms.CharField(max_length=128, widget=forms.HiddenInput)
class Meta(request_forms.CopyrigtsForm.Meta):
fields = ('copyright', 'licence')
@@ -119,7 +120,6 @@ laquelle vous souhaitez diffuser votre document')
if push:
initial['course_name'] = push.course_name
super(MyCourseForm, self).__init__(*args, **kwargs)
- self.fields['course_name'].widget = forms.HiddenInput()
self.fields['ue'].widget = widgets.MillerColumns(attrs={
'data-entity-type': app_settings.UE_DESIGNATION
})
@@ -145,6 +145,7 @@ laquelle vous souhaitez diffuser votre document')
HTML('{% include \'_select_sponsor_course.html\' %}'),
'ue',
'course_name',
+ 'course_code',
HTML('{% include \'_select_ue_course.html\' %}')),
css_id='mycourse-block', css_class='hide'))
@@ -160,6 +161,7 @@ laquelle vous souhaitez diffuser votre document')
if self.cleaned_data['licence'] and \
constant.MYCOURSE_TAG in self.cleaned_data['licence'].diffusion_tags:
push, created = models.BlackBoardPush.objects.get_or_create(request=instance)
+ push.course_code = self.cleaned_data['course_name']
push.course_name = self.cleaned_data['course_name']
push.visible_to_students = self.cleaned_data['visible_to_students']
push.save()
diff --git a/polynum_blackboard/management/commands/send-to-mycourse.py b/polynum_blackboard/management/commands/send-to-mycourse.py
index b5f1426..e01aceb 100644
--- a/polynum_blackboard/management/commands/send-to-mycourse.py
+++ b/polynum_blackboard/management/commands/send-to-mycourse.py
@@ -47,11 +47,12 @@ class Command(BaseCommand):
for push in bb_pushs:
logger.info('sending request %s to mycourse', push.request.pk)
logger.info('from user %s', push.request.user.display_name().encode('utf-8'))
- logger.info('into course %s', push.course_name.encode('utf-8'))
+ logger.info('into course code %s', push.course_code.encode('utf-8'))
+ logger.info('into course name %s', push.course_name.encode('utf-8'))
if push.visible_to_students:
logger.info('visible to students')
try:
- ok, result = conn.send_file(push.request.uploadfile, [push.course_name], push.visible_to_students)
+ ok, result = conn.send_file(push.request.uploadfile, [push.course_code], push.visible_to_students)
push.sent = True
if ok:
logger.info('sending succeeded')
diff --git a/polynum_blackboard/migrations/0005_auto__chg_field_blackboardpush_course_name.py b/polynum_blackboard/migrations/0005_auto__chg_field_blackboardpush_course_name.py
new file mode 100644
index 0000000..8e154d1
--- /dev/null
+++ b/polynum_blackboard/migrations/0005_auto__chg_field_blackboardpush_course_name.py
@@ -0,0 +1,202 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Changing field 'BlackBoardPush.course_name'
+ db.alter_column(u'polynum_blackboard_blackboardpush', 'course_name', self.gf('django.db.models.fields.CharField')(max_length=128))
+
+ def backwards(self, orm):
+
+ # Changing field 'BlackBoardPush.course_name'
+ db.alter_column(u'polynum_blackboard_blackboardpush', 'course_name', self.gf('django.db.models.fields.TextField')(max_length=64))
+
+ models = {
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'base.deliveryplace': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DeliveryPlace'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.documentlicence': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DocumentLicence'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'diffusion_tags': ('polynum.base.fields.MultiSelectField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'only_free_documents': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.documentusage': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DocumentUsage'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'no_diffusion': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.entity': {
+ 'Meta': {'ordering': "('left_bound',)", 'object_name': 'Entity'},
+ 'code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}),
+ 'depth': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
+ 'description_override': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
+ 'entity_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': "orm['base.EntityType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
+ 'left_bound': ('django.db.models.fields.PositiveIntegerField', [], {'unique': 'True', 'db_index': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'blank': 'True'}),
+ 'name_override': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'blank': 'True'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children_set'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': "orm['base.Entity']"}),
+ 'right_bound': ('django.db.models.fields.PositiveIntegerField', [], {'unique': 'True', 'db_index': 'True'})
+ },
+ 'base.entitytype': {
+ 'Meta': {'object_name': 'EntityType'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ },
+ 'base.profile': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'Profile'},
+ 'choices': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.ProfileOptionChoice']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.profileoption': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'ProfileOption'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'list_type': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.profileoptionchoice': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'ProfileOptionChoice'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'option': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.ProfileOption']"}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.request': {
+ 'Meta': {'ordering': "('-creation_date', '-month_order')", 'object_name': 'Request'},
+ 'base_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Profile']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'choices': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.ProfileOptionChoice']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'contact_bureau': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
+ 'contact_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'contact_telephone1': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'contact_telephone2': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'copies': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}),
+ 'copyright': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+ 'cost': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '7', 'decimal_places': '3', 'blank': 'True'}),
+ 'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'delivery_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2014, 1, 27, 0, 0)', 'null': 'True', 'blank': 'True'}),
+ 'delivery_place': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DeliveryPlace']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'details': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'entity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Entity']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'financial_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}),
+ 'financial_comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_from_remote_request': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'licence': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DocumentLicence']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'modification_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
+ 'month_order': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'name': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'nb_pages': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
+ 'sponsor': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
+ 'status': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Status']", 'on_delete': 'models.PROTECT'}),
+ 'uploadfile': ('django.db.models.fields.files.FileField', [], {'max_length': '512', 'blank': 'True'}),
+ 'usage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DocumentUsage']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
+ },
+ 'base.role': {
+ 'Meta': {'object_name': 'Role'},
+ 'id': ('django.db.models.fields.CharField', [], {'max_length': '40', 'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ },
+ 'base.status': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'Status'},
+ 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
+ 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
+ 'start': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'visible_by': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.Role']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'polynum_blackboard.blackboardpush': {
+ 'Meta': {'object_name': 'BlackBoardPush'},
+ 'course_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'failure': ('django.db.models.fields.TextField', [], {'default': "''"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'request': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Request']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
+ 'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'visible_to_students': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ }
+ }
+
+ complete_apps = ['polynum_blackboard'] \ No newline at end of file
diff --git a/polynum_blackboard/migrations/0006_auto__add_field_blackboardpush_modified.py b/polynum_blackboard/migrations/0006_auto__add_field_blackboardpush_modified.py
new file mode 100644
index 0000000..1001204
--- /dev/null
+++ b/polynum_blackboard/migrations/0006_auto__add_field_blackboardpush_modified.py
@@ -0,0 +1,205 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'BlackBoardPush.modified'
+ db.add_column(u'polynum_blackboard_blackboardpush', 'modified',
+ self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime(2014, 1, 23, 0, 0), blank=True),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'BlackBoardPush.modified'
+ db.delete_column(u'polynum_blackboard_blackboardpush', 'modified')
+
+
+ models = {
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'base.deliveryplace': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DeliveryPlace'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.documentlicence': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DocumentLicence'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'diffusion_tags': ('polynum.base.fields.MultiSelectField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'only_free_documents': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.documentusage': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DocumentUsage'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'no_diffusion': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.entity': {
+ 'Meta': {'ordering': "('left_bound',)", 'object_name': 'Entity'},
+ 'code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}),
+ 'depth': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
+ 'description_override': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
+ 'entity_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': "orm['base.EntityType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
+ 'left_bound': ('django.db.models.fields.PositiveIntegerField', [], {'unique': 'True', 'db_index': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'blank': 'True'}),
+ 'name_override': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'blank': 'True'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children_set'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': "orm['base.Entity']"}),
+ 'right_bound': ('django.db.models.fields.PositiveIntegerField', [], {'unique': 'True', 'db_index': 'True'})
+ },
+ 'base.entitytype': {
+ 'Meta': {'object_name': 'EntityType'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ },
+ 'base.profile': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'Profile'},
+ 'choices': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.ProfileOptionChoice']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.profileoption': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'ProfileOption'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'list_type': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.profileoptionchoice': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'ProfileOptionChoice'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'option': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.ProfileOption']"}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.request': {
+ 'Meta': {'ordering': "('-creation_date', '-month_order')", 'object_name': 'Request'},
+ 'base_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Profile']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'choices': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.ProfileOptionChoice']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'contact_bureau': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
+ 'contact_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'contact_telephone1': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'contact_telephone2': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'copies': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}),
+ 'copyright': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+ 'cost': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '7', 'decimal_places': '3', 'blank': 'True'}),
+ 'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'delivery_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2014, 1, 27, 0, 0)', 'null': 'True', 'blank': 'True'}),
+ 'delivery_place': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DeliveryPlace']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'details': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'entity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Entity']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'financial_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}),
+ 'financial_comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_from_remote_request': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'licence': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DocumentLicence']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'modification_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
+ 'month_order': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'name': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'nb_pages': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
+ 'sponsor': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
+ 'status': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Status']", 'on_delete': 'models.PROTECT'}),
+ 'uploadfile': ('django.db.models.fields.files.FileField', [], {'max_length': '512', 'blank': 'True'}),
+ 'usage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DocumentUsage']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
+ },
+ 'base.role': {
+ 'Meta': {'object_name': 'Role'},
+ 'id': ('django.db.models.fields.CharField', [], {'max_length': '40', 'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ },
+ 'base.status': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'Status'},
+ 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
+ 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
+ 'start': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'visible_by': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.Role']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'polynum_blackboard.blackboardpush': {
+ 'Meta': {'object_name': 'BlackBoardPush'},
+ 'course_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'failure': ('django.db.models.fields.TextField', [], {'default': "''"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'request': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Request']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
+ 'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'visible_to_students': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ }
+ }
+
+ complete_apps = ['polynum_blackboard'] \ No newline at end of file
diff --git a/polynum_blackboard/migrations/0007_rename_field_coursename.py b/polynum_blackboard/migrations/0007_rename_field_coursename.py
new file mode 100644
index 0000000..f2a271a
--- /dev/null
+++ b/polynum_blackboard/migrations/0007_rename_field_coursename.py
@@ -0,0 +1,202 @@
+# -*- coding: utf-8 -*-
+from south.db import db
+from south.v2 import SchemaMigration
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Rename 'name' field to 'full_name'
+ db.rename_column('polynum_blackboard_blackboardpush', 'course_name', 'course_code')
+
+
+
+
+ def backwards(self, orm):
+ # Rename 'full_name' field to 'name'
+ db.rename_column('polynum_blackboard_blackboardpush', 'course_code', 'course_name')
+
+ models = {
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'base.deliveryplace': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DeliveryPlace'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.documentlicence': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DocumentLicence'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'diffusion_tags': ('polynum.base.fields.MultiSelectField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'only_free_documents': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.documentusage': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DocumentUsage'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'no_diffusion': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.entity': {
+ 'Meta': {'ordering': "('left_bound',)", 'object_name': 'Entity'},
+ 'code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}),
+ 'depth': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
+ 'description_override': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
+ 'entity_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': "orm['base.EntityType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
+ 'left_bound': ('django.db.models.fields.PositiveIntegerField', [], {'unique': 'True', 'db_index': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'blank': 'True'}),
+ 'name_override': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'blank': 'True'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children_set'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': "orm['base.Entity']"}),
+ 'right_bound': ('django.db.models.fields.PositiveIntegerField', [], {'unique': 'True', 'db_index': 'True'})
+ },
+ 'base.entitytype': {
+ 'Meta': {'object_name': 'EntityType'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ },
+ 'base.profile': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'Profile'},
+ 'choices': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.ProfileOptionChoice']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.profileoption': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'ProfileOption'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'list_type': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.profileoptionchoice': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'ProfileOptionChoice'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'option': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.ProfileOption']"}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.request': {
+ 'Meta': {'ordering': "('-creation_date', '-month_order')", 'object_name': 'Request'},
+ 'base_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Profile']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'choices': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.ProfileOptionChoice']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'contact_bureau': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
+ 'contact_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'contact_telephone1': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'contact_telephone2': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'copies': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}),
+ 'copyright': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+ 'cost': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '7', 'decimal_places': '3', 'blank': 'True'}),
+ 'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'delivery_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2014, 1, 27, 0, 0)', 'null': 'True', 'blank': 'True'}),
+ 'delivery_place': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DeliveryPlace']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'details': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'entity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Entity']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'financial_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}),
+ 'financial_comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_from_remote_request': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'licence': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DocumentLicence']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'modification_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
+ 'month_order': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'name': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'nb_pages': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
+ 'sponsor': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
+ 'status': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Status']", 'on_delete': 'models.PROTECT'}),
+ 'uploadfile': ('django.db.models.fields.files.FileField', [], {'max_length': '512', 'blank': 'True'}),
+ 'usage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DocumentUsage']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
+ },
+ 'base.role': {
+ 'Meta': {'object_name': 'Role'},
+ 'id': ('django.db.models.fields.CharField', [], {'max_length': '40', 'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ },
+ 'base.status': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'Status'},
+ 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
+ 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
+ 'start': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'visible_by': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.Role']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'polynum_blackboard.blackboardpush': {
+ 'Meta': {'object_name': 'BlackBoardPush'},
+ 'course_code': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'failure': ('django.db.models.fields.TextField', [], {'default': "''"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'request': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Request']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
+ 'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'visible_to_students': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ }
+ }
+
+ complete_apps = ['polynum_blackboard']
diff --git a/polynum_blackboard/migrations/0008_auto__add_field_blackboardpush_course_name.py b/polynum_blackboard/migrations/0008_auto__add_field_blackboardpush_course_name.py
new file mode 100644
index 0000000..34a13bb
--- /dev/null
+++ b/polynum_blackboard/migrations/0008_auto__add_field_blackboardpush_course_name.py
@@ -0,0 +1,206 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'BlackBoardPush.course_name'
+ db.add_column(u'polynum_blackboard_blackboardpush', 'course_name',
+ self.gf('django.db.models.fields.CharField')(default='', max_length=128),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'BlackBoardPush.course_name'
+ db.delete_column(u'polynum_blackboard_blackboardpush', 'course_name')
+
+
+ models = {
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'base.deliveryplace': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DeliveryPlace'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.documentlicence': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DocumentLicence'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'diffusion_tags': ('polynum.base.fields.MultiSelectField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'only_free_documents': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.documentusage': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'DocumentUsage'},
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'no_diffusion': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
+ },
+ 'base.entity': {
+ 'Meta': {'ordering': "('left_bound',)", 'object_name': 'Entity'},
+ 'code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}),
+ 'depth': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
+ 'description_override': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'blank': 'True'}),
+ 'entity_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': "orm['base.EntityType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
+ 'left_bound': ('django.db.models.fields.PositiveIntegerField', [], {'unique': 'True', 'db_index': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'blank': 'True'}),
+ 'name_override': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'blank': 'True'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children_set'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': "orm['base.Entity']"}),
+ 'right_bound': ('django.db.models.fields.PositiveIntegerField', [], {'unique': 'True', 'db_index': 'True'})
+ },
+ 'base.entitytype': {
+ 'Meta': {'object_name': 'EntityType'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ },
+ 'base.profile': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'Profile'},
+ 'choices': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.ProfileOptionChoice']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.profileoption': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'ProfileOption'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'list_type': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.profileoptionchoice': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'ProfileOptionChoice'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'option': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.ProfileOption']"}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '3'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+ },
+ 'base.request': {
+ 'Meta': {'ordering': "('-creation_date', '-month_order')", 'object_name': 'Request'},
+ 'base_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Profile']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'choices': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.ProfileOptionChoice']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'contact_bureau': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
+ 'contact_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'contact_telephone1': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'contact_telephone2': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
+ 'copies': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}),
+ 'copyright': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+ 'cost': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '7', 'decimal_places': '3', 'blank': 'True'}),
+ 'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'delivery_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2014, 1, 27, 0, 0)', 'null': 'True', 'blank': 'True'}),
+ 'delivery_place': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DeliveryPlace']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'details': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'entity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Entity']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'financial_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}),
+ 'financial_comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_from_remote_request': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'licence': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DocumentLicence']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'modification_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
+ 'month_order': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
+ 'name': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'nb_pages': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
+ 'sponsor': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
+ 'status': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Status']", 'on_delete': 'models.PROTECT'}),
+ 'uploadfile': ('django.db.models.fields.files.FileField', [], {'max_length': '512', 'blank': 'True'}),
+ 'usage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DocumentUsage']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
+ },
+ 'base.role': {
+ 'Meta': {'object_name': 'Role'},
+ 'id': ('django.db.models.fields.CharField', [], {'max_length': '40', 'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ },
+ 'base.status': {
+ 'Meta': {'ordering': "('order', 'name')", 'object_name': 'Status'},
+ 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
+ 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
+ 'start': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'visible_by': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['base.Role']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'polynum_blackboard.blackboardpush': {
+ 'Meta': {'object_name': 'BlackBoardPush'},
+ 'course_code': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'course_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'failure': ('django.db.models.fields.TextField', [], {'default': "''"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'request': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Request']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
+ 'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'visible_to_students': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ }
+ }
+
+ complete_apps = ['polynum_blackboard'] \ No newline at end of file
diff --git a/polynum_blackboard/models.py b/polynum_blackboard/models.py
index f41852c..70189a1 100644
--- a/polynum_blackboard/models.py
+++ b/polynum_blackboard/models.py
@@ -7,21 +7,23 @@ import constant
class BlackBoardPush(models.Model):
request = models.ForeignKey(Request, on_delete=models.SET_NULL, null=True, blank=True)
- course_name = models.TextField(max_length=64)
+ course_code = models.CharField(max_length=128)
+ course_name = models.CharField(max_length=128)
visible_to_students = models.BooleanField(blank=True)
sent = models.BooleanField(blank=True, default=False)
failure = models.TextField(default='')
created_on = models.DateTimeField(auto_now_add=True)
+ modified = models.DateTimeField(auto_now=True)
def __unicode__(self):
- s = "push to blacboard request {request} into course {course_name}".format(request=self.request,
- course_name=self.course_name)
+ s = u"push to blackboard request {request} into course {course_code}:{course_name}".format(request=self.request,
+ **self.__dict__)
if self.visible_to_students:
- s += ', set it visible to students'
+ s += u', set it visible to students'
if self.sent:
- s += ', already sent'
+ s += u', already sent'
if self.failure:
- s += ', failed: {0}'.format(self.failure)
+ s += u', failed: {0}'.format(self.failure)
return s
diff --git a/polynum_blackboard/templates/document_copyrights.new_request.html b/polynum_blackboard/templates/document_copyrights.new_request.html
index b2e1717..53fd874 100644
--- a/polynum_blackboard/templates/document_copyrights.new_request.html
+++ b/polynum_blackboard/templates/document_copyrights.new_request.html
@@ -51,7 +51,8 @@ option.unavailable {
};
$('.courses-selector').on('change', function (){
$('.courses-selector').not(this).val('');
- $('#id_document_copyrights-course_name').val($(this).val());
+ $('#id_document_copyrights-course_code').val($(this).val());
+ $('#id_document_copyrights-course_name').val($('option:selected', this).text());
});
$('#id_document_copyrights-ue').on('change', function () {
var value = $(this).val();
@@ -70,11 +71,12 @@ option.unavailable {
$.get(url, function (data) {
var $content = $(data);
$('#ue-course-container').html($('#ue-course', $content));
- var val = $('#id_document_copyrights-course_name').val();
+ var val = $('#id_document_copyrights-course_code').val();
$('.courses-selector').val(val);
$('.courses-selector').on('change', function (){
$('.courses-selector').not(this).val('');
- $('#id_document_copyrights-course_name').val($(this).val());
+ $('#id_document_copyrights-course_code').val($(this).val());
+ $('#id_document_copyrights-course_name').val($('option:selected', this).text());
});
});
});
@@ -139,7 +141,7 @@ option.unavailable {
});
toggle_mycourse_panel();
function update_course() {
- var val = $('#id_document_copyrights-course_name').val();
+ var val = $('#id_document_copyrights-course_code').val();
$('.courses-selector').val(val);
};
function install_form() {
@@ -160,7 +162,8 @@ option.unavailable {
$('#create-course').modal('hide');
$('#div_id_document_copyrights-ue .miller-columns').millercolumns(
'setItem', ''+content.entity_pk);
- $('#id_document_copyrights-course_name').val(content.course_code);
+ $('#id_document_copyrights-course_code').val(content.course_code);
+ $('#id_document_copyrights-course_name').val(content.description);
$('#id_document_copyrights-ue').trigger('change');
} else {
var newform = $(content.html);