示例#1
0
from django.conf.urls.defaults import patterns, url
from django.views.decorators.cache import cache_page
from django.views.generic import DetailView

from models import Event
from views import EventListView

# TODO month view https://github.com/justinlilly/django-gencal or https://github.com/visualspace/django-agenda ?
urlpatterns = patterns('',
    url(r'^$', 
        cache_page(60 * 60)(EventListView.as_view()),
        name='events_event_list'
    ),
    url(r'^past/$',
        cache_page(60 * 60)(EventListView.as_view()),
        kwargs={'past': True},
        name='events_event_list_past'
    ),
    url(r'^(?P<pk>\d+)/$', DetailView.as_view(
        model=Event,
    ), name='events_event_detail'),
)
示例#2
0
from django.conf.urls.defaults import patterns, include, url
from django.contrib.auth.decorators import login_required

from surlex.dj import surl

from views import EventListView, EventDetailView, ReportListView, ReportDetailView

from views import event_register

urlpatterns = patterns('',
    url(r'^$', login_required(EventListView.as_view()), name='event_list'),
    surl(r'^event/<pk:s>/$', login_required(EventDetailView.as_view()), name='event_detail'),
    surl(r'^event/<pk:s>/register', login_required(event_register), name='event_register'),
    surl(r'^report/$', ReportListView.as_view(), name='report_list'),
    surl(r'^report/<pk:s>/$', ReportDetailView.as_view(), name='report_detail'),
)

示例#3
0
文件: urls.py 项目: kennonlee/kcdc3
from django.conf.urls import patterns, include, url
from models import Event, Registration
from views import EventListView, EventDetailView, ResponseTemplateView, EventArchiveView, SessionView, RegistrationListView, SessionAdminListView, TeacherAdminListView, FilteredTeacherAdminListView

urlpatterns = patterns('kcdc3.apps.classes.views',

	url(r'^$', EventListView.as_view()),
	url(r'^staff/$', SessionAdminListView.as_view()),
	url(r'^staff/teachers/$', TeacherAdminListView.as_view()),
	url(r'^staff/teachers/session/(?P<slug>[A-Za-z0-9_-]+)/$', FilteredTeacherAdminListView.as_view()),
	url(r'^staff/registrations/session/(?P<slug>[A-Za-z0-9_-]+)/$', RegistrationListView.as_view()),
	url(r'^(?P<slug>[0-9_-]+)/$', EventArchiveView.as_view()),
	url(r'^(?P<slug>[0-9_-]+)/background/$', SessionView.as_view()),
	url(r'^response/(?P<slug>[A-Za-z0-9_-]+)$', ResponseTemplateView.as_view()),
	url(r'^(?P<slug>[A-Za-z0-9_-]+)/$', EventDetailView.as_view(model=Event,)),
	url(r'^(?P<slug>[A-Za-z0-9_-]+)/register$', 'register'),
	url(r'^(?P<slug>[A-Za-z0-9_-]+)/cancel$', 'cancel'),
	url(r'^(?P<slug>[A-Za-z0-9_-]+)/facilitator$', 'facilitator'),

)
示例#4
0
from django.views.decorators.csrf import csrf_exempt
from django.conf.urls import url
from views import (EventView, SyncGoogleCalnder, EventListView)

urlpatterns = [
    url(r'^v1/events/$', csrf_exempt(EventView.as_view())),
    url(r'^v1/events/(?P<event_id>[0-9]+)/$',
        csrf_exempt(EventListView.as_view())),
    url(r'^v1/sync/$', csrf_exempt(SyncGoogleCalnder.as_view())),
]
示例#5
0
文件: urls.py 项目: 2bethere/SPTest
try:
    from django.conf.urls import (patterns, include, url,
                                  handler500, handler404)
except ImportError:
    from django.conf.urls.defaults import (patterns, include, url, # noqa
                                  handler500, handler404)

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
from views import SiteListView, JobListView, EventListView, JobFormView

urlpatterns = patterns(
    '',
    url(r'^$', SiteListView.as_view(),name='sitelist'),
    url(r'^jobs/$', JobListView.as_view(),name='joblist'),
    url(r'^jobs/new$', JobFormView.as_view(),name='jobform'),
    url(r'^events/$', EventListView.as_view(),name='eventlist'),
    url(r'^events/(?P<domainname>.*)/$', EventListView.as_view(),name='eventsearch'),

)
示例#6
0
from django.conf.urls.defaults import patterns, url
from django.views.generic import DetailView

from models import Event
from views import EventListView

