Commit 6d39e7c53d9d3dfba7a73521a9a67dde86f81476

Authored by fbormann
1 parent 209713f8

reverting commit that modified course

app/migrations/0001_initial.py
1 1 # -*- coding: utf-8 -*-
2   -# Generated by Django 1.10 on 2016-11-17 03:09
  2 +
  3 +# Generated by Django 1.10 on 2016-11-15 22:36
3 4 from __future__ import unicode_literals
4 5  
5 6 from django.db import migrations, models
... ... @@ -23,7 +24,7 @@ class Migration(migrations.Migration):
23 24 ('username', models.CharField(max_length=30, verbose_name='Email host username')),
24 25 ('password', models.CharField(blank=True, max_length=30, verbose_name='Email host password')),
25 26 ('safe_conection', models.IntegerField(choices=[(0, 'No'), (1, 'TLS, if available'), (2, 'TLS'), (3, 'SSL')], default=0, verbose_name='Use safe conection')),
26   - ('default_from_email', models.EmailField(max_length=254, verbose_name='Default from email')),
  27 + ('default_from_email', models.EmailField(blank=True, max_length=254, verbose_name='Default from email')),
27 28 ],
28 29 options={
29 30 'verbose_name': 'Amadeus SMTP setting',
... ...
app/migrations/0002_auto_20161115_2054.py 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2016-11-15 23:54
  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 + ('app', '0001_initial'),
  12 + ]
  13 +
  14 + operations = [
  15 + migrations.AlterField(
  16 + model_name='emailbackend',
  17 + name='default_from_email',
  18 + field=models.EmailField(max_length=254, verbose_name='Default from email'),
  19 + ),
  20 + ]
... ...
core/migrations/0001_initial.py
1 1 # -*- coding: utf-8 -*-
2   -# Generated by Django 1.10 on 2016-11-17 03:09
  2 +
  3 +# Generated by Django 1.10 on 2016-11-15 22:36
3 4 from __future__ import unicode_literals
4 5  
5 6 import autoslug.fields
... ...
core/migrations/0002_auto_20161115_1936.py 0 → 100644
... ... @@ -0,0 +1,50 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2016-11-15 22:36
  3 +from __future__ import unicode_literals
  4 +
  5 +from django.conf import settings
  6 +from django.db import migrations, models
  7 +import django.db.models.deletion
  8 +
  9 +
  10 +class Migration(migrations.Migration):
  11 +
  12 + initial = True
  13 +
  14 + dependencies = [
  15 + migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  16 + ('core', '0001_initial'),
  17 + ]
  18 +
  19 + operations = [
  20 + migrations.AddField(
  21 + model_name='notification',
  22 + name='actor',
  23 + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='notification_Performer', to=settings.AUTH_USER_MODEL, verbose_name='Performer'),
  24 + ),
  25 + migrations.AddField(
  26 + model_name='notification',
  27 + name='user',
  28 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notification_Actor', to=settings.AUTH_USER_MODEL, verbose_name='User'),
  29 + ),
  30 + migrations.AddField(
  31 + model_name='log',
  32 + name='action_resource',
  33 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Action_Resource', verbose_name='Action_Resource'),
  34 + ),
  35 + migrations.AddField(
  36 + model_name='log',
  37 + name='user',
  38 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Actor'),
  39 + ),
  40 + migrations.AddField(
  41 + model_name='action_resource',
  42 + name='action',
  43 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Action', verbose_name='Action_Applied'),
  44 + ),
  45 + migrations.AddField(
  46 + model_name='action_resource',
  47 + name='resource',
  48 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Resource', verbose_name='Resource'),
  49 + ),
  50 + ]
