Exemplo n.º 1
0
from students.views.exams import ExamCreateView, ExamUpdateView, ExamDeleteView

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'studentsdb.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', 'students.views.students.students_list', name='home'),
    url(r'^students/add/$', StudentCreateView.as_view(), name='students_add'),
    url(r'^students/(?P<pk>\d+)/edit/$', StudentUpdateView.as_view(), name='students_edit'),
    url(r'^students/(?P<pk>\d+)/delete/$', StudentDeleteView.as_view(), name='students_delete'),
    url(r'^groups/$', 'students.views.groups.groups_list', name='groups'),
    url(r'^groups/add/$', GroupCreateView.as_view(), name='groups_add'),
    url(r'^groups/(?P<pk>\d+)/edit/$', GroupUpdateView.as_view(), name='groups_edit'),
    url(r'^groups/(?P<pk>\d+)/delete/$', GroupDeleteView.as_view(), name='groups_delete'),
    url(r'^journal/$', 'students.views.journal.journal_list', name='journal'),
    url(r'^exams/$', 'students.views.exams.exams_list', name='exams'),
    url(r'^exams/add/$', ExamCreateView.as_view(), name='exams_add'),
    url(r'^exams/(?P<pk>\d+)/edit/$', ExamUpdateView.as_view(), name='exams_edit'),
    url(r'^exams/(?P<pk>\d+)/delete/$', ExamDeleteView.as_view(), name='exams_delete'),
    url(r'^contact-admin/$', ContactView.as_view(), name='contact_admin'),
)

if DEBUG:
    # serve files from media folder
    urlpatterns += patterns('',
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
    'document_root': MEDIA_ROOT}))

Exemplo n.º 2
0
        login_required(GroupUpdateView.as_view()),
        name='groups_edit'),
    # url(r'^groups/(?P<gid>\d+)/delete/$', 'students.views.groups.groups_delete', name='groups_delete'),
    url(r'^groups/(?P<pk>\d+)/delete/$',
        login_required(GroupDeleteView.as_view()),
        name='groups_delete'),
    url(r'^journal/(?P<pk>\d+)?/?$',
        login_required(JournalView.as_view()),
        name='journal'),
    url(r'^admin/', include(admin.site.urls)),

    # Exams urls
    url(r'^exams/$', login_required(exams_list), name='exams'),
    # url(r'^exams/add/$', 'students.views.exams.exams_add', name='exams_add'),
    url(r'^exams/add/$',
        login_required(ExamCreateView.as_view()),
        name='exams_add'),
    # url(r'^exams/(?P<eid>\d+)/edit/$', 'students.views.exams.exams_edit', name='exams_edit'),
    url(r'^exams/(?P<pk>\d+)/edit/$',
        login_required(ExamUpdateView.as_view()),
        name='exams_edit'),
    # url(r'^exams/(?P<eid>\d+)/delete/$', 'students.views.exams.exams_delete', name='exams_delete'),
    url(r'^exams/(?P<pk>\d+)/delete/$',
        login_required(ExamDeleteView.as_view()),
        name='exams_delete'),
    url(r'^admin/', include(admin.site.urls)),

    # Contact Admin Form
    url(r'^contact-admin/$',
        login_required(ContactView.as_view()),
        name='contact_admin'),
Exemplo n.º 3
0
    url(r'^groups/add/$', login_required(GroupCreateView.as_view()),
        name='groups_add'),
    url(r'^groups/(?P<pk>\d+)/edit/$',
        login_required(GroupUpdateView.as_view()),
        name='groups_edit'),
    url(r'^groups/(?P<pk>\d+)/delete/$',
        login_required(GroupDeleteView.as_view()),
        name='groups_delete'),

    #Journal urls
    url(r'journal/(?P<pk>\d+)?/?$', JournalView.as_view(), name='journal'),

    #Exams urls
    url(r'^exams/$', login_required(exams_list),  name='exams'),
    url(r'^exams/add/$',
        login_required(ExamCreateView.as_view()),
        name='exams_add'),
    url(r'^exams/(?P<pk>\d+)/edit/$',
        login_required(ExamUpdateView.as_view()),
        name='exams_edit'),
    url(r'^exams/(?P<pk>\d+)/delete/$',
        login_required(ExamDeleteView.as_view()),
        name='exams_delete'),

    # User Related urls
    url(r'^users/profile/$', login_required(TemplateView.as_view(
        template_name='registration/profile.html')), name='profile'),
    url(r'^users/profile/(?P<pk>\d+)/edit/$',
        login_required(UserUpdateView.as_view()),
        name='profile_settings'),
    url(r'^profiles/$', 'stud_auth.views.users_list', name='profiles'),
Exemplo n.º 4
0
	url(r'^students/add/$', login_required(StudentCreateView.as_view()), name='students_add'),
	url(r'^students/(?P<pk>\d+)/edit/$', login_required(StudentUpdateView.as_view()), name='students_edit'),
	url(r'^students/(?P<pk>\d+)/delete/$', login_required(StudentDeleteView.as_view()), name='students_delete'),

	# Groups urls
	url(r'^groups/$', login_required(students.views.groups.groups_list), name='groups'),
	url(r'^groups/add/$', login_required(GroupCreateView.as_view()), name='groups_add'),
	url(r'^groups/(?P<pk>\d+)/edit/$', login_required(GroupUpdateView.as_view()), name='groups_edit'),
	url(r'^groups/(?P<pk>\d+)/delete/$', login_required(GroupDeleteView.as_view()), name='groups_delete'),

	# Journal urls
	url(r'^journal/(?P<pk>\d+)?/?$', login_required(JournalView.as_view()), name='journal'),

	# Exams urls
	url(r'^exams/$', login_required(students.views.exams.exams_page), name='exams'),
	url(r'^exams/add/$', login_required(ExamCreateView.as_view()), name='exams_add'),
	url(r'^exams/(?P<pk>\d+)/edit/$', login_required(ExamUpdateView.as_view()), name='exams_edit'),
	url(r'^exams/(?P<pk>\d+)/delete/$', login_required(ExamDeleteView.as_view()), name='exams_delete'),

	# Contact Admin Form Class & Function
	# url(r'^contact-admin/$', ContactView.as_view(), name='contact_admin'),

    url(r'^contact-admin/$', login_required(students.views.contact_admin.contact_admin), name='contact_admin'),

	# JavaScript Code Translation
	url(r'^jsi18n\.js$', django.views.i18n.javascript_catalog, js_info_dict, name='jstranslate'),

	# set_language view
    url('^set-language/$', students.views.set_language.set_language, name='set_language'),

	# User Related urls