Exemple #1
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from .settings import MEDIA_ROOT, DEBUG
from students.views.students import StudentUpdateView, StudentDeleteView

urlpatterns = patterns('',
    # 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'^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/$', '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'^admin/', include(admin.site.urls)),
    #Contact Admin Form
    url(r'^contact-admin/$','students.views.contact_admin.contact_admin',name =
    'contact_admin'),
)
Exemple #2
0
from django.contrib import admin
from .settings import MEDIA_ROOT, DEBUG
from students.views.contact_admin import ContactView
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
Exemple #3
0
from django.contrib import admin
from .settings import MEDIA_ROOT, DEBUG
from students.views.contact_admin import ContactView
from students.views.students import  StudentUpdateView, StudentAddView, StudentDeleteView
from students.views.groups import  GroupDeleteView ,GroupUpdateView, GroupAddView
from students.views.exams import ExamsDeleteView, ExamsAddView, ExamsUpdateView
from students.views.journal import JournalView


urlpatterns = patterns('',
                       url(r'^$','students.views.students.students_list',name='home'),
                       url(r'^students/add/$','students.views.students.students_add',name='students_add'),
                       url(r'^students/add_form/$',StudentAddView.as_view(),name='students_add_form'),

                       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'),
Exemple #4
0
    url(r'^users/activate/complete/$', RedirectView.as_view(pattern_name='home'), name='registration_activation_complete'),
    url(r'^users/login/$', auth_view.login, {'authentication_form': CustAuthForm}, name='auth_login'),
    url(r'^users/logout/$', auth_view.logout, kwargs={'next_page': 'home'}, name='auth_logout'),
    url(r'^users/password_reset/$', auth_view.password_reset, {'password_reset_form': CustPswResetForm}, name='password_reset'),
    url(r'^users/password_reset/done/$', auth_view.password_reset_done, name='password_reset_done'),
    url(r'^users/password_reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', custom_password_reset_confirm, name='password_reset_confirm'),
    url(r'^users/password_reset/complete/$', auth_view.password_reset_complete, name='password_reset_complete'),
    url(r'^users/password_change/$', login_required(auth_view.password_change), {'password_change_form': CustPswChangeForm}, name='password_change'),
    url(r'^users/password_change/done/$', login_required(auth_view.password_change_done), name='password_change_done'),
    url(r'^users/profile/$', login_required(user_profile), name='profile'),
    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
Exemple #5
0
                            url(r'^jet/dashboard/', include('jet.dashboard.urls',
                                                            'jet-dashboard')),  # Django JET dashboard URLS
                            url(r'^admin/', include(admin.site.urls)),
                            url(r'^$', 'students.views.students.students_list', name='home'),
                            url(r'^users/logout/$', auth_views.logout, kwargs={'next_page': 'home'},
                                name='auth_logout'),
                            url(r'^users/profile/$', login_required(TemplateView.as_view(
                                template_name='registration/profile.html')), name='profile'),
                            url(r'^register/complete/$', RedirectView.as_view(pattern_name='home'),
                                name='registration_complete'),
                            url(r'^users/', include('registration.backends.simple.urls', namespace='users')),
                            url(r'^social/', include('social.apps.django_app.urls', namespace='social')),
                            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_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/(?P<pk>\d+)?/?$', JournalView.as_view(), name='journal'),
                            url(r'^isputs/$', login_required(IsputListView.as_view()), name='isputs'),
                            url(r'^isputs/add/$', IsputCreateView.as_view(), name='ex_add'),
                            url(r'^isputs/(?P<pk>\d+)/edit/$', IsputUpdateView.as_view(), name='ex_edit'),
                            url(r'^isputs/(?P<pk>\d+)/del/$', IsputDeleteView.as_view(), name='ex_del'),
                            url(r'^contact-admin/$', ContactView.as_view(), name='contact_admin'),
Exemple #6
0
from django.contrib.auth.decorators import login_required
from django.views.generic.base import RedirectView, TemplateView

from .settings import MEDIA_ROOT, DEBUG

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

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()),
Exemple #7
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from .settings import MEDIA_ROOT, DEBUG

from students.views.students_class_view import StudentList
from students.views.students import StudentUpdateView, StudentDeleteView
from students.views.students import ManyStudentDeleteView
from students.views.groups import GroupAddView, GroupUpdateView, GroupDeleteView
from students.models.groups import Group