... ...
courses/forms.py
... ... @@ -18,30 +18,64 @@ class CategoryCourseForm(forms.ModelForm):
18 18  
19 19  
20 20 class CourseForm(forms.ModelForm):
21   -
  21 + def clean_end_register_date(self):
  22 + init_register_date = self.cleaned_data['init_register_date']
  23 + end_register_date = self.cleaned_data['end_register_date']
  24 +
  25 + if init_register_date and end_register_date and end_register_date < init_register_date:
  26 + raise forms.ValidationError(_('The end date may not be before the start date.'))
  27 + return end_register_date
  28 +
  29 + def clean_init_date(self):
  30 + end_register_date = self.cleaned_data['end_register_date']
  31 + init_date = self.cleaned_data['init_date']
  32 +
  33 + if end_register_date and init_date and init_date <= end_register_date:
  34 + raise forms.ValidationError(_('The course start date must be after the end of registration.'))
  35 + return init_date
  36 +
  37 + def clean_end_date(self):
  38 + init_date = self.cleaned_data['init_date']
  39 + end_date = self.cleaned_data['end_date']
  40 +
  41 + if init_date and end_date and end_date < init_date:
  42 + raise forms.ValidationError(_('The end date may not be before the start date.'))
  43 + return end_date
22 44  
23 45  
24 46 class Meta:
25 47 model = Course
26   - fields = ('name', 'description',
27   - 'category', 'coordenator','public')
  48 + fields = ('name', 'objectivies', 'content', 'max_students', 'init_register_date', 'end_register_date',
  49 + 'init_date', 'end_date', 'category', 'coordenator','public')
