Exemplo n.º 1
0
from django.conf.urls import url, include, patterns
from django.contrib import admin
from profiles.views import Home, FaqDisplayView
import settings

urlpatterns = [
    url(r'^$', Home.as_view(), name="home"),
    url(r'^notices/', include('notices.urls')),
    url(r'^accounts/', include('allauth.urls')),
    # url(r'^api/', include('feeds.urls')),
    url(r'^token/', 'rest_framework_jwt.views.obtain_jwt_token'),
    url(r'^tokenverify/', 'rest_framework_jwt.views.verify_jwt_token'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^user/', include('profiles.urls')),
    url(r'^faq/$', FaqDisplayView.as_view(), name="faq"),
    url(r'^pnotices/', include('private_notices.urls')),
    # url(r'', include('rest_framework.urls', namespace='rest_framework'))
]

# For development environment

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += patterns(
        '',
        (r'^media/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.MEDIA_ROOT
        }),
        url(r'^plate/', include('django_spaghetti.urls')),
        url(r'^__debug__/', include(debug_toolbar.urls)),
    )
Exemplo n.º 2
0
"""evm URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    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 profiles.views import Home, Blog, About_us, Events
from allauth.account.views import login, logout

urlpatterns = [
    url(r'^$', Home.as_view(), name='home'),
    url(r'^blog/$', Blog.as_view(), name='blog'),
    url(r'^about_us/$', About_us.as_view(), name='about_us'),
    url(r'^events/$', Events.as_view(), name='events'),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^profile/', include('profiles.urls')),

]
Exemplo n.º 3
0
# local file imports
from profiles.views import (Home,
                            FaqDisplayView,
                            about,
                            Contact,
                            BulkUser,
                            SingleUser)


import settings

admin.site.site_header = "JSS InfoConnect Admin Interface"

urlpatterns = [
    # Web urls
    url(r'^$', Home.as_view(), name="home"),
    url(r'^notices/', include('notices.urls')),
    url(r'^accounts/password/change/$', 'profiles.views.password_change', name='password_change'),
    url(r'^login/$', login, name="account_login"),
    url(r'^logout/$', logout, name="account_logout"),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^user/', include('profiles.urls')),
    url(r'^faq/$', FaqDisplayView.as_view(), name="faq"),
    # url(r'^pnotices/', include('private_notices.urls')),
    url(r'^about/$', about, name='about'),
    url(r'^contact/$', Contact.as_view(), name='contact'),
    # url(r'^api/', include('feeds.urls')),
    # url(r'', include('rest_framework.urls', namespace='rest_framework'))
    url(r'^students/create/single/$', SingleUser.as_view(), name='single_user_create'),
    url(r'^students/create/$', BulkUser.as_view(), name='bulk_students_create'),
Exemplo n.º 4
0
from django.conf.urls import url, include, patterns
from django.contrib.auth.decorators import login_required as auth

# from django.contrib.auth.models import User
from rest_framework import routers, serializers, viewsets
from django.contrib import admin
from profiles.views import UserProfile, Home, EditProfile
import settings

urlpatterns = [
    url(r"^$", Home.as_view(), name="home"),
    url(r"^notices/", include("notices.urls")),
    url(r"^accounts/", include("allauth.urls")),
    # url(r'^api/', include('feeds.urls')),
    url(r"^token/", "rest_framework_jwt.views.obtain_jwt_token"),
    url(r"^tokenverify/", "rest_framework_jwt.views.verify_jwt_token"),
    url(r"^admin/", include(admin.site.urls)),
    url(r"^user/", include("profiles.urls")),
    # url(r'', include('rest_framework.urls', namespace='rest_framework'))
]

if settings.DEBUG:
    # static files (images, css, javascript, etc.)
    urlpatterns += patterns(
        "", (r"^media/(?P<path>.*)$", "django.views.static.serve", {"document_root": settings.MEDIA_ROOT})
    )
Exemplo n.º 5
0
from django.conf.urls import patterns, include, url

from django.contrib import admin
from profiles.views import Register, Home, Contact, Login, Logout, demo_discretebarchart
from body_weight_workout.views import CreateWorkout, WorkoutView, UpdateWorkout

admin.autodiscover()

urlpatterns = patterns(
    '',
    url(r'^$', Home.as_view(), name='home'),
    url(r'^home/(?P<exercise>\w+)$', Home.as_view(), name='home'),
    url(r'^contact', Contact.as_view(), name='contact'),
    url(r'^accounts/register/$', Register.as_view(), name='register'),
    url(r'^accounts/login/$', Login.as_view(), name='login'),
    url(r'^accounts/logout/$', Logout.as_view(), name='logout'),
    url(r'^charts/discretebarchart/', demo_discretebarchart, name='demo_discretebarchart'),
    url(r'^create_workout/$', CreateWorkout.as_view(), name='create_workout'),
    url(r'^(?P<username>\w+)/workout/(?P<workout_id>\d+)/$', WorkoutView.as_view(), name='view_workout'),
    url(r'^(?P<username>\w+)/update_workout/(?P<workout_id>\d+)/(?P<group>\d+)/$', UpdateWorkout.as_view(), name='update_workout'),
    url(r'^admin/', include(admin.site.urls)),
)