commit
cdf1b366bd
15 changed files with 497 additions and 54 deletions
@ -0,0 +1,11 @@ |
|||||||
|
import django_filters |
||||||
|
|
||||||
|
from .models import Course |
||||||
|
|
||||||
|
|
||||||
|
class CourseFilter(django_filters.FilterSet): |
||||||
|
category = django_filters.CharFilter(field_name='category__title', lookup_expr='iexact') |
||||||
|
|
||||||
|
class Meta: |
||||||
|
model = Course |
||||||
|
fields = ['category'] |
||||||
@ -0,0 +1,285 @@ |
|||||||
|
[ |
||||||
|
{ |
||||||
|
"model": "course.course", |
||||||
|
"pk": 1, |
||||||
|
"fields": { |
||||||
|
"author": 1, |
||||||
|
"title": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438", |
||||||
|
"short_description": "\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u0442\u044f\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u043e\u0440\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u0438 \u0445\u0430\u0440\u0438\u0437\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.", |
||||||
|
"cover": "courses/pic-1_sTaZawQ.jpg", |
||||||
|
"price": "50.00", |
||||||
|
"is_infinite": false, |
||||||
|
"deferred_start_at": null, |
||||||
|
"category": 2, |
||||||
|
"duration": 1, |
||||||
|
"is_featured": false, |
||||||
|
"url": "https://gitlab.com/", |
||||||
|
"status": 0, |
||||||
|
"created_at": "2018-01-27T07:04:41.113Z", |
||||||
|
"update_at": "2018-01-27T07:12:04.168Z" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.course", |
||||||
|
"pk": 2, |
||||||
|
"fields": { |
||||||
|
"author": 1, |
||||||
|
"title": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438", |
||||||
|
"short_description": "\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u0442\u044f\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u043e\u0440\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u0438 \u0445\u0430\u0440\u0438\u0437\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.", |
||||||
|
"cover": "courses/pic-1_sTaZawQ.jpg", |
||||||
|
"price": "50.00", |
||||||
|
"is_infinite": false, |
||||||
|
"deferred_start_at": null, |
||||||
|
"category": 1, |
||||||
|
"duration": 1, |
||||||
|
"is_featured": false, |
||||||
|
"url": "https://gitlab.com/", |
||||||
|
"status": 0, |
||||||
|
"created_at": "2018-01-27T07:09:03.437Z", |
||||||
|
"update_at": "2018-01-27T07:11:55.373Z" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.course", |
||||||
|
"pk": 3, |
||||||
|
"fields": { |
||||||
|
"author": 1, |
||||||
|
"title": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438", |
||||||
|
"short_description": "\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u0442\u044f\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u043e\u0440\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u0438 \u0445\u0430\u0440\u0438\u0437\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.", |
||||||
|
"cover": "courses/pic-1_sTaZawQ.jpg", |
||||||
|
"price": "50.00", |
||||||
|
"is_infinite": false, |
||||||
|
"deferred_start_at": null, |
||||||
|
"category": 9, |
||||||
|
"duration": 1, |
||||||
|
"is_featured": false, |
||||||
|
"url": "https://gitlab.com/", |
||||||
|
"status": 0, |
||||||
|
"created_at": "2018-01-27T07:09:03.442Z", |
||||||
|
"update_at": "2018-01-27T07:11:43.838Z" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.course", |
||||||
|
"pk": 4, |
||||||
|
"fields": { |
||||||
|
"author": 1, |
||||||
|
"title": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438", |
||||||
|
"short_description": "\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u0442\u044f\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u043e\u0440\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u0438 \u0445\u0430\u0440\u0438\u0437\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.", |
||||||
|
"cover": "courses/pic-1_sTaZawQ.jpg", |
||||||
|
"price": "50.00", |
||||||
|
"is_infinite": false, |
||||||
|
"deferred_start_at": null, |
||||||
|
"category": 8, |
||||||
|
"duration": 1, |
||||||
|
"is_featured": false, |
||||||
|
"url": "https://gitlab.com/", |
||||||
|
"status": 0, |
||||||
|
"created_at": "2018-01-27T07:09:03.445Z", |
||||||
|
"update_at": "2018-01-27T07:11:35.342Z" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.course", |
||||||
|
"pk": 5, |
||||||
|
"fields": { |
||||||
|
"author": 1, |
||||||
|
"title": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438", |
||||||
|
"short_description": "\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u0442\u044f\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u043e\u0440\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u0438 \u0445\u0430\u0440\u0438\u0437\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.", |
||||||
|
"cover": "courses/pic-1_sTaZawQ.jpg", |
||||||
|
"price": "50.00", |
||||||
|
"is_infinite": false, |
||||||
|
"deferred_start_at": null, |
||||||
|
"category": 7, |
||||||
|
"duration": 1, |
||||||
|
"is_featured": false, |
||||||
|
"url": "https://gitlab.com/", |
||||||
|
"status": 0, |
||||||
|
"created_at": "2018-01-27T07:09:03.449Z", |
||||||
|
"update_at": "2018-01-27T07:11:26.725Z" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.course", |
||||||
|
"pk": 6, |
||||||
|
"fields": { |
||||||
|
"author": 1, |
||||||
|
"title": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438", |
||||||
|
"short_description": "\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u0442\u044f\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u043e\u0440\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u0438 \u0445\u0430\u0440\u0438\u0437\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.", |
||||||
|
"cover": "courses/pic-1_sTaZawQ.jpg", |
||||||
|
"price": "50.00", |
||||||
|
"is_infinite": false, |
||||||
|
"deferred_start_at": null, |
||||||
|
"category": 6, |
||||||
|
"duration": 1, |
||||||
|
"is_featured": false, |
||||||
|
"url": "https://gitlab.com/", |
||||||
|
"status": 0, |
||||||
|
"created_at": "2018-01-27T07:09:03.452Z", |
||||||
|
"update_at": "2018-01-27T07:11:15.061Z" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.course", |
||||||
|
"pk": 7, |
||||||
|
"fields": { |
||||||
|
"author": 1, |
||||||
|
"title": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438", |
||||||
|
"short_description": "\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u0442\u044f\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u043e\u0440\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u0438 \u0445\u0430\u0440\u0438\u0437\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.", |
||||||
|
"cover": "courses/pic-1_sTaZawQ.jpg", |
||||||
|
"price": "50.00", |
||||||
|
"is_infinite": false, |
||||||
|
"deferred_start_at": null, |
||||||
|
"category": 5, |
||||||
|
"duration": 1, |
||||||
|
"is_featured": false, |
||||||
|
"url": "https://gitlab.com/", |
||||||
|
"status": 0, |
||||||
|
"created_at": "2018-01-27T07:09:03.455Z", |
||||||
|
"update_at": "2018-01-27T07:11:03.583Z" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.course", |
||||||
|
"pk": 8, |
||||||
|
"fields": { |
||||||
|
"author": 1, |
||||||
|
"title": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438", |
||||||
|
"short_description": "\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u0442\u044f\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u043e\u0440\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u0438 \u0445\u0430\u0440\u0438\u0437\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.", |
||||||
|
"cover": "courses/pic-1_sTaZawQ.jpg", |
||||||
|
"price": "50.00", |
||||||
|
"is_infinite": false, |
||||||
|
"deferred_start_at": null, |
||||||
|
"category": 4, |
||||||
|
"duration": 1, |
||||||
|
"is_featured": false, |
||||||
|
"url": "https://gitlab.com/", |
||||||
|
"status": 0, |
||||||
|
"created_at": "2018-01-27T07:09:03.458Z", |
||||||
|
"update_at": "2018-01-27T07:10:52.322Z" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.course", |
||||||
|
"pk": 9, |
||||||
|
"fields": { |
||||||
|
"author": 1, |
||||||
|
"title": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438", |
||||||
|
"short_description": "\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u0442\u044f\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u043e\u0440\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u0438 \u0445\u0430\u0440\u0438\u0437\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.", |
||||||
|
"cover": "courses/pic-1_sTaZawQ.jpg", |
||||||
|
"price": "50.00", |
||||||
|
"is_infinite": false, |
||||||
|
"deferred_start_at": null, |
||||||
|
"category": 3, |
||||||
|
"duration": 1, |
||||||
|
"is_featured": false, |
||||||
|
"url": "https://gitlab.com/", |
||||||
|
"status": 0, |
||||||
|
"created_at": "2018-01-27T07:09:03.461Z", |
||||||
|
"update_at": "2018-01-27T07:10:42.721Z" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.course", |
||||||
|
"pk": 10, |
||||||
|
"fields": { |
||||||
|
"author": 1, |
||||||
|
"title": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438", |
||||||
|
"short_description": "\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u0442\u044f\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u043e\u0440\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u0438 \u0445\u0430\u0440\u0438\u0437\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.", |
||||||
|
"cover": "courses/pic-1_sTaZawQ.jpg", |
||||||
|
"price": "50.00", |
||||||
|
"is_infinite": false, |
||||||
|
"deferred_start_at": null, |
||||||
|
"category": 2, |
||||||
|
"duration": 1, |
||||||
|
"is_featured": false, |
||||||
|
"url": "https://gitlab.com/", |
||||||
|
"status": 0, |
||||||
|
"created_at": "2018-01-27T07:09:03.464Z", |
||||||
|
"update_at": "2018-01-27T07:10:33.374Z" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.course", |
||||||
|
"pk": 11, |
||||||
|
"fields": { |
||||||
|
"author": 1, |
||||||
|
"title": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438", |
||||||
|
"short_description": "\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u0442\u044f\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u043e\u0440\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u0438 \u0445\u0430\u0440\u0438\u0437\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.", |
||||||
|
"cover": "courses/pic-1_sTaZawQ.jpg", |
||||||
|
"price": "50.00", |
||||||
|
"is_infinite": false, |
||||||
|
"deferred_start_at": null, |
||||||
|
"category": 1, |
||||||
|
"duration": 1, |
||||||
|
"is_featured": false, |
||||||
|
"url": "https://gitlab.com/", |
||||||
|
"status": 0, |
||||||
|
"created_at": "2018-01-27T07:09:03.467Z", |
||||||
|
"update_at": "2018-01-27T07:09:03.467Z" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.category", |
||||||
|
"pk": 1, |
||||||
|
"fields": { |
||||||
|
"title": "\u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.category", |
||||||
|
"pk": 2, |
||||||
|
"fields": { |
||||||
|
"title": "\u0430\u043a\u0432\u0430\u0440\u0435\u043b\u044c" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.category", |
||||||
|
"pk": 3, |
||||||
|
"fields": { |
||||||
|
"title": "\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.category", |
||||||
|
"pk": 4, |
||||||
|
"fields": { |
||||||
|
"title": "\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.category", |
||||||
|
"pk": 5, |
||||||
|
"fields": { |
||||||
|
"title": "\u043f\u0430\u0441\u0442\u0435\u043b\u044c" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.category", |
||||||
|
"pk": 6, |
||||||
|
"fields": { |
||||||
|
"title": "\u043f\u043b\u0430\u0441\u0442\u0438\u043b\u0438\u043d" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.category", |
||||||
|
"pk": 7, |
||||||
|
"fields": { |
||||||
|
"title": "\u043a\u0440\u0435\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0435" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.category", |
||||||
|
"pk": 8, |
||||||
|
"fields": { |
||||||
|
"title": "\u043c\u043e\u0442\u043e\u0440\u0438\u043a\u0430" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"model": "course.category", |
||||||
|
"pk": 9, |
||||||
|
"fields": { |
||||||
|
"title": "\u0436\u0438\u0432\u043e\u043f\u0438\u0441\u044c" |
||||||
|
} |
||||||
|
} |
||||||
|
] |
||||||
@ -0,0 +1,73 @@ |
|||||||
|
# Generated by Django 2.0.1 on 2018-01-26 13:25 |
||||||
|
|
||||||
|
from django.conf import settings |
||||||
|
from django.db import migrations, models |
||||||
|
import django.db.models.deletion |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
||||||
|
('course', '0001_initial'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.AlterModelOptions( |
||||||
|
name='category', |
||||||
|
options={'verbose_name': 'Категория', 'verbose_name_plural': 'Категории'}, |
||||||
|
), |
||||||
|
migrations.AlterModelManagers( |
||||||
|
name='category', |
||||||
|
managers=[ |
||||||
|
], |
||||||
|
), |
||||||
|
migrations.RenameField( |
||||||
|
model_name='course', |
||||||
|
old_name='background', |
||||||
|
new_name='cover', |
||||||
|
), |
||||||
|
migrations.RenameField( |
||||||
|
model_name='course', |
||||||
|
old_name='deferred_start', |
||||||
|
new_name='deferred_start_at', |
||||||
|
), |
||||||
|
migrations.RenameField( |
||||||
|
model_name='course', |
||||||
|
old_name='is_highlighted', |
||||||
|
new_name='is_featured', |
||||||
|
), |
||||||
|
migrations.RemoveField( |
||||||
|
model_name='course', |
||||||
|
name='created_at', |
||||||
|
), |
||||||
|
migrations.RemoveField( |
||||||
|
model_name='course', |
||||||
|
name='update_at', |
||||||
|
), |
||||||
|
migrations.AddField( |
||||||
|
model_name='course', |
||||||
|
name='author', |
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL), |
||||||
|
), |
||||||
|
migrations.AddField( |
||||||
|
model_name='course', |
||||||
|
name='duration', |
||||||
|
field=models.IntegerField(default=0, verbose_name='Продолжительность курса'), |
||||||
|
), |
||||||
|
migrations.AddField( |
||||||
|
model_name='course', |
||||||
|
name='is_infinite', |
||||||
|
field=models.BooleanField(default=False), |
||||||
|
), |
||||||
|
migrations.AddField( |
||||||
|
model_name='course', |
||||||
|
name='status', |
||||||
|
field=models.PositiveSmallIntegerField(choices=[(0, 'Pending'), (1, 'Published'), (2, 'Archived')], default=0, verbose_name='Статус'), |
||||||
|
), |
||||||
|
migrations.AddField( |
||||||
|
model_name='course', |
||||||
|
name='url', |
||||||
|
field=models.URLField(default='', verbose_name='Ссылка'), |
||||||
|
), |
||||||
|
] |
||||||
@ -0,0 +1,25 @@ |
|||||||
|
# Generated by Django 2.0.1 on 2018-01-26 13:47 |
||||||
|
|
||||||
|
from django.db import migrations, models |
||||||
|
import django.utils.timezone |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
('course', '0002_auto_20180126_1325'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.AddField( |
||||||
|
model_name='course', |
||||||
|
name='created_at', |
||||||
|
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now), |
||||||
|
preserve_default=False, |
||||||
|
), |
||||||
|
migrations.AddField( |
||||||
|
model_name='course', |
||||||
|
name='update_at', |
||||||
|
field=models.DateTimeField(auto_now=True), |
||||||
|
), |
||||||
|
] |
||||||
@ -0,0 +1,5 @@ |
|||||||
|
{% for category in category_items %} |
||||||
|
<a class="header__link" href="{% url 'courses' %}?category={{ category.title }}"> |
||||||
|
<div class="header__title">{{ category.title }}</div> |
||||||
|
</a> |
||||||
|
{% endfor %} |
||||||
|
After Width: | Height: | Size: 16 KiB |
Loading…
Reference in new issue