28 50 labels = {
29 51 'name': _('Name'),
  52 + 'objectivies': _('Objectives'),
30 53 'content': _('Content'),
  54 + 'max_students': _('Number of studets maximum'),
  55 + 'init_register_date': _('Course registration start date'),
  56 + 'end_register_date': _('Course registration end date'),
  57 + 'init_date': _('Course start date'),
  58 + 'end_date': _('Course end date'),
31 59 'category': _('Category'),
32 60 'coordenator': _('Coordenator'),
33 61 'public':_('Public'),
34 62 }
35 63 help_texts = {
36 64 'name': _('Course name'),
  65 + 'objectivies': _('Course objective'),
37 66 'content': _('Course modules'),
  67 + 'max_students': _('Max number of students that a class can have'),
  68 + 'init_register_date': _('Date that starts the registration period of the course (dd/mm/yyyy)'),
  69 + 'end_register_date': _('Date that ends the registration period of the course (dd/mm/yyyy)'),
  70 + 'init_date': _('Date that the course starts (dd/mm/yyyy)'),
  71 + 'end_date': _('Date that the course ends (dd/mm/yyyy)'),
38 72 'category': _('CourseCategory which the course belongs'),
39 73 'coordenator': _('Course Coordenator'),
40 74 'public':_('To define if the course can be accessed by people not registered'),
41 75 }
42 76  
43 77 widgets = {
44   - 'category': forms.Select(),
  78 + 'ategoy': forms.Select(),
45 79 'coordenator': forms.Select(),
46 80 'content': SummernoteWidget(),
47 81 'objectivies': SummernoteWidget(),
... ... @@ -49,31 +83,70 @@ class CourseForm(forms.ModelForm):
49 83  
50 84 class UpdateCourseForm(CourseForm):
51 85  
  86 + def clean_end_register_date(self):
  87 + init_register_date = self.cleaned_data['init_register_date']
  88 + end_register_date = self.cleaned_data['end_register_date']
  89 +
  90 + if init_register_date and end_register_date and end_register_date < init_register_date:
  91 + raise forms.ValidationError(_('The end date may not be before the start date.'))
  92 + return end_register_date
  93 +
  94 + def clean_init_date(self):
  95 + end_register_date = self.cleaned_data['end_register_date']
  96 + init_date = self.cleaned_data['init_date']
  97 +
  98 + if end_register_date and init_date and init_date <= end_register_date:
  99 + raise forms.ValidationError(_('The course start date must be after the end of registration.'))
  100 + return init_date
  101 +
  102 + def clean_end_date(self):
  103 + init_date = self.cleaned_data['init_date']
  104 + end_date = self.cleaned_data['end_date']
  105 +
  106 + if init_date and end_date and end_date < init_date:
  107 + raise forms.ValidationError(_('The end date may not be before the start date.'))
  108 + return end_date
  109 +
52 110 def __init__(self, *args, **kwargs):
53 111 super(UpdateCourseForm, self).__init__(*args, **kwargs)
  112 + self.fields["students"].required = False
54 113  
55 114 class Meta:
56 115 model = Course
57   - fields = ('name', 'description',
58   - 'category', 'coordenator','public')
  116 + fields = ('name', 'objectivies', 'content', 'max_students', 'init_register_date', 'end_register_date',
  117 + 'init_date', 'end_date', 'category','students', 'coordenator','public')
59 118 labels = {
60 119 'name': _('Name'),
61   - 'description': _('Description'),
  120 + 'objectivies': _('Objectives'),
  121 + 'content': _('Content'),
  122 + 'max_students': _('Number of studets maximum'),
  123 + 'init_register_date': _('Course registration start date'),
  124 + 'end_register_date': _('Course registration end date'),
  125 + 'init_date': _('Course start date'),
  126 + 'end_date': _('Course end date'),
62 127 'category': _('Category'),
63 128 'coordenator': _('Coordenator'),
  129 + 'students': _('Student'),
64 130 'public':_('Public'),
65 131 }
66 132 help_texts = {
67 133 'name': _('Course name'),
68   - 'description': _('Description about the course'),
  134 + 'objectivies': _('Course objective'),
  135 + 'content': _('Course modules'),
  136 + 'max_students': _('Max number of students that a class can have'),
  137 + 'init_register_date': _('Date that starts the registration period of the course (dd/mm/yyyy)'),
  138 + 'end_register_date': _('Date that ends the registration period of the course (dd/mm/yyyy)'),
  139 + 'init_date': _('Date that the course starts (dd/mm/yyyy)'),
  140 + 'end_date': _('Date that the course ends (dd/mm/yyyy)'),
69 141 'category': _('CourseCategory which the course belongs'),
70 142 'coordenator': _('Course Coordenator'),
  143 + 'students': _("Course's Students"),
71 144 'public':_('To define if the course can be accessed by people not registered'),
72 145 }
73 146 widgets = {
74   - 'category': forms.Select(),
  147 + 'categoy': forms.Select(),
75 148 'coordenator': forms.Select(),
76   - 'description': SummernoteWidget(),
  149 + 'content': SummernoteWidget(),
77 150 'objectivies': SummernoteWidget(),
78 151 }
79 152  
... ...
courses/migrations/0001_initial.py
1 1 # -*- coding: utf-8 -*-
2   -# Generated by Django 1.10 on 2016-11-17 03:09
  2 +
  3 +# Generated by Django 1.10 on 2016-11-15 22:36
3 4 from __future__ import unicode_literals
4 5  
5 6 import autoslug.fields
... ... @@ -57,13 +58,20 @@ class Migration(migrations.Migration):
57 58 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
58 59 ('name', models.CharField(max_length=100, verbose_name='Name')),
59 60 ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True, verbose_name='Slug')),
60   - ('description', models.TextField(blank=True, verbose_name='Content')),
  61 + ('objectivies', models.TextField(blank=True, verbose_name='Objectivies')),
  62 + ('content', models.TextField(blank=True, verbose_name='Content')),
  63 + ('max_students', models.PositiveIntegerField(blank=True, verbose_name='Maximum Students')),
  64 + ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='Creation Date')),
  65 + ('init_register_date', models.DateField(verbose_name='Register Date (Begin)')),
  66 + ('end_register_date', models.DateField(verbose_name='Register Date (End)')),
  67 + ('init_date', models.DateField(verbose_name='Begin of Course Date')),
  68 + ('end_date', models.DateField(verbose_name='End of Course Date')),
