Ejemplo n.º 1
0
# Django
from django.conf.urls import patterns, url

# local Django
from event import views
from event.views import EventCreateView, EventDeleteView, EventUpdateView, EventListView

urlpatterns = patterns(
    '',
    url(r'^create/$', EventCreateView.as_view(), name='create'),
    url(r'^delete/(?P<event_id>\d+)$',
        EventDeleteView.as_view(),
        name='delete'),
    url(r'^edit/(?P<event_id>\d+)$', EventUpdateView.as_view(), name='edit'),
    url(r'^list/$', EventListView.as_view(), name='list'),
    url(r'^list_sign_up/(?P<volunteer_id>\d+)$',
        views.list_sign_up,
        name='list_sign_up'),
)
Ejemplo n.º 2
0
from django.urls import path

from event.views import EventDetailView, EventListView

urlpatterns = [
    path("", EventListView.as_view(), name="event_list"),
    path("<int:pk>/", EventDetailView.as_view(), name="event_detail"),
]
Ejemplo n.º 3
0
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
import settings
from django.conf.urls.static import static
from signup.views import LandingView
from event.views import DashboardView, CreateEventView, ReShoutView, EventListView, MobileCreateEventView, CreateFormView
admin.autodiscover()

#urlpatterns = static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

urlpatterns = patterns('',

    url(r'^logout/$', 'signup.views.logout', name='logout'),
    url(r'^login/$', LandingView.as_view(), name='login'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', DashboardView.as_view(), name='dashboard'),
    url(r'create_event/', CreateEventView.as_view(), name='create_event'),
    url(r'reshout/(?P<event_id>[\d]+)/', ReShoutView.as_view(), name='reshout'),
    url(r'^events/', EventListView.as_view(), name='event_api'),
    url(r'^create/', MobileCreateEventView.as_view(), name='mobile_create'),
    url(r'^create_form/', CreateFormView.as_view(), name='create_shout'),
)

urlpatterns += patterns('',
    (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)



Ejemplo n.º 4
0
from django.urls import path

from event.views import EventCreateView, EventListView

app_name = 'event'
urlpatterns = [
    path('', EventListView.as_view(), name='list'),
    path('create/', EventCreateView.as_view(), name='create'),
]
Ejemplo n.º 5
0
from django.conf.urls import patterns, include, url
from django.views.generic import ListView
from django.contrib.auth.decorators import login_required

from event.views import (
    EventListView,
    EventTypeListView,
    EventDetailView,
    EventCreateView,
    EventUpdateView,
    EventComingListView,
    EventPopularListView,
    EventArchiveListView,
)

urlpatterns = patterns(
    "",
    # url(r'^$', 'cdi.views.home', name='home'),
    url(r"^$", EventListView.as_view(), name="event_all"),
    url(r"^coming/$", EventComingListView.as_view(), name="event_coming"),
    url(r"^popular/$", EventPopularListView.as_view(), name="event_popular"),
    url(r"^archive/(?P<year>\d+)/$", EventArchiveListView.as_view(), name="event_archive"),
    url(r"^create/$", login_required(EventCreateView.as_view()), name="event_create"),
    url(r"^type/(?P<slug>\w+)/$", EventTypeListView.as_view(), name="event_type"),
    url(r"^(?P<slug>[-\w]+)/$", EventDetailView.as_view(), name="event_detail"),
    url(r"^(?P<slug>\w+)/edit/$", EventUpdateView.as_view(), name="event_update"),
)
Ejemplo n.º 6
0
from django.conf.urls import patterns, include, url
from django.views.generic import ListView
from django.contrib.auth.decorators import login_required

from event.views import EventListView, EventTypeListView, EventDetailView, EventCreateView, EventUpdateView, EventComingListView, EventPopularListView, EventArchiveListView

urlpatterns = patterns(
    '',
    # url(r'^$', 'cdi.views.home', name='home'),
    url(r'^$', EventListView.as_view(), name='event_all'),
    url(r'^coming/$', EventComingListView.as_view(), name='event_coming'),
    url(r'^popular/$', EventPopularListView.as_view(), name='event_popular'),
    url(r'^archive/(?P<year>\d+)/$',
        EventArchiveListView.as_view(),
        name='event_archive'),
    url(r'^create/$',
        login_required(EventCreateView.as_view()),
        name='event_create'),
    url(r'^type/(?P<slug>\w+)/$',
        EventTypeListView.as_view(),
        name='event_type'),
    url(r'^(?P<slug>[-\w]+)/$', EventDetailView.as_view(),
        name='event_detail'),
    url(r'^(?P<slug>\w+)/edit/$',
        EventUpdateView.as_view(),
        name='event_update'),
)
from django.urls import path,include
from event.views import Homepage,EventListView,EventDetailView,EventCreateView,EventDeleteView,EventUpdateView,attend_event,not_attend_event


app_name = 'events'

urlpatterns = [
    path('', Homepage.as_view() ,name='home'),
    path('events/', EventListView.as_view() ,name='event_list'),
    path('events/<int:pk>/',EventDetailView.as_view() , name='event_detail'),
    path('events/new/', EventCreateView.as_view(), name='event_create' ),
    path('events/<int:pk>/delete',EventDeleteView.as_view(), name='event_delete'),
    path('events/<int:pk>/update', EventUpdateView.as_view(), name='event_update'),
    path('events/<event_id>/attend/', attend_event, name='attend_event'),
    path('events/<event_id>/not_attend/', not_attend_event, name='not_attend_event')
]