diff --git a/links/forms.py b/links/forms.py index 2349d25..9011530 100644 --- a/links/forms.py +++ b/links/forms.py @@ -29,14 +29,14 @@ class LinkForm(forms.ModelForm): class Meta: model = Link - fields = ['name','link_url', 'brief_description', 'all_students', 'students', 'groups', 'visible'] + fields = ['name','link_url', 'description_brief', 'all_students', 'students', 'groups', 'visible'] labels = { 'name': _('Link name'), 'end_view' : _('End View'), 'end_view_date': _('End View Date') } widgets = { - 'brief_description': forms.Textarea, + 'description_brief': forms.Textarea, 'students': forms.SelectMultiple, 'groups': forms.SelectMultiple, } diff --git a/links/migrations/0007_auto_20170201_1907.py b/links/migrations/0007_auto_20170201_1907.py new file mode 100644 index 0000000..228ade6 --- /dev/null +++ b/links/migrations/0007_auto_20170201_1907.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.4 on 2017-02-01 22:07 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('links', '0006_auto_20170201_1756'), + ] + + operations = [ + migrations.RenameField( + model_name='link', + old_name='description', + new_name='description_brief', + ), + ] diff --git a/links/models.py b/links/models.py index 8876e1d..38704f5 100644 --- a/links/models.py +++ b/links/models.py @@ -10,7 +10,7 @@ from django.utils import timezone class Link(Resource): - description = models.TextField(_("simpler_description"), blank=True) + description_brief = models.TextField(_("simpler_description"), blank=True) link_url = models.URLField(verbose_name = _("Link_URL")) diff --git a/links/templates/links/_form.html b/links/templates/links/_form.html index 6ee271d..c770abc 100644 --- a/links/templates/links/_form.html +++ b/links/templates/links/_form.html @@ -61,18 +61,18 @@
{% trans "Category" %}: {{resource.topic.subject.category.name}}
+{% trans "Subject" %}: {{resource.topic.subject.name}}
+{{resource.description|safe}}
+ {% elif resource.description_brief %} +{{resource.description_brief|safe}}
+ {% endif %} + + {% trans "Access Resource" %} + +