Beispiel #1
0
from students.views.students import StudentUpdateView, StudentCreateView, StudentDeleteView
from students.views.groups import GroupDeleteView, GroupCreateView, GroupUpdateView
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}))
Beispiel #2
0
urlpatterns = [
    url(r'^$', students.students_list, name='home'),
    url(r'^groups/$', login_required(groups_list), name='groups'),
    url(r'^students/add/$', students.students_add, name='students_add'),
    url(r'^students/search/$',
        students.students_search,
        name='students_search'),
    url(r'^students/(?P<pk>\d+)/delete/$',
        StudentDeleteView.as_view(),
        name='students_delete'),
    url(r'^students/(?P<pk>\d+)/edit/$',
        StudentUpdateView.as_view(),
        name='students_edit'),
    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'),
    url(r'^journal/(?P<pk>\d+)?/?$', JournalView.as_view(), name='journal'),
    url(r'^exam/$', exam.exam, name='exam'),
    url(r'^exam/add/$', ExamCreateView.as_view(), name='exam_add'),
    url(r'^exam/(?P<pk>\d+)/delete/$',
        ExamDeleteView.as_view(),
        name='exam_delete'),
    url(r'^exam/(?P<pk>\d+)/edit/$',
        ExamUpdateView.as_view(),
Beispiel #3
0
urlpatterns = patterns('',
    # Students urls
    url(r'^$', 'students.views.students.students_list', name='home'),
    url(r'^students/add/$', login_required(students_add),
        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(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+)?/?$', 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()),
Beispiel #4
0
from django.contrib.auth.decorators import login_required

js_info_dict = {
	'packages': ('students',),
}

urlpatterns = [
    # Students urls
	url(r'^$', students.views.students.students_list, name='home'),
	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'),