61 69 ('public', models.BooleanField(default=False, verbose_name='Public')),
62 70 ],
63 71 options={
64 72 'verbose_name': 'Course',
65   - 'ordering': ('name',),
66 73 'verbose_name_plural': 'Courses',
  74 + 'ordering': ('create_date', 'name'),
67 75 },
68 76 ),
69 77 migrations.CreateModel(
... ... @@ -121,8 +129,8 @@ class Migration(migrations.Migration):
121 129 ],
122 130 options={
123 131 'verbose_name': 'Subject',
124   - 'ordering': ('create_date', 'name'),
125 132 'verbose_name_plural': 'Subjects',
  133 + 'ordering': ('create_date', 'name'),
126 134 },
127 135 ),
128 136 migrations.CreateModel(
... ... @@ -153,8 +161,8 @@ class Migration(migrations.Migration):
153 161 ],
154 162 options={
155 163 'verbose_name': 'Topic',
156   - 'ordering': ('create_date', 'name'),
157 164 'verbose_name_plural': 'Topics',
  165 + 'ordering': ('create_date', 'name'),
158 166 },
159 167 ),
160 168 ]
... ...
courses/migrations/0002_auto_20161115_1936.py 0 → 100644
... ... @@ -0,0 +1,85 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2016-11-15 22:36
  3 +from __future__ import unicode_literals
  4 +
  5 +from django.conf import settings
  6 +from django.db import migrations, models
  7 +import django.db.models.deletion
  8 +
  9 +
  10 +class Migration(migrations.Migration):
  11 +
  12 + initial = True
  13 +
  14 + dependencies = [
  15 + ('courses', '0001_initial'),
  16 + migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  17 + ]
  18 +
  19 + operations = [
  20 + migrations.AddField(
  21 + model_name='subject',
  22 + name='professors',
  23 + field=models.ManyToManyField(related_name='professors_subjects', to=settings.AUTH_USER_MODEL, verbose_name='Professors'),
  24 + ),
  25 + migrations.AddField(
  26 + model_name='subject',
  27 + name='students',
  28 + field=models.ManyToManyField(blank=True, related_name='subject_student', to=settings.AUTH_USER_MODEL, verbose_name='Students'),
  29 + ),
  30 + migrations.AddField(
  31 + model_name='material',
  32 + name='students',
  33 + field=models.ManyToManyField(related_name='materials', to=settings.AUTH_USER_MODEL, verbose_name='Students'),
  34 + ),
  35 + migrations.AddField(
  36 + model_name='material',
  37 + name='topic',
  38 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='materials', to='courses.Topic', verbose_name='Topic'),
  39 + ),
  40 + migrations.AddField(
  41 + model_name='linkmaterial',
  42 + name='material',
  43 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='material_link', to='courses.Material', verbose_name='Material'),
  44 + ),
  45 + migrations.AddField(
  46 + model_name='filematerial',
  47 + name='material',
  48 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='material_file', to='courses.Material', verbose_name='Material'),
  49 + ),
  50 + migrations.AddField(
  51 + model_name='course',
  52 + name='category',
  53 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_category', to='courses.CourseCategory', verbose_name='Category'),
  54 + ),
  55 + migrations.AddField(
  56 + model_name='course',
  57 + name='coordenator',
  58 + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='course_coordenator', to=settings.AUTH_USER_MODEL, verbose_name='Coordenator'),
  59 + ),
  60 + migrations.AddField(
  61 + model_name='course',
  62 + name='professors',
  63 + field=models.ManyToManyField(related_name='courses_professors', to=settings.AUTH_USER_MODEL, verbose_name='Professors'),
  64 + ),
  65 + migrations.AddField(
  66 + model_name='course',
  67 + name='students',
  68 + field=models.ManyToManyField(blank=True, related_name='courses_student', to=settings.AUTH_USER_MODEL, verbose_name='Students'),
  69 + ),
  70 + migrations.AddField(
  71 + model_name='activityfile',
  72 + name='diet',
  73 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='courses.Activity'),
  74 + ),
  75 + migrations.AddField(
  76 + model_name='activity',
  77 + name='students',
  78 + field=models.ManyToManyField(related_name='activities', to=settings.AUTH_USER_MODEL, verbose_name='Students'),
  79 + ),
  80 + migrations.AddField(
  81 + model_name='activity',
  82 + name='topic',
  83 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activities', to='courses.Topic', verbose_name='Topic'),
  84 + ),
  85 + ]
