Пример #1
0
from django.conf.urls import url
from matchup import views as matchup_views
from matchup.views import  ListCreateMatches, ListParks, \
    CreateFeedbacks, DetailPark, DetailUpdateMatch, \
    DetailUpdateFeedback,   \
    JoinMatch, DeclineMatch, ConfirmMatch,  \
    CreateCourts, LeaveMatch, ChallengeCreateMatch, DetailUpdateCourt
from users.views import ListUsers, CreateUser, DetailUpdateUser, \
    ObtainAuthToken

urlpatterns = (
    url(r'^users/$', ListUsers.as_view(), name='api_list_users'),
    url(r'^users/create/$', CreateUser.as_view(), name='api_create_user'),
    url(r'^users/(?P<pk>\d+)/$', DetailUpdateUser.as_view(),
        name='api_detail_update_user'),
    url(r'^api-token-auth/$', ObtainAuthToken.as_view(),
        name='api_obtain_auth_token'),
    url(r'^parks/$', ListParks.as_view(), name='api_list_parks'),
    url(r'^parks/(?P<pk>\d+)', DetailPark.as_view(), name='api_park_detail'),
    url(r'^matches/$', ListCreateMatches.as_view(),
        name='api_list_create_matches'),
    url(r'^matches/challenge/$', ChallengeCreateMatch.as_view(),
        name='api_challenge'),
    url(r'^matches/(?P<pk>\d+)/$', DetailUpdateMatch.as_view(),
        name='api_detail_update_match'),
    url(r'^matches/(?P<pk>\d+)/join/$', JoinMatch.as_view(),
        name='api_join_match'),
    url(r'^matches/(?P<pk>\d+)/leave/$', LeaveMatch.as_view(),
        name='api_leave_match'),
    url(r'^matches/(?P<pk>\d+)/confirm/$', ConfirmMatch.as_view(),
        name='api_confirm_match'),
Пример #2
0
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from freds_list import settings
from fredslist.views import  PostDetail, PostList, CreatePost, EditPost, DeletePost, CategoryList, StateList
from users.views import CreateUser
from django.conf.urls.static import static

urlpatterns = [

    ####################  REGISTRATION AND HOMEPAGE ##########
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include('django.contrib.auth.urls')),
    url(r'^$', StateList.as_view(), name="home"),
    url(r'^register/', CreateUser.as_view(), name='register'),



    ####################  CATEGORIES and SUBCATEGORIES ##########
    url(r'^categories/', CategoryList.as_view(), name="category_list"),



    ##################    GENERAL POST URLS ##############
    url(r'^posts/(?P<pk>\d+)/$', PostDetail.as_view(),name='post_detail'),
    url(r'^posts/', PostList.as_view(), name="posts"),
    url(r'^create_post/$', CreatePost.as_view(), name='post_create'),
    url(r'^update_post/(?P<pk>\d+)', EditPost.as_view(), name='post_edit'),
    url(r'^delete_post/(?P<pk>\d+)', DeletePost.as_view(), name='post_delete'),
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Пример #3
0
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from bookmark.views import CreateBookmark, BookmarkDetail
from users.views import CreateUser, ListBookmark, ListProfile, BookmarkDelete, BookmarkUpdate

urlpatterns = [
    url(r"$^", ListBookmark.as_view(), name="list_bookmarks"),
    url(r"^admin/", include(admin.site.urls)),
    url(r"^login/register/", CreateUser.as_view(), name="register"),
    url(r"^", include("django.contrib.auth.urls")),
    url(r"^accounts/profile", login_required(ListProfile.as_view()), name="list_profile"),
    url(r"^create/$", login_required(CreateBookmark.as_view()), name="bookmark_create"),
    url(r"(?P<pk>\d+)/$", BookmarkDetail.as_view(), name="bookmark_detail"),
    url(r"(?P<short_link>\w+)/$", "bookmark.views.link", name="link"),
    url(r"delete/(?P<pk>\d+)", BookmarkDelete.as_view(), name="delete_bookmark"),
    url(r"edit/(?P<pk>\d+)", BookmarkUpdate.as_view(), name="update_bookmark"),
]
Пример #4
0
    # Examples:
    # url(r'^$', 'RyndaRebuild.views.home', name='home'),
    # url(r'^RyndaRebuild/', include('RyndaRebuild.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^$', 'message.views.list'),
    url(r'', include('social_auth.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^admin-tools/', include('admin_tools.urls')),
    url(r'^info/', include('core.urls')),
    url(r'^logout$', 'message.views.logout_view'),
    url(r'^message/', include('message.urls')),
    url(r'^register$', CreateUser.as_view()),
    url(r'^t/(?P<slug>[a-z_0-9-]+)$', 'message.views.list'),
    url(r'^t/(?P<slug>)message/', include('message.urls')),
    url(r'^user/', include('users.urls')),
)

urlpatterns += patterns('django.contrib.auth.views',
    url(r'^login$', 'login',
        {'template_name': 'login.html'}),
    url(r'^password/reset$', 'password_reset',
        ),
    url(r'^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]{1,13})-(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        'password_reset_confirm',),
    url(r'^password/reset/complete$',
        'password_reset_complete'),
    url(r'^password/reset/done',