urlpatterns = [
    # Students urls
    url(r"^$", "students.views.students.students_list", name="home"),
    url(r"^students/add/?$", "students.views.students_add.students_add", name="students_add"),
    url(r"^students/(?P<pk>[0-9]+)/edit/?$", StudentUpdateView.as_view(), name="students_edit"),
    url(r"^students/(?P<pk>[0-9]+)/delete/?$", StudentDeleteView.as_view(), name="students_delete"),
    url(r"^students/manydelete/?$", ManyStudentDeleteView.as_view(), name="many_students_delete"),
    url(r"^students_list/$", StudentList.as_view(), name="students_list_class_view"),  # з використанням класу в'юшки
    # Students Load More urls
    url(
        r"^students_load_more/?$",
        "students.views.homeworks.students_load_more.students_list_load_more",
        name="students_load_more",
    ),
    # Students Scroll urls
    url(r"^students_scroll/?$", "students.views.homeworks.students_scroll.students_scroll", name="students_scroll"),
    # Groups urls
    # url(r'^groups/(?P<pk>[0-9]+)/delete/?$',StudentDeleteView.as_view( \
    #     model=Group, success_url='groups', success_message='Групу %s успішно видалено!'), name='groups_delete'),
    url(r"^groups/$", "students.views.groups.groups_list", name="groups"),
    url(r"^groups/add/$", GroupAddView.as_view(), name="groups_add"),
Exemple #8
0
from students.views.students import students_list, students_add, students_delete 
from students.views.groups import groups_list, groups_add,groups_edit, groups_delete
from students.views.journal import journal_list, journal_student, journal_update
from students.views.exams import exam_list
from students.views.contact_admin import contact_admin
from .settings import MEDIA_ROOT, DEBUG
from students.views.students_test import StudentListTest
from students.views.students import StudentUpdateView
#from students import views
urlpatterns = [
	#students url
	url(r'^$', students_list, name='home'),
    # при проверке url-паттерна 'имя домена/' не входит в проверку, поэтому все регулярные выраж. для урлов не содержат имя домена/
    # поэтому urlпаттерн = ^$ - пустая строка, соответствует запросам в корневой адрес www.имя домена/
    url(r'^students/add/$', students_add, name='students_add'),
    url(r'^students/(?P<pk>\d+)/edit/$',StudentUpdateView.as_view(), name='students_edit'), #pk идентификатор студента, 
    # должен быть или pk или slug, если используем generic view
    url(r'^students/(?P<sid>\d+)/delete/$',students_delete, name='students_delete'),
    
    #groups link
    url(r'^groups/$', groups_list, name='groups'),
    url(r'^groups/add/$', groups_add, name='groups_add'),
    url(r'^groups/(?P<gid>\d+)/edit/$',groups_edit, name='groups_edit'), #gid идентификатор группы
    url(r'^groups/(?P<gid>\d+)/delete/$',groups_delete,name='groups_delete'),
    
    #journal links
    url(r'^journal/$', journal_list, name='journal'),
    url(r'^journal/(?P<sid>\d+)/$', journal_student, name='journal_student'),
    url(r'^journal/update/$', journal_update, name='journal_update'),
    
    # закладка для экзаменов
Exemple #9
0
from students.views.exams import ExamCreateView, ExamUpdateView, ExamDeleteView
from students.views.journal import JournalView
import students.views.set_language
from django.views.generic.base import RedirectView, TemplateView
from django.contrib.auth import views as auth_views
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'),
Exemple #10
0
from students.forms.register import RegisterForm
from students.views.students import StudentUpdateView, StudentDeleteView, StudentAddView, StudentsListView
from students.views.groups import GroupUpdateView, GroupDeleteView, GroupAddView, GroupsListView
from students.views.exams import ExamsListView
from students.views.journal import JournalView
from students.views.contact_admin import ContactView
from students.forms.login import LoginForm

# TODO: use namespaces
urlpatterns = [
    url(r'^$', StudentsListView.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'),
    url(r'^groups/$', login_required(GroupsListView.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'),
    url(r'^journal/(?P<pk>\d+)?/?$',
Exemple #11
0
from students.views.contact_admin import ContactView

from stud_auth.views import RegistrationView, check_user_name

from .settings import MEDIA_ROOT, DEBUG

js_packages = {
    'packages': ('students', 'contact-admin',),
}

urlpatterns = [

    #Students urls
    url(r'^$', students.students_list, name='home'),
    url(r'^students/add/(?P<lang>\S+)?$', login_required(StudentAddView.as_view()), name='students_add'),
    url(r'^students/(?P<pk>\d+)/edit/(?P<lang>\S+)?$', 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.groups_list), name='groups'),
    url(r'^groups/add/(?P<lang>\S+)?$', login_required(GroupAddView.as_view()), name='groups_add'),
    url(r'^groups/(?P<pk>\d+)/edit/(?P<lang>\S+)?$', 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
    url(r'^journal/(?P<pk>\d+)?/?$', login_required(JournalView.as_view()), name='journal'),
Exemple #12
0
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from students.views import groups, students, contact_admin
from .settings import MEDIA_ROOT, DEBUG
from students.views.students import StudentUpdateView, StudentDeleteView

urlpatterns = [
    #    url(r'^student_list/$', StudentList.as_view()),

    #Students url
    url(r'^$', students.students_list, name='home'),
    url(r'^students/add/$', students.students_add, name='students_add'),
    url(r'^srudents/(?P<pk>\d+)/edit/$',
        StudentUpdateView(),
        name='students_edit'),
    url(r'^students/(?P<pk>\d+)/delete/$',
        StudentDeleteView.as_view(),
        name='students_delete'),

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

    #Groups url
    url(r'^groups/$', groups.groups_list, name='groups'),
    url(r'^groups/add/$', groups.groups_add, name='groups_add'),
    url(r'^groups/(?P<gid>\d+)/edit/$', groups.groups_edit,
        name='groups_edit'),
    url(r'^groups/(?P<gid>\d+)/delete/$',