... ...
courses/models.py
... ... @@ -38,13 +38,22 @@ class Course(models.Model):
38 38  
39 39 name = models.CharField(_('Name'), max_length = 100)
40 40 slug = AutoSlugField(_("Slug"),populate_from='name',unique=True)
41   - description = models.TextField(_('Content'), blank = True)
  41 + objectivies = models.TextField(_('Objectivies'), blank = True)
  42 + content = models.TextField(_('Content'), blank = True)
  43 + max_students = models.PositiveIntegerField(_('Maximum Students'), blank = True)
  44 + create_date = models.DateTimeField(_('Creation Date'), auto_now_add = True)
  45 + init_register_date = models.DateField(_('Register Date (Begin)'))
  46 + end_register_date = models.DateField(_('Register Date (End)'))
  47 + init_date = models.DateField(_('Begin of Course Date'))
  48 + end_date = models.DateField(_('End of Course Date'))
42 49 category = models.ForeignKey(CourseCategory, verbose_name = _('Category'), related_name='course_category')
43 50 coordenator = models.ForeignKey(User, verbose_name = _('Coordenator'), related_name ='course_coordenator', null = True)
  51 + professors = models.ManyToManyField(User,verbose_name=_('Professors'), related_name='courses_professors')
  52 + students = models.ManyToManyField(User,verbose_name=_('Students'), related_name='courses_student', blank = True)
44 53 public = models.BooleanField(_('Public'), default=False)
45 54  
46 55 class Meta:
47   - ordering = ('name',)
  56 + ordering = ('create_date','name')
48 57 verbose_name = _('Course')
49 58 verbose_name_plural = _('Courses')
50 59  
... ...
courses/templates/course/course_card.html
... ... @@ -52,7 +52,7 @@
52 52 <div class="modal-dialog" role="document">
53 53 <div class="modal-content">
54 54 <div class="modal-header">
55   - <h4 class="modal-title">{% trans 'Replicate Course' %}</h4>
  55 + <h4 class="modal-title">{% trans 'Repicate Course' %}</h4>
56 56 </div>
57 57 <div class="modal-body">
58 58 <section>
... ...
exam/migrations/0001_initial.py
1 1 # -*- coding: utf-8 -*-
2   -# Generated by Django 1.10 on 2016-11-17 03:09
  2 +
  3 +# Generated by Django 1.10 on 2016-11-15 22:36
3 4 from __future__ import unicode_literals
4 5  
5 6 from django.db import migrations, models
... ... @@ -26,6 +27,7 @@ class Migration(migrations.Migration):
26 27 'verbose_name': 'Answer',
27 28 'ordering': ('order',),
28 29 'verbose_name_plural': 'Answers',
  30 + 'ordering': ('order',),
29 31 },
30 32 ),
31 33 migrations.CreateModel(
... ...
exam/migrations/0002_auto_20161115_1936.py 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2016-11-15 22:36
  3 +from __future__ import unicode_literals
  4 +
  5 +from django.conf import settings
  6 +from django.db import migrations, models
  7 +import django.db.models.deletion
  8 +
  9 +
  10 +class Migration(migrations.Migration):
  11 +
  12 + initial = True
  13 +
  14 + dependencies = [
  15 + migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  16 + ('exam', '0001_initial'),
  17 + ]
  18 +
  19 + operations = [
  20 + migrations.AddField(
  21 + model_name='answersstudent',
  22 + name='student',
  23 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student', to=settings.AUTH_USER_MODEL, verbose_name='Student'),
  24 + ),
  25 + migrations.AddField(
  26 + model_name='answer',
  27 + name='exam',
  28 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='answers', to='exam.Exam', verbose_name='Answers'),
  29 + ),
  30 + ]
