Exemplo n.º 1
0
                       url(r'^students/(?P<sid>\d+)/edit_hand/$','students.views.students.students_edit_hand',name='students_edit_hand'),
                       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'^students/(?P<sid>\d+)/delete_hand/$','students.views.students.students_delete',name='students_delete_hand'),

					   url(r'^groups/$', 'students.views.groups.groups_list', name='groups'),
                       url(r'^groups/add/$','students.views.groups.groups_add',name='groups_add'),
                       url(r'^groups/add_form/$',GroupAddView.as_view(),name='groups_add_form'),
                       url(r'^groups/(?P<pk>\d+)/edit/$',GroupUpdateView.as_view() ,name='groups_edit'),
                       url(r'^groups/(?P<gid>\d+)/edit_hand/$','students.views.groups.groups_edit',name='groups_edit_hand'),
                       url(r'^groups/(?P<pk>\d+)/delete/$',GroupDeleteView.as_view(),name='groups_delete'),
                       url(r'^groups/(?P<gid>\d+)/delete_hand/$','students.views.groups.groups_delete',name='groups_delete_hand'),

					   url(r'^admin/', include(admin.site.urls)),

                       url(r'^journal/$', JournalView.as_view(), name='journal'),
                       url(r'^journal/(?P<gid>\d+)/edit/$', 'students.views.journal.journal_edit', name='journal_edit'),

                       url(r'^exams/$', 'students.views.exams.exam_list', name='exams'),
                       url(r'^exams/add_form/$',ExamsAddView.as_view(),name='exams_add_form'),
                       url(r'^exams/add/$','students.views.exams.exams_add',name='exams_add'),
                       url(r'^exams/(?P<eid>\d+)/edit_hand/$','students.views.exams.exams_edit_hand',name='exams_edit_hand'),
                       url(r'^exams/(?P<pk>\d+)/edit/$',ExamsUpdateView.as_view(),name='exams_edit'),
                       url(r'^exams/(?P<pk>\d+)/delete/$', ExamsDeleteView.as_view(), name='exams_delete'),
                       url(r'^exams/(?P<eid>\d+)/delete_hand/$','students.views.exams.exams_delete',name='exams_delete_hand'),
                       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
    url(r'^students/(?P<pk>\d+)/delete/$',
        StudentDeleteView.as_view(),
        name='students_delete'),

    # Groups urls
    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'),

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

    # Exam urls
    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'^exam_results/$',
        'students.views.exam_results.exam_results',
Exemplo n.º 3
0
Arquivo: urls.py Projeto: wertbp/stud
         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'),

    # Groups urls
    url(r'^groups/$', 'students.views.groups.groups_list', name='groups'),
    url(r'^groups/add/$', GroupAddView.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'),

    # Contact Admin Form
    url(r'^contact-admin/$', 'students.views.contact_admin.contact_admin',
        name='contact_admin'),

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

)

if DEBUG:
    # serve files from media folder
    urlpatterns += patterns('',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
        'document_root': MEDIA_ROOT}))
