Пример #1
0
        SchoolsListView.as_view(),
        name='schools_list'),
    url(r'^siteadmin/', include(admin.site.urls)),
    #url(r'^ckeditor/', include('ckeditor.urls')),
    url(r'^api/', include('api.urls')),
    url(r'^school/', include('schools.urls'), name='school_listing'),
    url(r'^gradecurriculum/(?P<id>(.+))/$',
        GradeCurriculumUse.as_view()),

    # Articles
    url(r'^article/(?P<id>(.+))/$', "articles.views.TestView"),
    
    # Analysis views
    url(r'^analysis/$',
        AnalysisIndexListView.as_view()),
    url(r'^analysis/schools/$',
        AnalysisSchoolsListView.as_view()),
    url(r'^analysis/school/match/(?P<id>(.+))/$',
        SchoolCurriculaMatch.as_view()),
    url(r'^analysis/school/inventory/(?P<id>(.+))/$',
        AnalysisSchoolInventory.as_view()),
    url(r'^analysis/school/(?P<id>(.+))/$',
        SchoolDetailView.as_view()),
    url(r'^analysis/curricula/$',
        CurriculumListView.as_view()),
    url(r'^analysis/gradecurriculum/(?P<id>(.+))/$',
        GradeCurriculumDetailView.as_view()),
    url(r'^analysis/learningmaterial/(?P<id>(.+))/$',
        LearningMaterialDetailView.as_view()),
)
Пример #2
0
    '',
    # Examples:
    # url(r'^$', 'sdp_curricula.views.home', name='home'),
    # url(r'^sdp_curricula/', include('sdp_curricula.foo.urls')),

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

    # Uncomment the next line to enable the admin:
    url(r'^$', IndexListView.as_view()),
    url(r'^schools/$', SchoolsListView.as_view(), name='schools_list'),
    url(r'^siteadmin/', include(admin.site.urls)),
    url(r'^api/', include('api.urls')),
    url(r'^school/', include('schools.urls'), name='school_listing'),
    url(r'^gradecurriculum/(?P<id>(.+))/$', GradeCurriculumUse.as_view()),

    # Analysis views
    url(r'^analysis/$', AnalysisIndexListView.as_view()),
    url(r'^analysis/schools/$', AnalysisSchoolsListView.as_view()),
    url(r'^analysis/school/match/(?P<id>(.+))/$',
        SchoolCurriculaMatch.as_view()),
    url(r'^analysis/school/inventory/(?P<id>(.+))/$',
        AnalysisSchoolInventory.as_view()),
    url(r'^analysis/school/(?P<id>(.+))/$', SchoolDetailView.as_view()),
    url(r'^analysis/curricula/$', CurriculumListView.as_view()),
    url(r'^analysis/gradecurriculum/(?P<id>(.+))/$',
        GradeCurriculumDetailView.as_view()),
    url(r'^analysis/learningmaterial/(?P<id>(.+))/$',
        LearningMaterialDetailView.as_view()),
)
Пример #3
0
    # Homepage
    # QUESTION: Do I have to include template_name here? It's already in the
    # View.
    url(r'^$', HomeView.as_view(), name="home"),

    # url(r'^schools/(?P<slug>[\w-]+)/$',
    # or
    # url("^$", "mezzanine.pages.views.page", {"slug": "/"}, name="home"),

    # QUESTION FOR DINO: Is this correct??? Also, what does "name" do here?
    # url(r'^schools/(?P<slug>[\w-]+)/$', SchoolView.as_view(),
    # name="schoolview"),

    # School detail view route. name=school_detail is for reverse lookups
    url(r'^schools/(?P<pk>[\d]+)/$',
        SchoolDetailView.as_view(), name="school_detail"),

    # MUST move this to the bottom or things get hijacked
    ("^", include("mezzanine.urls")),
)

# used to show static assets out of the collected-static
if getattr(settings, 'SERVE_STATIC', False) and settings.SERVE_STATIC:
    urlpatterns += patterns(
        '',
        url(r'^static/(?P<path>.*)$',
            'django.views.static.serve',
            {'document_root': settings.STATIC_ROOT, 'show_indexes': False}),
        url(r'^uploads/(?P<path>.*)$',
            'django.views.static.serve',
            {'document_root': settings.MEDIA_ROOT, 'show_indexes': False}),