... ...
exercise/migrations/0001_initial.py
1 1 # -*- coding: utf-8 -*-
2   -# Generated by Django 1.10 on 2016-11-17 03:09
  2 +
  3 +# Generated by Django 1.10 on 2016-11-15 22:36
3 4 from __future__ import unicode_literals
4 5  
5 6 from decimal import Decimal
... ...
files/migrations/0001_initial.py
1 1 # -*- coding: utf-8 -*-
2   -# Generated by Django 1.10 on 2016-11-17 03:09
  2 +# Generated by Django 1.10 on 2016-11-15 22:36
3 3 from __future__ import unicode_literals
4 4  
5 5 from django.db import migrations, models
... ... @@ -27,8 +27,9 @@ class Migration(migrations.Migration):
27 27 ],
28 28 options={
29 29 'verbose_name': 'File',
30   - 'ordering': ('-id',),
  30 +
31 31 'verbose_name_plural': 'Files',
  32 + 'ordering': ('-id',),
32 33 },
33 34 bases=('courses.material',),
34 35 ),
... ...
files/migrations/0002_topicfile_professor.py
1 1 # -*- coding: utf-8 -*-
2   -# Generated by Django 1.10 on 2016-11-17 03:09
  2 +
  3 +# Generated by Django 1.10 on 2016-11-15 22:36
3 4 from __future__ import unicode_literals
4 5  
5 6 from django.conf import settings
... ...
forum/migrations/0001_initial.py
1 1 # -*- coding: utf-8 -*-
2   -# Generated by Django 1.10 on 2016-11-17 03:09
  2 +
  3 +# Generated by Django 1.10 on 2016-11-15 22:36
3 4 from __future__ import unicode_literals
4 5  
5 6 from django.db import migrations, models
... ...
forum/migrations/0002_auto_20161115_1936.py 0 → 100644
... ... @@ -0,0 +1,35 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2016-11-15 22:36
  3 +from __future__ import unicode_literals
  4 +
  5 +from django.conf import settings
  6 +from django.db import migrations, models
  7 +import django.db.models.deletion
  8 +
  9 +
  10 +class Migration(migrations.Migration):
  11 +
  12 + initial = True
  13 +
  14 + dependencies = [
  15 + ('forum', '0001_initial'),
  16 + migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  17 + ]
  18 +
  19 + operations = [
  20 + migrations.AddField(
  21 + model_name='postanswer',
  22 + name='user',
  23 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Autor'),
  24 + ),
  25 + migrations.AddField(
  26 + model_name='post',
  27 + name='forum',
  28 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='forum.Forum', verbose_name='Forum'),
  29 + ),
  30 + migrations.AddField(
  31 + model_name='post',
  32 + name='user',
  33 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Autor'),
  34 + ),
  35 + ]
... ...
links/migrations/0001_initial.py
1 1 # -*- coding: utf-8 -*-
2   -# Generated by Django 1.10 on 2016-11-17 03:09
  2 +# Generated by Django 1.10 on 2016-11-15 22:36
3 3 from __future__ import unicode_literals
4 4  
5 5 from django.db import migrations, models
... ...
poll/migrations/0001_initial.py
1 1 # -*- coding: utf-8 -*-
2   -# Generated by Django 1.10 on 2016-11-17 03:09
  2 +
  3 +# Generated by Django 1.10 on 2016-11-15 22:36
3 4 from __future__ import unicode_literals
4 5  
5 6 from django.db import migrations, models
... ...
poll/migrations/0002_auto_20161115_1936.py 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2016-11-15 22:36
  3 +from __future__ import unicode_literals
  4 +
  5 +from django.conf import settings
  6 +from django.db import migrations, models
  7 +import django.db.models.deletion
  8 +
  9 +
  10 +class Migration(migrations.Migration):
  11 +
  12 + initial = True
  13 +
  14 + dependencies = [
  15 + migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  16 + ('poll', '0001_initial'),
  17 + ]
  18 +
  19 + operations = [
  20 + migrations.AddField(
  21 + model_name='answersstudent',
  22 + name='student',
  23 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='answers_stundent', to=settings.AUTH_USER_MODEL, verbose_name='Student'),
  24 + ),
  25 + migrations.AddField(
  26 + model_name='answer',
  27 + name='poll',
  28 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='answers', to='poll.Poll', verbose_name='Answers'),
  29 + ),
  30 + ]