# TODO month view https://github.com/justinlilly/django-gencal or https://github.com/visualspace/django-agenda ?
urlpatterns = patterns('',
    url(r'^$', EventListView.as_view(), name='events_event_list'),
    url(r'^past/$', EventListView.as_view(), kwargs={'past': True}, name='events_event_list_past'),
    url(r'^(?P<pk>\d+)/$', DetailView.as_view(
        model=Event,
    ), name='events_event_detail'),
)
示例#7
0
from views import CompanyListView, CompanyDetailView, UserListView, UserDetailView, EventListView, EventDetailView, CallListView, \
                 CallDetailView, CompanyTypesListView, CompanyTypesDetailView, MaterialListView, MaterialDetailView

urlpatterns = patterns(
    '',
    url(r'^companies/$', CompanyListView.as_view(),
        name='companies-list-view'),
    url(r'^companies/(?P<company_id>\d+)/$',
        CompanyDetailView.as_view(),
        name='companies-detail-view'),
    url(r'^users/$', UserListView.as_view(), name='users-list-view'),
    url(r'^users/(?P<user_id>\d+)/$',
        UserDetailView.as_view(),
        name='users-detail-view'),
    url(r'^events/$', EventListView.as_view(), name='events-list-view'),
    url(r'^events/(?P<event_id>\d+)/$',
        EventDetailView.as_view(),
        name='events-detail-view'),
    url(r'^calls/', CallListView.as_view(), name='calls-list-view'),
    url(r'^calls/(?P<call_id>\d+)/$',
        CallDetailView.as_view(),
        name='calls-detail-view'),
    url(r'^company-type/$',
        CompanyTypesListView.as_view(),
        name='company-type-list-view'),
    url(r'^company-type/(?P<company_type_id>\d+)/$',
        CompanyTypesDetailView.as_view(),
        name='company-type-detail-view'),
    url(r'^materials/$',
        MaterialListView.as_view(),
示例#8
0
from django.conf.urls.defaults import patterns, url
from django.views.decorators.cache import cache_page
from django.views.generic import DetailView

from models import Event
from views import EventListView

# TODO month view https://github.com/justinlilly/django-gencal or https://github.com/visualspace/django-agenda ?
urlpatterns = patterns(
    '',
    url(r'^$',
        cache_page(60 * 60)(EventListView.as_view()),
        name='events_event_list'),
    url(r'^past/$',
        cache_page(60 * 60)(EventListView.as_view()),
        kwargs={'past': True},
        name='events_event_list_past'),
    url(r'^(?P<pk>\d+)/$',
        DetailView.as_view(model=Event, ),
        name='events_event_detail'),
)
示例#9
0
from django.conf.urls import patterns, include, url
from models import Event, Registration
from views import EventListView, EventDetailView, ResponseTemplateView, EventArchiveView, SessionView, RegistrationListView, SessionAdminListView, TeacherAdminListView, FilteredTeacherAdminListView, UserEventListView, JSONVizSessionAttendanceDataListView, tsv_events_by_location_data, csv_users_data, SocialListView
urlpatterns = patterns(
    'kcdc3.apps.classes.views',
    url(r'^$', EventListView.as_view()),

    # staff dashboard
    url(r'^staff/$', SessionAdminListView.as_view()),
    url(r'^staff/teachers/$', TeacherAdminListView.as_view()),
    url(r'^staff/teachers/session/(?P<slug>[A-Za-z0-9_-]+)/$',
        FilteredTeacherAdminListView.as_view()),
    url(r'^staff/registrations/session/(?P<slug>[A-Za-z0-9_-]+)/$',
        RegistrationListView.as_view()),
    url(r'^staff/social/session/(?P<slug>[A-Za-z0-9_-]+)/$',
        SocialListView.as_view()),

    # data
    url(r'^data/attendance/session/(?P<slug>[A-Za-z0-9_-]+)/json/$',
        JSONVizSessionAttendanceDataListView.as_view()),
    url(r'^data/attendance/session/(?P<slug>[A-Za-z0-9_-]+)/csv/$',
        'csv_session_attendance_data'),
    url(r'^data/registration/session/(?P<slug>[A-Za-z0-9_-]+)/csv/$',
        'csv_session_registration_data'),
    url(r'^data/location/txt/$', 'txt_location_data'),
    url(r'^data/location/json/$', 'json_location_data'),
    url(r'^data/event_location/json/$', 'json_event_location_data'),
    url(r'^data/events_by_location/tsv/$', 'tsv_events_by_location_data'),
    url(r'^data/users/csv/$', 'csv_users_data'),
    url(r'^classes$', UserEventListView.as_view()),
    url(r'^(?P<slug>[0-9_-]+)/$', EventArchiveView.as_view()),