Exemple #1
0
                CertificationProcessViewSet,
                base_name='certification_process')
router.register(r'evaluation', EvaluationViewSet, base_name='evaluation')
router.register(r'certificate_template',
                CertificateTemplateViewSet,
                base_name='certificate_template')
router.register(r'certificate_template_images',
                CertificateTemplateImageViewSet,
                base_name='certificate_template_images')
router.register(r'states', StateViewSet, base_name='test')
router.register(r'cities', CityViewSet, base_name='test2')

urlpatterns = patterns(
    '',
    url(r'^$', HomeView.as_view(), name='home_view'),
    url(r'^courses', CoursesView.as_view(), name='courses'),

    # Uncomment the next line to enable the admin:
    url(r'^django/admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^django/admin/', include(django_admin.site.urls)),

    # Privileged browsing
    url(r'^admin/', include('administration.urls')),

    # Public browsing
    url(r'^my-courses/$', UserCoursesView.as_view(), name='user_courses'),
    url(r'^emit_recipt/(?P<course_id>[-a-zA-Z0-9_]+)$',
        EmitReceiptView.as_view(),
        name='emit_recipt'),
    url(r'^request_certificate/(?P<course_id>[-a-zA-Z0-9_]+)$',
        RequestCertificateView.as_view(),
Exemple #2
0
router.register(r'question_vote', QuestionVoteViewSet)
router.register(r'answer_vote', AnswerVoteViewSet)
router.register(r'course_material', CourseMaterialViewSet)
router.register(r'course_material_file', CourseMaterialFileViewSet)
router.register(r'note', NotesViewSet)
router.register(r'user_notes', UserNotesViewSet)
router.register(r'reports', UserCourseStats)
router.register(r'lessons_user_progress', UserCourseLessonsStats)
router.register(r'course_stats', CourseStatsByLessonViewSet)
router.register(r'course_classes', ClassViewSet)
router.register(r'flatpage', FlatpageViewSet)

urlpatterns = patterns(
    '',
    url(r'^$', HomeView.as_view(), name='home_view'),
    url(r'^courses', CoursesView.as_view(), name='courses'),

    # Uncomment the next line to enable the admin:
    url(r'^django/admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^django/admin/', include(django_admin.site.urls)),

    # Privileged browsing
    url(r'^admin/', include('administration.urls')),

    # Public browsing
    url(r'^my-courses/$', UserCoursesView.as_view(), name='user_courses'),
    url(r'^accept_terms/$', AcceptTermsView.as_view(), name='accept_terms'),
    url(r'^course/(?P<slug>[-a-zA-Z0-9_]+)/intro/$', CourseView.as_view(), name='course_intro'),
    url(r'^course/(?P<slug>[-a-zA-Z0-9_]+)/enroll/$', EnrollCourseView.as_view(), name='enroll_course'),
    url(r'^course/(?P<slug>[-a-zA-Z0-9_]+)/resume/$', ResumeCourseView.as_view(), name='resume_course'),
    url(r'^course/(?P<course_slug>[-a-zA-Z0-9_]+)/lesson/(?P<slug>[-a-zA-Z0-9_]+)/$', LessonDetailView.as_view(), name='lesson'),