Exemplo n.º 4
0
    url(r'^users/', include('registration.backends.default.urls', namespace='users')),

    # Students urls
    url(r'^$', StudentListView.as_view(), name='home'),
    url(r'^students/add/$', login_required(StudentAddView.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(GroupListView.as_view()), name='groups'),
    url(r'^groups/add/$', login_required(GroupAddView.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
    url(r'^journal/(?P<pk>\d+)?/?$', login_required(JournalView.as_view()), name='journal'),

    # Events log
    url(r'^events_log/$', login_required(EventLogView.as_view()), name='events_log'),

    # Contact Admin Form
    url(r'^contact-admin/$', permission_required('auth.add_user')(ContactAdminView.as_view()), name='contact_admin'),
    url(r'^contact-letter/$', permission_required('auth.add_user')(ContactLetterView.as_view()), name='contact_letter'),

    # Captcha
    url(r'^captcha/', include('captcha.urls')),

    # JS i18n
    url(r'^jsi18n\.js$', 'django.views.i18n.javascript_catalog', js_info_dict),

)
Exemplo n.º 5
0
    # Groups urls
    # url(r'^groups/$', 'students.views.groups.groups_list', name='groups'),
    url(r'^groups/$', GroupList.as_view(), name='groups'),
    
    # url(r'^groups/add/$', 'students.views.groups.groups_add_handle', name='groups_add'),
    # url(r'^groups/add/$', 'students.views.groups.groups_add_django_form', name='groups_add'),
    url(r'^groups/add/$', login_required(GroupAddView.as_view()), name='groups_add'),
    
    url(r'^groups/(?P<gid>\d+)/edit/$', login_required(groups_edit_handle), name='groups_edit'),
    # url(r'^groups/(?P<gid>\d+)/edit/$', GroupEditView.as_view(), name='groups_edit'),

    # url(r'^groups/(?P<gid>\d+)/delete/$', GroupDeleteView.as_view(), name='groups_delete'),
    url(r'^groups/(?P<gid>\d+)/delete/$', login_required(groups_delete_handle), name='groups_delete'),
    
    # Journal urls
    url(r'^journal/(?P<pk>\d+)?/?$', login_required(JournalView.as_view()), name='journal'),
    url(r'^journal2/$', 'students.views.journals.journal_list', name='journal2'),
    # url(r'^journal2/$', 'students.views.journals.data_requests'),
    url(r'^journal2/(?P<gid>\d+)/edit/$', 'students.views.journal_edit.journal_edit', name="journal_edit"),
    url(r'^journal/group/(?P<group_pk>\d+)/$', login_required(JournalView.as_view()), name='journal_group'),

    # Exam urls
    # url(r'^exams/$', 'students.views.exams.exams_list', name='exams'),
    url(r'^exams/$', login_required(ExamList.as_view()), name='exams'),

    # url(r'^exams/(?P<eid>\d+)/edit/$', 'students.views.exams.exams_edit_django_form', name='exams_edit'),
    # url(r'^exams/(?P<eid>\d+)/edit/$', 'students.views.exams.exams_edit_handle', name='exams_edit'),
    url(r'^exams/(?P<eid>\d+)/edit/$', login_required(ExamEditView.as_view()), name='exams_edit'),

    # url(r'^exams/add/$', 'students.views.exams.exams_add_handle', name='exams_add'),
    url(r'^exams/add/$', login_required(ExamAddView.as_view()), name='exams_add'),
Exemplo n.º 6
0
    # Group urls
    url(r'^groups/$', login_required(groups_list), name='groups'),
    # url(r'^groups/add/$', 'students.views.groups.groups_add', name='groups_add'),
    url(r'^groups/add/$',
        login_required(GroupCreateView.as_view()),
        name='groups_add'),
    # url(r'^groups/(?P<gid>\d+)/edit/$', 'students.views.groups.groups_edit', name='groups_edit'),
    url(r'^groups/(?P<pk>\d+)/edit/$',
        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/$',
Exemplo n.º 7
0
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, patterns
from django.contrib import admin

from students.views.journal import JournalView
from students.views.students import StudentUpdateView, StudentDeleteView
from .settings import MEDIA_ROOT, DEBUG

urlpatterns = [
    url(r"^admin/", admin.site.urls),
    # students urls
    url(r"^$", "students.views.students.students_list", name="home"),
    url(r"^students/add/$", "students.views.students.students_add", name="students_add"),
    url(r"^journal/$", JournalView.as_view(), name="journal"),
    url(r"^students/(?P<pk>\d+)/delete/$", StudentDeleteView.as_view(), name="students_delete"),
    # groups urls
    url(r"^groups/$", "students.views.groups.groups_list", name="groups"),
    url(r"^groups/add/$", "students.views.groups.groups_add", name="groups_add"),
    url(r"^groups/(?P<gid>\d+)/edit/$", "students.views.groups.groups_edit", name="groups_edit"),
    url(r"^groups/(?P<gid>\d+)/delete/$", "students.views.groups.groups_delete", name="groups_delete"),
    url(r"^students/(?P<pk>\d+)/edit/$", StudentUpdateView.as_view(), name="students_edit"),
    url(r"^contact-admin/$", "students.views.contact_admin.contact_admin", name="contact_admin"),
]
if DEBUG:
    urlpatterns += patterns(
        "", url(r"^media/(?P<path>.*)$", "django.views.static.serve", {"document_root": MEDIA_ROOT})
    )
Exemplo n.º 8
0
    url(r'^students/(?P<pk>\d+)/delete/$',
        StudentDeleteView.as_view(),
        name='students_delete'),

    #groups urls
    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'),

    #journal urls
    url(r'^journal/$', JournalView.as_view(), name='journal'),
    url(r'^journal/stud_(?P<spk>\d+)?/?$',
        JournalView.as_view(),
        name='stud_journal'),
    url(r'^journal/group_(?P<gpk>\d+)?/?$',
        JournalView.as_view(),
        name='group_journal'),

    #exams
    url(r'^exams/$', 'students.views.exams.exams_list', name='exams'),
    url(r'^exams/add/$', 'students.views.exams.exams_add', name='exams_add'),
    url(r'^exams/(?P<eid>\d+)/edit/$',
        'students.views.exams.exams_edit',
        name='exams_edit'),
    url(r'^exams/(?P<eid>\d+)/delete/$',
        'students.views.exams.exams_delete',
Exemplo n.º 9
0
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'),

    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'),
Exemplo n.º 10
0
    url(r'^students/(?P<pk>\d+)/delete/$',
        login_required(StudentDeleteView.as_view()), 
        name='students_delete'),

    url(r'^groups/$', login_required(groups_list), name='groups'),
    url(r'^groups/add/$', login_required(GroupAddView.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+)?/?$', 
        login_required(JournalView.as_view()), name='journal'),

    url(r'^admin/', include(admin.site.urls)),

    url(r'^exams/$', login_required(exams_list), name='exams'),

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

    url(r'^jsi18n\.js$', 'django.views.i18n.javascript_catalog', js_info_dict),

    url(r'^users/profile/$', login_required(TemplateView.as_view(
        template_name='registration/profile.html')), name='profile'),
    url(r'^users/login/$', auth_views.login, 
        kwargs={'authentication_form': LoginForm,}, name='auth_login'),
    url(r'^users/logout/$', auth_views.logout, kwargs={'next_page': 'home'},
Exemplo n.º 11
0
    url(r"^groups/add/$", GroupAddView.as_view(), name="groups_add"),
    # url(r'^groups/(?P<gid>\d+)/edit/$', groups.groups_edit, name='groups_edit'),
    url(r"^groups/(?P<pk>\d+)/edit/$", GroupUpdateView.as_view(), name="groups_edit"),
    # url(r'^groups/(?P<gid>\d+)/delete/$', groups.groups_delete, name='groups_delete'),
    url(r"^groups/(?P<pk>\d+)/delete/$", GroupDeleteView.as_view(), name="groups_delete"),
    # exams urls
    url(r"^exams/$", exams.exams_list, name="exams"),
    url(r"^exams/add/$", exams.exams_add, name="exams_add"),
    # url(r'^exams/(?P<eid>\d+)/edit/$', exams.exams_edit, name='exams_edit'),
    url(r"^exams/(?P<pk>\d+)/edit/$", exams.exams_edit, name="exams_edit"),
    # url(r'^exams/(?P<eid>\d+)/delete/$', exams.exams_delete, name='exams_delete'),
    url(r"^exams/(?P<pk>\d+)/delete/$", exams.exams_delete, name="exams_delete"),
    # journal urls
    # url(r'^journal/$', journal.journal, name='journal'),
    # url(r'^journal/(?P<jid>\d+)/$', journal.journal_id, name='journal_id'),
    # url(r'^journal/$', JournalView.as_view(), name='journal'),
    url(r"^journal/(?P<pk>\d+)?/?$", JournalView.as_view(), name="journal"),
    url(r"^admin/", admin.site.urls),
    # url(r'^contact-admin/$', contact_admin.contact_admin, name='contact_admin'),
    url(r"^contact-admin/$", contact_admin.ContactView.as_view(), name="contact_admin"),
    # url(r'^contact/', include('contact_form.urls')),
    # url(r'^contact/$', include('contact_form.urls'), name='contact'),
]

if DEBUG:
    # serve files from media folder
    #    urlpatterns += [url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
    # {'document_root': MEDIA_ROOT}
    # ),]
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 12
0
	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'),
	
	#groups urls
    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'),
	
    #journal urls
    url(r'^journal/$', JournalView.as_view(), name='journal'),
    url(r'^journal/stud_(?P<spk>\d+)?/?$', JournalView.as_view(), name='stud_journal'),
    url(r'^journal/group_(?P<gpk>\d+)?/?$', JournalView.as_view(), name='group_journal'),


    #exams
    url(r'^exams/$', 'students.views.exams.exams_list', name='exams'),
    url(r'^exams/add/$', 'students.views.exams.exams_add', name='exams_add'),
    url(r'^exams/(?P<eid>\d+)/edit/$','students.views.exams.exams_edit',
    name='exams_edit'),
    url(r'^exams/(?P<eid>\d+)/delete/$','students.views.exams.exams_delete',
    name='exams_delete'),

    #contact Admin Form
    url(r'^contact-admin/$', ContactView.as_view(), name='contact_admin'),
Exemplo n.º 13
0
        StudentUpdateView.as_view(),
        name='students_edit'),
    url(r'^students/(?P<pk>\d+)/delete/$',
        StudentDeleteView.as_view(),
        name='students_delete'),
    #----------Groups Urls----------
    url(r'^groups/$', 'students.views.groups.groups_list', name='groups'),
    url(r'^groups/add/$',
        'students.views.groups.groups_add',
        name="groups_add"),
    url(r'^groups/(?P<gid>\d+)/edit/$',
        'students.views.groups.groups_edit',
        name="groups_edit"),
    url(r'^groups/(?P<gid>\d+)/delete/$',
        'students.views.groups.groups_delete',
        name="groups_delete"),
    #----------Journal Urls----------
    url(r"^journal/$", JournalView.as_view(), name="journal"),
    #----------Another Urls----------
    url(r'^admin/', include(admin.site.urls)),
    url(r'^contact-admin/$',
        'students.views.contact_admin.contact_admin',
        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.º 14
0
urlpatterns = patterns(
    '',
    # Students urls
    url(r'^$', StudentView.as_view(), name='home'),
    url(r'^students/add$', 'students.views.students.add', name='add_student'),
    url(r'^students/(?P<pk>\d+)/edit$', StudentUpdate.as_view(), name='students_edit'),
    url(r'^students/(?P<pk>\d+)/delete$', StudentDelete.as_view(), name='students_delete'),

    # Groups urls
    url(r'^groups/$', GroupView.as_view(), name='groups'),
    url(r'^groups/add$', 'students.views.groups.add', name='add_group'),
    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'),

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

    # Exams urls
    url(r'^exams/$', ExamView.as_view(), name='exams'),
    url(r'^exams/add$', ExamAddView.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'),

    # Admin contact url
    url(r'^contact_admin/$', 'students.views.contact_admin.index', name='contact_admin'),

    # Admin url
    url(r'^admin/', include(admin.site.urls)),
)

if DEBUG: