parent
9ace79accd
commit
89150bb294
24 changed files with 213 additions and 338 deletions
@ -0,0 +1,20 @@ |
||||
# -*- coding: utf-8 -*- |
||||
# Generated by Django 1.11.6 on 2018-01-15 19:53 |
||||
from __future__ import unicode_literals |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('access', '0002_init_group'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='progresslesson', |
||||
name='date', |
||||
field=models.DateTimeField(auto_now_add=True, verbose_name='Дата зачтения задания'), |
||||
), |
||||
] |
||||
@ -1,10 +1,6 @@ |
||||
from django.contrib import admin |
||||
|
||||
from courses.models import Course, Topic, Lesson, Requirement, Question, RightAnswer |
||||
|
||||
from courses.models import Course, Topic, Lesson |
||||
admin.site.register(Topic) |
||||
admin.site.register(Lesson) |
||||
admin.site.register(Course) |
||||
admin.site.register(Requirement) |
||||
admin.site.register(Question) |
||||
admin.site.register(RightAnswer) |
||||
admin.site.register(Course) |
||||
@ -1,42 +0,0 @@ |
||||
from __future__ import unicode_literals |
||||
|
||||
from courses.models import Requirement, Question |
||||
|
||||
from django.db import migrations |
||||
|
||||
|
||||
def init_demands(*_args, **_kwargs): |
||||
requirement, created = Requirement.objects.get_or_create( |
||||
min_balls=51, |
||||
name="Стандартные требования", |
||||
) |
||||
|
||||
Question.objects.get_or_create( |
||||
requirement=requirement, |
||||
text='Комментарий', |
||||
type='text', |
||||
null=True, |
||||
balls=50, |
||||
) |
||||
|
||||
Question.objects.get_or_create( |
||||
requirement=requirement, |
||||
text='Приложенные файлы', |
||||
type='files', |
||||
null=True, |
||||
multiple=True, |
||||
balls=50, |
||||
) |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
initial = True |
||||
|
||||
dependencies = [ |
||||
('courses', '0001_initial'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.RunPython(init_demands) |
||||
] |
||||
@ -1,20 +0,0 @@ |
||||
# -*- coding: utf-8 -*- |
||||
# Generated by Django 1.11.6 on 2018-01-12 16:02 |
||||
from __future__ import unicode_literals |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('courses', '0002_init_demands'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='lesson', |
||||
name='old_id', |
||||
field=models.IntegerField(blank=True, null=True), |
||||
), |
||||
] |
||||
Loading…
Reference in new issue