Exemplo n.º 1
0
from django.conf.urls import patterns, include, url
from engine.views import HomeView, BreweryListView, BeerListView, BreweryDetailView, BeerDetailView, StyleListView, \
StyleDetailView, LoginView, LogoutView, SignupView, WishListView, LikeBeerView, SaveBeerView, DislikeBeerView

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'brewedwell.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

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

    url(r'^signup/$', SignupView.as_view(), name='signup'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),

    url(r'^$', HomeView.as_view(), name='home'),
    url(r'^breweries/$', BreweryListView.as_view(), name='brewery-list'),
    url(r'^beers/$', BeerListView.as_view(), name='beer-list'),
    url(r'^breweries/(?P<pk>\d+)/$', BreweryDetailView.as_view(), name='brewery-detail'),
    url(r'^beers/(?P<pk>\d+)/$', BeerDetailView.as_view(), name='beer-detail'),
    url(r'^styles/$', StyleListView.as_view(), name='style-list'),
    url(r'^styles/(?P<pk>\d+)/$', StyleDetailView.as_view(), name='style-detail'),
    url(r'^wishlist/$', WishListView.as_view(), name='wishlist-view'),
    url(r'^beers/like/(?P<pk>\d+)/$', LikeBeerView, name='like-beer'),
    url(r'^beers/save/(?P<pk>\d+)/$', SaveBeerView, name='save-beer'),
    url(r'^beers/dislike/(?P<pk>\d+)/$', DislikeBeerView, name='dislike-beer'),
)
Exemplo n.º 2
0
    url(r'^$', HomeView.as_view(), name='home'),
    url(r'^tasks/$', ToDoListDisplayView.as_view(), name='tasks'),
    url(r'^new-task/$', AddTaskFormView.as_view(), name='add-task'),
    url(r'^assign-task/(?P<pk>\d+)/', AssignTaskFormView.as_view(), name='assign-task'),
    url(r'^details/(?P<pk>\d+)/$', TaskDetailView.as_view(), name='task-detail'),
    # url(r'^complete-task/(?P<pk>\d+)/$', CompleteTaskAPIView.as_view(), name='complete-task-api'),
    # url(r'^accept-task/(?P<pk>\d+)/$', AcceptTaskAPIView.as_view(), name='accept-task-api'),
    url(r'^complete-task/(?P<pk>\d+)/$', CompleteTaskView, name='complete-task'),


    url(r'^update-task-good/(?P<pk>\d+)/$', UpdateTaskGoodView, name='update-task-good'),
    url(r'^update-task-help/(?P<pk>\d+)/$', UpdateTaskHelpView, name='update-task-help'),
    url(r'^update-task-trouble/(?P<pk>\d+)/$', UpdateTaskTroubleView, name='update-task-trouble'),

    url(r'^accept-task/(?P<pk>\d+)/$', AcceptTaskView, name='accept-task'),
    url(r'^delete-task/(?P<pk>\d+)/$', DeleteTaskView, name='delete-task'),
    url(r'^dashboard/$', DashboardView.as_view(), name='dashboard'),
    url(r'^dashboard/unit/add/$', AddUnitView.as_view(), name='add-unit'),
    url(r'^dashboard/goals/(?P<pk>\d+)/$', GoalsView.as_view(), name='goals'),
    url(r'^dashboard/goals/add/(?P<pk>\d+)/$', AddGoalView.as_view(), name='goals-add'),
    url(r'^dashboard/goals/tasks/(?P<pk>\d+)/$', GoalsDetailView.as_view(), name='goals-detail'),
    url(r'^task/(?P<pk>\d+)/add-resource/$', AddResourceView.as_view(), name='add-resource' ),
    url(r'^task/(?P<pk>\d+)/add-comment/$', AddCommentView.as_view(), name='add-comment' ),

    url(r'^signup/$', SignUpView.as_view(), name='signup'),
    url(r'^accounts/login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^activate/(?P<token>[-\w]+)/$', ActivateView.as_view(), name='activate'),

)
Exemplo n.º 3
0
    url(r'^update-task-help/(?P<pk>\d+)/$',
        UpdateTaskHelpView,
        name='update-task-help'),
    url(r'^update-task-trouble/(?P<pk>\d+)/$',
        UpdateTaskTroubleView,
        name='update-task-trouble'),
    url(r'^accept-task/(?P<pk>\d+)/$', AcceptTaskView, name='accept-task'),
    url(r'^delete-task/(?P<pk>\d+)/$', DeleteTaskView, name='delete-task'),
    url(r'^dashboard/$', DashboardView.as_view(), name='dashboard'),
    url(r'^dashboard/unit/add/$', AddUnitView.as_view(), name='add-unit'),
    url(r'^dashboard/goals/(?P<pk>\d+)/$', GoalsView.as_view(), name='goals'),
    url(r'^dashboard/goals/add/(?P<pk>\d+)/$',
        AddGoalView.as_view(),
        name='goals-add'),
    url(r'^dashboard/goals/tasks/(?P<pk>\d+)/$',
        GoalsDetailView.as_view(),
        name='goals-detail'),
    url(r'^task/(?P<pk>\d+)/add-resource/$',
        AddResourceView.as_view(),
        name='add-resource'),
    url(r'^task/(?P<pk>\d+)/add-comment/$',
        AddCommentView.as_view(),
        name='add-comment'),
    url(r'^signup/$', SignUpView.as_view(), name='signup'),
    url(r'^accounts/login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^activate/(?P<token>[-\w]+)/$',
        ActivateView.as_view(),
        name='activate'),
)