Commit 84a69b58684c7be59877abd5a4153e8ee49560cb
1 parent
c53a1c37
Exists in
master
and in
5 other branches
Ajuste no template de home courses #49
Showing
3 changed files
with
32 additions
and
2 deletions
Show diff stats
... | ... | @@ -0,0 +1,28 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-09-16 03:01 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.db import migrations, models | |
6 | +import django.utils.timezone | |
7 | + | |
8 | + | |
9 | +class Migration(migrations.Migration): | |
10 | + | |
11 | + dependencies = [ | |
12 | + ('courses', '0012_course_students'), | |
13 | + ] | |
14 | + | |
15 | + operations = [ | |
16 | + migrations.AddField( | |
17 | + model_name='subject', | |
18 | + name='end_date', | |
19 | + field=models.DateField(default=django.utils.timezone.now, verbose_name='End of Subject Date'), | |
20 | + preserve_default=False, | |
21 | + ), | |
22 | + migrations.AddField( | |
23 | + model_name='subject', | |
24 | + name='init_date', | |
25 | + field=models.DateField(default=django.utils.timezone.now, verbose_name='Begin of Subject Date'), | |
26 | + preserve_default=False, | |
27 | + ), | |
28 | + ] | ... | ... |
courses/models.py
... | ... | @@ -47,6 +47,8 @@ class Subject(models.Model): |
47 | 47 | slug = AutoSlugField(_("Slug"),populate_from='name',unique=True) |
48 | 48 | description = models.TextField(_('Description'), blank = True) |
49 | 49 | visible = models.BooleanField(_('Visible'), default = False) |
50 | + init_date = models.DateField(_('Begin of Subject Date')) | |
51 | + end_date = models.DateField(_('End of Subject Date')) | |
50 | 52 | create_date = models.DateTimeField(_('Creation Date'), auto_now_add = True) |
51 | 53 | update_date = models.DateTimeField(_('Date of last update'), auto_now=True) |
52 | 54 | course = models.ForeignKey(Course, verbose_name = _('Course'), related_name="subjects") | ... | ... |
courses/templates/course/view.html
... | ... | @@ -92,10 +92,10 @@ |
92 | 92 | </p> |
93 | 93 | <div class="row"> |
94 | 94 | <div class="col-xs-6 col-md-6"> |
95 | - {# <p><b>{% trans "Begining" %}: </b>{{subject.init_date}}</p>#} | |
95 | + <p><b>{% trans "Begining" %}: </b>{{subject.init_date}}</p> | |
96 | 96 | </div> |
97 | 97 | <div class="col-xs-6 col-md-6"> |
98 | - {# <p><b>End: </b>23/08/2019</p>#} | |
98 | + <p><b>{% trans "End" %}: </b>{{subject.end_date}}</p> | |
99 | 99 | </div> |
100 | 100 | </div> |
101 | 101 | </div> | ... | ... |