Commit 651defffe195b847f2d78e8e51c3b4a624154ec6
1 parent
7d38f517
Exists in
master
and in
3 other branches
modifying links description brief, model and resource_card
Showing
7 changed files
with
70 additions
and
15 deletions
Show diff stats
... | ... | @@ -0,0 +1,21 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10.4 on 2017-02-01 23:10 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.conf import settings | |
6 | +from django.db import migrations, models | |
7 | + | |
8 | + | |
9 | +class Migration(migrations.Migration): | |
10 | + | |
11 | + dependencies = [ | |
12 | + ('categories', '0011_auto_20170201_1732'), | |
13 | + ] | |
14 | + | |
15 | + operations = [ | |
16 | + migrations.AlterField( | |
17 | + model_name='category', | |
18 | + name='coordinators', | |
19 | + field=models.ManyToManyField(blank=True, related_name='coordinators', to=settings.AUTH_USER_MODEL), | |
20 | + ), | |
21 | + ] | ... | ... |
links/forms.py
... | ... | @@ -29,14 +29,14 @@ class LinkForm(forms.ModelForm): |
29 | 29 | |
30 | 30 | class Meta: |
31 | 31 | model = Link |
32 | - fields = ['name','link_url', 'description_brief', 'all_students', 'students', 'groups', 'visible'] | |
32 | + fields = ['name','link_url', 'brief_description', 'all_students', 'students', 'groups', 'visible'] | |
33 | 33 | labels = { |
34 | 34 | 'name': _('Link name'), |
35 | 35 | 'end_view' : _('End View'), |
36 | 36 | 'end_view_date': _('End View Date') |
37 | 37 | } |
38 | 38 | widgets = { |
39 | - 'description_brief': forms.Textarea, | |
39 | + 'brief_description': forms.Textarea, | |
40 | 40 | 'students': forms.SelectMultiple, |
41 | 41 | 'groups': forms.SelectMultiple, |
42 | 42 | } | ... | ... |
... | ... | @@ -0,0 +1,19 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10.4 on 2017-02-01 23:10 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.db import migrations | |
6 | + | |
7 | + | |
8 | +class Migration(migrations.Migration): | |
9 | + | |
10 | + dependencies = [ | |
11 | + ('links', '0007_auto_20170201_1907'), | |
12 | + ] | |
13 | + | |
14 | + operations = [ | |
15 | + migrations.RemoveField( | |
16 | + model_name='link', | |
17 | + name='description_brief', | |
18 | + ), | |
19 | + ] | ... | ... |
links/models.py
... | ... | @@ -8,10 +8,6 @@ from users.models import User |
8 | 8 | from django.utils import timezone |
9 | 9 | # Create your models here. |
10 | 10 | class Link(Resource): |
11 | - | |
12 | - | |
13 | - description_brief = models.TextField(_("simpler_description"), blank=True) | |
14 | - | |
15 | 11 | link_url = models.URLField(verbose_name = _("Link_URL")) |
16 | 12 | |
17 | 13 | ... | ... |
links/templates/links/_form.html
... | ... | @@ -61,18 +61,18 @@ |
61 | 61 | |
62 | 62 | |
63 | 63 | <div class="form-group{% if form.has_error %} has-error {% endif %} is-fileinput"> |
64 | - <label for="{{ form.description_brief.auto_id }}">{{ form.description_brief.label }}</label> | |
65 | - {% render_field form.description_brief class='form-control text_wysiwyg' %} | |
64 | + <label for="{{ form.brief_description.auto_id }}">{{ form.brief_description.label }}</label> | |
65 | + {% render_field form.brief_description class='form-control text_wysiwyg' %} | |
66 | 66 | |
67 | - <span id="helpBlock" class="help-block">{{ form.description_brief.help_text }}</span> | |
67 | + <span id="helpBlock" class="help-block">{{ form.brief_description.help_text }}</span> | |
68 | 68 | |
69 | - {% if form.description_brief.errors %} | |
69 | + {% if form.brief_description.errors %} | |
70 | 70 | <div class="alert alert-danger alert-dismissible" role="alert"> |
71 | 71 | <button type="button" class="close" data-dismiss="alert" aria-label="Close"> |
72 | 72 | <span aria-hidden="true">×</span> |
73 | 73 | </button> |
74 | 74 | <ul> |
75 | - {% for error in form.description_brief.errors %} | |
75 | + {% for error in form.brief_description.errors %} | |
76 | 76 | <li>{{ error }}</li> |
77 | 77 | {% endfor %} |
78 | 78 | </ul> | ... | ... |
... | ... | @@ -0,0 +1,20 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10.4 on 2017-02-01 23:10 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.db import migrations, models | |
6 | + | |
7 | + | |
8 | +class Migration(migrations.Migration): | |
9 | + | |
10 | + dependencies = [ | |
11 | + ('pendencies', '0004_auto_20170124_0128'), | |
12 | + ] | |
13 | + | |
14 | + operations = [ | |
15 | + migrations.AlterField( | |
16 | + model_name='pendencies', | |
17 | + name='action', | |
18 | + field=models.CharField(blank=True, choices=[('view', 'Visualize'), ('create', 'Create'), ('answer', 'Answer'), ('access', 'Access'), ('finish', 'Finish')], max_length=100, verbose_name='Action'), | |
19 | + ), | |
20 | + ] | ... | ... |
subjects/templates/subjects/resource_card.html
... | ... | @@ -51,10 +51,9 @@ |
51 | 51 | <p><b>{% trans "Subject" %}:</b> {{resource.topic.subject.name}}</p> |
52 | 52 | </div> |
53 | 53 | </div> |
54 | - {% if resource.description %} | |
55 | - <p>{{resource.description|safe}}</p> | |
56 | - {% elif resource.description_brief %} | |
57 | - <p>{{resource.description_brief|safe}}</p> | |
54 | + {% if resource.brief_description %} | |
55 | + <p>{{resource.brief_description|safe}}</p> | |
56 | + | |
58 | 57 | {% endif %} |
59 | 58 | |
60 | 59 | <a href="{% url resource.access_link resource.slug %}" class="btn btn-success btn-raised"> {% trans "Access Resource" %}</a> | ... | ... |