コード例 #1
0
ファイル: urls.py プロジェクト: 1jump1/electroochered
# -*- coding: utf-8 -*- 
from django.conf.urls.defaults import patterns, url
from sadiki.anonym.views import Queue, RequestionSearch, \
    Registration, Frontpage, SadikInfo, SadikList

urlpatterns = patterns('',
    url(r'^$', Frontpage.as_view(), name=u'anonym_frontpage'),
    url(r'^registration/$', Registration.as_view(),
        name=u'anonym_registration'),
    url(r'^queue/$', Queue.as_view(),
        name=u'anonym_queue'),
    url(r'^anonym_requestion_search/$', RequestionSearch.as_view(),
        name=u'anonym_requestion_search'),
    url(r'^sadik/$', SadikList.as_view(),
        name=u'sadik_list'),
    url(r'^sadik/(?P<sadik_id>\d{1,7})/$', SadikInfo.as_view(),
        name=u'sadik_info'),
)
コード例 #2
0
ファイル: views.py プロジェクト: redsolution/electroochered
def queue(request, *args, **kwargs):
    if request.user.is_authenticated() and request.user.is_operator():
        return OperatorQueue.as_view()(request, *args, **kwargs)
    else:
        return AnonymQueue.as_view()(request, *args, **kwargs)