... ...
users/migrations/0001_initial.py
1 1 # -*- coding: utf-8 -*-
2   -# Generated by Django 1.10 on 2016-11-17 03:09
  2 +
  3 +# Generated by Django 1.10 on 2016-11-15 22:36
3 4 from __future__ import unicode_literals
4 5  
5 6 import django.contrib.auth.models
... ... @@ -30,14 +31,14 @@ class Migration(migrations.Migration):
30 31 ('city', models.CharField(blank=True, max_length=90, verbose_name='City')),
31 32 ('state', models.CharField(blank=True, max_length=30, verbose_name='State')),
32 33 ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1, verbose_name='Gender')),
33   - ('image', models.ImageField(blank=True, null=True, upload_to='users/', verbose_name='Photo')),
34   - ('birth_date', models.DateField(null=True, verbose_name='Birth Date')),
  34 + ('image', models.ImageField(blank=True, null=True, upload_to='users/', verbose_name='Image')),
  35 + ('birth_date', models.DateField(verbose_name='Birth Date')),
35 36 ('phone', models.CharField(blank=True, max_length=30, verbose_name='Phone')),
36   - ('cpf', models.CharField(blank=True, max_length=15, null=True, verbose_name='CPF')),
  37 + ('cpf', models.CharField(max_length=15, verbose_name='Cpf')),
37 38 ('type_profile', models.IntegerField(blank=True, choices=[(1, 'Professor'), (2, 'Student')], default=2, null=True, verbose_name='Type')),
38 39 ('titration', models.CharField(blank=True, max_length=50, null=True, verbose_name='Titration')),
39 40 ('year_titration', models.CharField(blank=True, max_length=4, null=True, verbose_name='Year of titration')),
40   - ('institution', models.CharField(blank=True, max_length=50, null=True, verbose_name='Institution')),
  41 + ('institution', models.CharField(blank=True, max_length=50, null=True, verbose_name='Institution where he had titration')),
41 42 ('curriculum', models.FileField(blank=True, null=True, upload_to='users/curriculum/', verbose_name='Curriculum')),
42 43 ('date_created', models.DateTimeField(auto_now_add=True, verbose_name='Create Date')),
43 44 ('is_staff', models.BooleanField(default=False, verbose_name='Administrador')),
... ...
users/migrations/0002_auto_20161115_1941.py 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2016-11-15 22:41
  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 + ('users', '0001_initial'),
  12 + ]
  13 +
  14 + operations = [
  15 + migrations.AlterField(
  16 + model_name='user',
  17 + name='birth_date',
  18 + field=models.DateField(null=True, verbose_name='Birth Date'),
  19 + ),
  20 + ]
... ...
users/migrations/0003_auto_20161115_2054.py 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2016-11-15 23:54
  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 + ('users', '0002_auto_20161115_1941'),
  12 + ]
  13 +
  14 + operations = [
  15 + migrations.AlterField(
  16 + model_name='user',
  17 + name='cpf',
  18 + field=models.CharField(blank=True, max_length=15, null=True, verbose_name='CPF'),
  19 + ),
  20 + migrations.AlterField(
  21 + model_name='user',
  22 + name='image',
  23 + field=models.ImageField(blank=True, null=True, upload_to='users/', verbose_name='Photo'),
  24 + ),
  25 + migrations.AlterField(
  26 + model_name='user',
  27 + name='institution',
  28 + field=models.CharField(blank=True, max_length=50, null=True, verbose_name='Institution'),
  29 + ),
  30 + ]
... ...