diff --git a/subjects/forms.py b/subjects/forms.py index 6b1cec7..8de7968 100644 --- a/subjects/forms.py +++ b/subjects/forms.py @@ -9,6 +9,8 @@ class CreateSubjectForm(forms.ModelForm): 'students', ) widgets = { + 'description_brief': forms.Textarea, + 'description': forms.Textarea, 'professor': forms.SelectMultiple, 'students': forms.SelectMultiple, } diff --git a/subjects/migrations/0008_auto_20170103_2044.py b/subjects/migrations/0008_auto_20170103_2044.py new file mode 100644 index 0000000..9097d95 --- /dev/null +++ b/subjects/migrations/0008_auto_20170103_2044.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2017-01-03 23:44 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('subjects', '0007_auto_20170103_1539'), + ] + + operations = [ + migrations.AlterField( + model_name='subject', + name='description', + field=models.TextField(blank=True, verbose_name='description'), + ), + migrations.AlterField( + model_name='subject', + name='description_brief', + field=models.TextField(blank=True, verbose_name='simpler_description'), + ), + ] diff --git a/subjects/models.py b/subjects/models.py index 39a57a7..e023487 100644 --- a/subjects/models.py +++ b/subjects/models.py @@ -18,8 +18,8 @@ class Subject(models.Model): name = models.CharField( _("Name"), unique = True,max_length= 200) slug = AutoSlugField(_("Slug"),populate_from='name',unique=True) - description_brief = models.CharField(_("simpler_description"), max_length= 100, blank=True) - description = models.CharField(_("description"), max_length = 300, blank= True) + description_brief = models.TextField(_("simpler_description"), blank=True) + description = models.TextField(_("description"), blank= True) visible = models.BooleanField(_("visible")) init_date = models.DateField(_('Begin of Subject Date')) diff --git a/subjects/templates/subjects/create.html b/subjects/templates/subjects/create.html index 1a43cac..0b5229e 100644 --- a/subjects/templates/subjects/create.html +++ b/subjects/templates/subjects/create.html @@ -71,7 +71,7 @@ {% render_field field %} {{field.label}} - {% elif field.auto_id == 'id_description' %} + {% elif field.auto_id == 'id_description' or field.auto_id == 'id_description_brief' %} {% render_field field class='form-control text_wysiwyg' %} {% else %} {% render_field field class='form-control' %} -- libgit2 0.21.2