commit
70f07e602b
6 changed files with 86 additions and 17 deletions
@ -0,0 +1,22 @@ |
||||
from rest_framework import serializers |
||||
|
||||
from apps.school.models import SchoolSchedule |
||||
|
||||
|
||||
class SchoolScheduleSerializer(serializers.ModelSerializer): |
||||
|
||||
class Meta: |
||||
model = SchoolSchedule |
||||
fields = ( |
||||
'id', |
||||
'weekday', |
||||
'title', |
||||
'description', |
||||
'materials', |
||||
'age', |
||||
'month_price', |
||||
) |
||||
|
||||
read_only_fields = ( |
||||
'id', |
||||
) |
||||
@ -0,0 +1,18 @@ |
||||
# Generated by Django 2.0.2 on 2018-02-21 08:22 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('school', '0001_initial'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='schoolschedule', |
||||
name='age', |
||||
field=models.PositiveSmallIntegerField(default=0, verbose_name='Возраст'), |
||||
), |
||||
] |
||||
@ -0,0 +1,17 @@ |
||||
# Generated by Django 2.0.2 on 2018-02-21 09:01 |
||||
|
||||
from django.db import migrations |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('school', '0002_schoolschedule_age'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterModelOptions( |
||||
name='schoolschedule', |
||||
options={'ordering': ('weekday',), 'verbose_name': 'Расписание', 'verbose_name_plural': 'Расписания'}, |
||||
), |
||||
] |
||||
Loading…
Reference in new issue