-from django.conf.urls import patterns, include, url
-from django.views.generic import DetailView, ListView
-from .models import Section, Lesson
+# -*- coding: utf-8 -*-
+from django.conf.urls import patterns, url
+from .views import LessonListView, LessonView
-urlpatterns = patterns('',
+urlpatterns = patterns(
+ '',
url(r'^$',
- ListView.as_view(model=Section),
+ LessonListView.as_view(),
name="catalogue_lessons"),
url(r'^(?P<slug>[^/]+)/$',
- DetailView.as_view(model=Lesson),
+ LessonView.as_view(),
name="catalogue_lesson"),
)