예제 #1
0
 def test_index_view_basic(self):
     """
     Test that index view returns a 200 response
     and uses correct template
     """
     request = self.factory.get('/')
     response = IndexView.as_view()(request)
     self.assertEqual(response.status_code, 200)
예제 #2
0
from django.views.static import serve
from django.conf.urls import url, include

# Local Django
from core.views import get_tweets, IndexView, HackathonView

urlpatterns = [
    # Admin
    url(r'^admin/', admin.site.urls),

    # Editor
    url(r'^redactor/', include('redactor.urls')),

    # Pages
    url(r'^hackathon/$', HackathonView.as_view(), name='hackathon'),
    url(r'^(?P<year>\w+)?/hackathon/$',
        HackathonView.as_view(),
        name='hackathon-year'),
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^(?P<year>\w+)?/$', IndexView.as_view(), name='index-year'),
    url(r'^get-tweets/$', get_tweets, name='get-tweets')
]

# Media
if settings.DEBUG:
    urlpatterns += [
        url(r'^media/(?P<path>.*)$', serve, {
            'document_root': settings.MEDIA_ROOT,
        }),
    ]
예제 #3
0
# Django
from django.conf.urls import url
from django.contrib.auth.decorators import login_required

# Hippo
from core.views import (IndexView, SettingsView, LoginView, LogoutView,
                        SignupView)

urlpatterns = [
    url(r'^$', login_required(IndexView.as_view()), name='workspace'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^signup/$', SignupView.as_view(), name='signup'),
    url(r'^settings/$',
        login_required(SettingsView.as_view()),
        name='settings'),  # noqa
]
예제 #4
0
"""instaclient 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 a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin

from core.views import IndexView

admin.autodiscover()


urlpatterns = i18n_patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'$', view=IndexView.as_view(), name='index'),
)
예제 #5
0
from django.conf.urls import url, include
from django.contrib import admin

from core.views import IndexView

urlpatterns = [
    url(regex=r'^$', view=IndexView.as_view(), name='index'),
    url(regex=r'^admin/', view=admin.site.urls),
    url(regex=r'^api/', view=include('api.urls', namespace='api'))
]
예제 #6
0
# Admin
admin.autodiscover()

# SEO
#from rollyourown.seo.admin import register_seo_admin
#from core.seo import SiteMetadata
#register_seo_admin(admin.site, SiteMetadata)

urlpatterns = patterns('',
	(r'^grappelli/', include('grappelli.urls')),
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
    (r'^tinymce/', include('tinymce.urls')),
    (r'^share/', include('share.urls')),

    url(r'^$', IndexView.as_view(), name='home'),

    # shop
    #(r'^shop/', include('shop.urls')),
    #url(r'^product/(?P<slug>[0-9A-Za-z-_.//]+)/$', ProductView.as_view(), name='shop_product'),
    #url(r'^cart/$', CartView.as_view(), name='shop_cart'),
    url(r'^catalog/$', 'core.views.CatalogView', name='shop_catalog'),
    url(r'^catalog/(?P<category_slug>[a-zA-Z0-9-_]+)/$', 'core.views.CatalogView', name='shop_catalog'),
    (r'^product/', include('shop.product.urls')),
    (r'^cart/', include('shop.cart.urls')),

    (r'^ajax/form_validation/$', 'ajax_validation.views.validate', {'form_class': AddToCartForm}, 'contact_form_validate')
)

urlpatterns += staticfiles_urlpatterns()
예제 #7
0
from core.views import ContactUsView, ExportStudentsView,\
    GroupCreateView, GroupUpdateView, GroupsView,\
    IndexView, RegistrationView, StudentCreateView,\
    StudentUpdateView, StudentsView, TeacherCreateView,\
    TeacherUpdateView, TeachersView

from django.urls import path

urlpatterns = [
    path('', IndexView.as_view(), name='home'),
    path('groups/', GroupsView.as_view(), name='groups'),
    path('group/create', GroupCreateView.as_view(), name='group_create'),
    path('group/update/<int:group_id>/',
         GroupUpdateView.as_view(),
         name='group_update'),
    path('teachers/', TeachersView.as_view(), name='teachers'),
    path('teachers/create',
         TeacherCreateView.as_view(),
         name='teachers_create'),
    path('teacher/update/<int:teacher_id>/',
         TeacherUpdateView.as_view(),
         name='teacher_update'),
    path('students/', StudentsView.as_view(), name='students'),
    path('student/create/', StudentCreateView.as_view(),
         name='student_create'),
    path('student/update/<int:student_id>/',
         StudentUpdateView.as_view(),
         name='student_update'),
    path('contact_us/', ContactUsView.as_view(), name='contact_us'),
    path('registration/', RegistrationView.as_view(), name='registration'),
    path('export/students',
예제 #8
0
파일: urls.py 프로젝트: artzmb/hhkl-backend
import sys
import re

from django.conf.urls import patterns, include, url
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin

admin.autodiscover()

from core.views import IndexView, MatchesView, PlayersView, TableView, MatchView

urlpatterns = patterns(
    '',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', IndexView.as_view(), name="index"),
    url(r'^api/league/(?P<league_level>\w+)/matches/$', MatchesView.as_view()),
    url(r'^api/league/(?P<league_level>\w+)/players/$', PlayersView.as_view()),
    url(r'^api/league/(?P<league_level>\w+)/tables/(?P<table_type>\w+)/$', TableView.as_view()),
    url(r'^api/matches/(?P<match_id>[0-9]+)/$', MatchView.as_view()),
) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

# http://stackoverflow.com/questions/8258417
if 'test' in sys.argv:
    static_url = re.escape(settings.STATIC_URL.lstrip('/'))
    urlpatterns += patterns(
        '',
        url(
            r'^%s(?P<path>.*)$' % static_url,
            'django.views.static.serve',
            {
예제 #9
0
파일: urls.py 프로젝트: DashaMer/photogrid
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

from core.views import IndexView

admin.autodiscover()

# import core.admin

handler500 = "core.views.server_error"

urlpatterns = patterns("", (r"^admin/doc/", include("django.contrib.admindocs.urls")))

if "grappelli" in settings.INSTALLED_APPS:
    urlpatterns += patterns("", url(r"^grappelli/", include("grappelli.urls")))

urlpatterns += patterns("", (r"^admin/", include(admin.site.urls)))

urlpatterns += patterns("", url(r"^$", IndexView.as_view(), name="index"))


urlpatterns += staticfiles_urlpatterns() + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DEBUG:
    urlpatterns += patterns(
        "",
        # Allows the 500.html page to be rendered in DEBUG mode
        (r"^500/$", "core.views.server_error"),
    )
예제 #10
0
파일: urls.py 프로젝트: ilib0x00000000/NULL
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
import xadmin
from django.views.generic import TemplateView
from django.views.static import serve
from django.views.generic.base import RedirectView

from users.views import LoginView, RegisterView, ActiveView, UpdatePasswordView, ResetPasswordView
from courseonline.settings import MEDIA_ROOT
from core.views import LogoutView, IndexView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^index.html$', IndexView.as_view(), name='index_html'),
    url(r'^login.html$', LoginView.as_view(), name='login'),
    url(r'^logout$', LogoutView.as_view(), name='logout'),
    url(r'^register.html$', RegisterView.as_view(), name='register'),
    url(r'^active', ActiveView.as_view(), name='active'),
    url(r'^password/110$', UpdatePasswordView.as_view(), name='find_password'),
    url(r'^password/find', ResetPasswordView.as_view(), name='reset_password'),
    url(r'^favicon\.ico$', RedirectView.as_view(url='/static/img/favicon.ico')),

    url(r'^teacher/', include('operation.urls', namespace='teacher'), name='teacher'),
    url(r'^org/', include('orgzation.urls', namespace='org'), name='orglist'),
    url(r'^course/', include('courses.urls', namespace='course'), name='course'),
    url(r'^search/', include('core.urls', namespace='search'), name='core'),
    url(r'^user/', include('users.urls', namespace='user'), name='user'),
    url(r'^test/', include('tests.urls', namespace='test'), name='test'),
from django.urls import path
from core.views import IndexView

urlpatterns = [path('', IndexView.as_view(), name='index')]
예제 #12
0
 def test_root_url_resolves_to_index_view(self):
     found = resolve('/')
     self.assertEqual(found.func.__name__, IndexView.as_view().__name__)
예제 #13
0
from core import core
from core.views import IndexView, MeetView, ContactView, TestView, AboutView, NewView, BlockView, LayoutView

routes = [(
    (core, ),
    ('', IndexView.as_view('index')),
    ('about', AboutView.as_view('about')),
    ('meet', MeetView.as_view('meet')),
    ('contact', ContactView.as_view('contact')),
    ('test', TestView.as_view('test')),
    ('new', NewView.as_view('new')),
    ('blockview/<int:alt_layout>', BlockView.as_view('blockview')),
    ('show_layout/<layout>', LayoutView.as_view('show_layout')),
    ('show_layout/<layout>/<navbar>', LayoutView.as_view('show_nav_layout')),
)]
예제 #14
0
from django.urls import path, include
from core.views import IndexView, CreateRecruitView, Questions, CongratulationsView, SithsListView, RecruitsListView, \
    SithsShortcutListView, RecruitDetailView

app_name = 'core'

urlpatterns = [
    path('main/', IndexView.as_view(), name='main'),
    path('create/rec/', CreateRecruitView.as_view(), name='create_rec'),
    path('create/rec/questions/',
         Questions.as_view(),
         name='recruit_questions'),
    path('create/rec/congratulations/',
         CongratulationsView.as_view(),
         name='congratulations'),
    path('choose/sith/', SithsListView.as_view(), name='all_siths'),
    path('choose/sith/recruit/<int:pk>/',
         RecruitDetailView.as_view(),
         name='rec_detail'),
    path('choose/sith/shortcut',
         SithsShortcutListView.as_view(),
         name='all_siths_shortcut'),
    path('choose/sith/recruit',
         RecruitsListView.as_view(),
         name='all_recruits'),
]
예제 #15
0
파일: urls.py 프로젝트: IuryAlves/TryPython
from django.conf.urls import include, url
from django.contrib import admin
from core.views import IndexView, EvalView
from tutorial.views import StepView

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r"^$", IndexView.as_view()),
    url(r"^step/\d+$", IndexView.as_view()),
    url(r"^eval", EvalView.as_view()),
    url(r"^get_step", StepView.as_view())
]
예제 #16
0
        OverdubDeleteView.as_view(),
        name='delete_overdub'),
    url(r'^searchcourse/$', CourseListView.as_view(), name='course_list'),
    url(r'^post/save/$', PostSaveView.as_view(), name='save_post'),
    url(r'^post/delete/$', PostDeleteView.as_view(), name='delete_post'),
    url(r'^upload/$', fileUpload, name='file_upload'),
    url(r'^subscribe/(\w+)/$', subscribeCourse, name='subscribe_course'),
    url(r'^perm/change/$', changePerm, name='change_perm'),
    url(r'^activity/copy/$', copyActivity, name='copy_activity'),
    url(r'^lesson/title/edit/$', editLessonTitle, name='edit_lesson_title'),
    url(r'^essaydraft/edit/$', editEssayDraft, name='edit_essay_draft'),
    url(r'^admin/', include(admin.site.urls)),
    #url(r'^socket\.io', include(socketio.sdjango.urls)),
    url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'),
    url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout'),
    #
    # url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
    # url(r'^accounts/logout/$', uhcaslogout, name='logout'),

    # url(r'^accounts/login/$', 'django_cas_ng.views.login', name='login'),
    # url(r'^accounts/logout/$', uhcaslogout, name='logout'),
    # url(r'^accounts/callback$', 'django_cas_ng.views.callback', name='cas_ng_proxy_callback'),
    url(r'^crossdomain.xml$', 'flashpolicies.views.simple',
        {'domains': ['*']}),
    url(r'^home/$', HomeView.as_view(), name='home'),
    url(r'^$', IndexView.as_view(), name='landing'),
    url(r'^profile/', include('user_profile.urls', namespace='profile')),
)
urlpatterns += static(base.MEDIA_URL, document_root=base.MEDIA_ROOT)
urlpatterns += static(base.STATIC_URL, document_root=base.STATIC_ROOT)
예제 #17
0
파일: urls.py 프로젝트: artzmb/hhkl-backend
import sys
import re

from django.conf.urls import patterns, include, url
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin

admin.autodiscover()

from core.views import IndexView, MatchesView, PlayersView, TableView, MatchView

urlpatterns = patterns(
    '',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', IndexView.as_view(), name="index"),
    url(r'^api/league/(?P<league_level>\w+)/matches/$', MatchesView.as_view()),
    url(r'^api/league/(?P<league_level>\w+)/players/$', PlayersView.as_view()),
    url(r'^api/league/(?P<league_level>\w+)/tables/(?P<table_type>\w+)/$',
        TableView.as_view()),
    url(r'^api/matches/(?P<match_id>[0-9]+)/$', MatchView.as_view()),
) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

# http://stackoverflow.com/questions/8258417
if 'test' in sys.argv:
    static_url = re.escape(settings.STATIC_URL.lstrip('/'))
    urlpatterns += patterns(
        '',
        url(r'^%s(?P<path>.*)$' % static_url, 'django.views.static.serve', {
            'document_root': settings.STATIC_ROOT,
        }),
예제 #18
0
from core import core
from core.views import IndexView,MeetView,ContactView,TestView,AboutView,NewView,JsonRequestView


routes = [
    ((core,),
        ('',IndexView.as_view('index')),
        ('show/<layout_name>',IndexView.as_view('show_layout')),
        ('about',AboutView.as_view('about')),
        ('meet',MeetView.as_view('meet')),
        ('contact',ContactView.as_view('contact')),
        ('test',TestView.as_view('test')),
        ('new',NewView.as_view('new')),
        ('json',JsonRequestView.as_view('json')),
    )
]
예제 #19
0
파일: urls.py 프로젝트: shydesky/flask-cms
from core import core
from core.views import IndexView, MeetView, ContactView, TestView, AboutView, NewView, BlockView, LayoutView

routes = [(
    (core, ),
    ('', IndexView.as_view('index')),
    ('show/<layout_name>', IndexView.as_view('show_layout')),
    ('about', AboutView.as_view('about')),
    ('meet', MeetView.as_view('meet')),
    ('contact', ContactView.as_view('contact')),
    ('test', TestView.as_view('test')),
    ('new', NewView.as_view('new')),
    ('blockview/<int:alt_layout>', BlockView.as_view('blockview')),
    #('show_layout/<layout>',LayoutView.as_view('show_layout')),
    ('show_layout/<layout>/<navbar>', LayoutView.as_view('show_nav_layout')),
)]
예제 #20
0
from django.contrib import admin
from django.conf.urls import include
from django.urls import path

from rest_framework import routers

from core.views import IndexView
from core.viewsets import CellOperatorViewSet, CustomLogin, CustomLogout, UserBalanceViewSet


router = routers.DefaultRouter()
router.register(r'cell-operators', CellOperatorViewSet)
router.register(r'user-balance', UserBalanceViewSet, 'user-balance')

urlpatterns = [
    path('', IndexView.as_view()),
    path('cell-operators/', IndexView.as_view()),
    path('cell-operators/<int:id>/', IndexView.as_view()),
    path('login/', IndexView.as_view()),
    path('api/', include(router.urls)),
    path('api-login/', CustomLogin.as_view()),
    path('api-logout/', CustomLogout.as_view()),
    path('admin/', admin.site.urls),
]
예제 #21
0
"""instaclient 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 a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin

from core.views import IndexView

admin.autodiscover()

urlpatterns = i18n_patterns(
    '',
    url(r'^admin/', include(admin.site.urls)),
    url(r'$', view=IndexView.as_view(), name='index'),
)
예제 #22
0
파일: urls.py 프로젝트: FNSdev/gitrello
from django.urls import re_path

from core.views import IndexView

app_name = 'core'

urlpatterns = [
    re_path(r'^.*$', IndexView.as_view(), name='index'),
]
예제 #23
0
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. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from core.views import IndexView
from django.conf import settings
from django.conf.urls.static import static
from core.views import ExampleView, VideoViewSet

# router = routers.DefaultRouter()
# router.register(r'videos', VideoViewSet)

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^index/', IndexView.as_view()),
    # url(r'api/v1/', include(router.urls)),
    url(r'^api/v1/download_video/', ExampleView.as_view()),
    url(r'^api/v1/videos/', VideoViewSet.as_view()),
]

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
예제 #24
0
router.register(r'posts', post_views.PostViewSet)
router.register(r'news', post_views.SubscriptionsPostViewSet)
router.register(r'books', post_views.BookViewSet)
router.register(r'users', core_views.AllUsersViewSet)
router.register(r'subscriptions', core_views.SubscriptionsViewSet)
router.register(r'events', event_views.EventViewSet)
router.register(r'likes', core_views.LikeViewSet)
router.register(r'comments', comment_views.CommentViewSet)
router.register(r'subscribes', core_views.SubscribesViewSet)

urlpatterns = [
    url(r'api/v1/', include(router.urls)),
    url(r'^admin/', admin.site.urls),
    url(r'^api-token-auth/', views.obtain_auth_token),
    url(r'^social/', include('social_django.urls', namespace='social')),
    url(r'^index/', ensure_csrf_cookie(IndexView.as_view())),
    url(r'api/v1/profile', core_views.SelfUserView.as_view()),
    url(r'^search/', include('haystack.urls', 'search')),
]

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]
    from django.conf.urls.static import static

    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
예제 #25
0
from django.conf.urls import include, url
from django.contrib import admin
from core.views import IndexView

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', IndexView.as_view())
]
예제 #26
0
"""settings URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/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. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin

from django.views.generic import TemplateView
from core.views import IndexView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name="IndexTemplateView"),
    url(r'^projects/', include('projects.urls', namespace='Projects'), name='Projects'),
    url(r'^courses/', include('courses.urls', namespace='Courses'), name='Courses'),
    url(r'^blog/', include('blog.urls', namespace='Blog'), name='Blog'),
    url(r'^unitime/api/', include('unitime_api.urls', namespace='UniTImeAPI'), name='UniTImeAPI'),
    url(r'^admin/', admin.site.urls),
]
예제 #27
0
from django.conf.urls import url, include
from django.contrib import admin

from core.views import IndexView

urlpatterns = [
    url(
        regex=r'^$',
        view=IndexView.as_view(),
        name='index'
    ),
    {% if cookiecutter.use_jet_admin == 'y' %}
    url(
        regex=r'^jet/',
        view=include('jet.urls', 'jet')
    ),
    url(
        regex=r'^jet/dashboard/',
        view=include('jet.dashboard.urls', 'jet-dashboard')
    ),
    {% endif %}
    url(
        regex=r'^admin/',
        view=admin.site.urls
    ),
]
예제 #28
0
파일: urls.py 프로젝트: petkostas/Todo-List
"""todolist 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 core.views import IndexView

urlpatterns = [
    # url(r'^admin/', include(admin.site.urls)),
    url(r'^rest/', include('todolist.rest.urls', namespace='rest')),
    url(r'^$', IndexView.as_view(), name="home")
]
예제 #29
0
from django.conf.urls import patterns, url

from core import views
from core.models import Event
from core.views import IndexView


event_detail_info = {
    "queryset": Event.objects.all(),
}

urlpatterns = patterns('',
        url(r'^(index/$|$)', views.index, name='index'),
      #  url(r'^event/$', EventListView.as_view()),
        url(r'^event/$', IndexView.as_view(), ),
        url(r'^login/$', views.user_login, name='login'),
        url(r'^restricted/$', views.restricted, name='restricted'),
        url(r'^logout/$', views.user_logout, name='logout'),
        url(r'^borrow/$', views.borrow, name='borrow'),
        url(r'^borrow/(?P<book_name>)$', views.borrow, name='borrow'),
        url(r'^return/$', views.returnbook, name='return'),
        url(r'^order/$', views.order, name='order'),
        url(r'^recommend/$', views.recommend, name='recommend'),
 
        url(r'^news/$', views.getNewsDetail, name='news_detail'),
        url(r'^borrow_history/$', views.getBorrowHistory, name='borrow_history'),
        url(r'^graph/$', views.showDataGraph, name='graph'),
 
 
        )
예제 #30
0
from core import core
from core.views import IndexView,MeetView,ContactView,TestView,AboutView,NewView,BlockView,LayoutView


routes = [
    ((core,),
        ('',IndexView.as_view('index')),
        ('about',AboutView.as_view('about')),
        ('meet',MeetView.as_view('meet')),
        ('contact',ContactView.as_view('contact')),
        ('test',TestView.as_view('test')),
        ('new',NewView.as_view('new')),
        ('blockview/<int:alt_layout>',BlockView.as_view('blockview')),
        ('show_layout/<layout>',LayoutView.as_view('show_layout')),
        ('show_layout/<layout>/<navbar>',LayoutView.as_view('show_nav_layout')),
    )
]
예제 #31
0
파일: urls.py 프로젝트: fgaion/fusion
from django.urls import path
from core.views import IndexView     #,TesteView

urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    # path('teste/', TesteView.as_view(), name='teste'),
]

예제 #32
0
from django.conf.urls import url
from django.contrib import admin

from core.views import IndexView

urlpatterns = [
    url(
        regex=r'^$',
        view=IndexView.as_view(),
        name='index'
    ),
    url(
        regex=r'^admin/',
        view=admin.site.urls
    ),
]
"""deployeveryday URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.10/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. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from core.views import IndexView

urlpatterns = [
    url(r'^$', IndexView.as_view()),
    url(r'^admin/', admin.site.urls),
]
예제 #34
0
from django.conf.urls import url

from core.views import IndexView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='home'),
]
예제 #35
0
# coding=utf-8

from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.auth.views import login, logout

from core.views import IndexView, contact

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^contato/$', contact, name='contact'),
    url(r'^entrar/$', login, {'template_name': 'login.html'}, name='login'),
    url(r'^sair/$', logout, {'next_page': 'index'}, name='logout'),
    url(r'^contas/', include('accounts.urls', namespace='accounts')),
    url(r'^catalogo/', include('catalog.urls', namespace='catalog')),
    url(r'^admin/', admin.site.urls),
]
예제 #36
0
from django.contrib.auth.views import LoginView, LogoutView
from django.urls import include, path

from core.api_views import AccessAPIView, SummaryAPIView, UploadAPIView
from core.views import IndexView, PasswordView, SummaryView, UploadView

api_patterns = [
    # path('api-auth/', include('rest_framework.urls')),
    path("upload/", UploadAPIView.as_view(), name="api-upload"),
    path("access/<uuid:pk>/", AccessAPIView.as_view(), name="api-access"),
    path("summary/", SummaryAPIView.as_view(), name="api-summary"),
]

urlpatterns = [
    path("", IndexView.as_view(), name="index"),
    path("upload/", UploadView.as_view(), name="upload-form"),
    path("access/<uuid:pk>/", PasswordView.as_view(), name="upload-access"),
    path("summary/", SummaryView.as_view(), name="upload-summary"),
    # Use built-in auth for handling logins and logouts.
    path("login/", LoginView.as_view(template_name="core/login.html"), name="login"),
    path(
        "logout/", LogoutView.as_view(template_name="core/logout.html"), name="logout"
    ),
    # Nest all API-related patterns under /api
    path("api/", include(api_patterns)),
]
예제 #37
0
 def test_index_url_resolves_index_view(self):
     view = resolve('/')
     assert view.func.__name__ == IndexView.as_view().__name__
예제 #38
0
    url(r'^essay/delete/(?P<pk>\d+)$', EssayDeleteView.as_view(), name='delete_essay'),
    url(r'^essay/grade/(?P<pk>\d+)$', EssayResponseUpdateView.as_view(), name='grade_essay'),
    url(r'^overdub/(?P<pk>\d+)$', OverdubDetailView.as_view(), name='overdub'),
    url(r'^overdub/add/(?P<pk>\d+)$', OverdubCreateView.as_view(), name='create_overdub'),
    url(r'^overdub/edit/(?P<pk>\d+)$', OverdubUpdateView.as_view(), name='edit_overdub'),
    url(r'^overdub/delete/(?P<pk>\d+)$', OverdubDeleteView.as_view(), name='delete_overdub'),
    url(r'^searchcourse/$', CourseListView.as_view(), name='course_list'),
    url(r'^post/save/$',PostSaveView.as_view(), name='save_post'),
    url(r'^post/delete/$', PostDeleteView.as_view(), name='delete_post'),
    url(r'^upload/$', fileUpload, name='file_upload'),
    url(r'^subscribe/(\w+)/$', subscribeCourse, name='subscribe_course'),
    url(r'^perm/change/$', changePerm, name='change_perm'),
    url(r'^activity/copy/$', copyActivity, name='copy_activity'),
    url(r'^lesson/title/edit/$', editLessonTitle, name='edit_lesson_title'),
    url(r'^essaydraft/edit/$', editEssayDraft, name='edit_essay_draft'),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^socket\.io', include(socketio.sdjango.urls)),

    # url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'),
    # url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout'),

    url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
    url(r'^accounts/logout/$', uhcaslogout, name='logout'),

    url(r'^crossdomain.xml$','flashpolicies.views.simple',{'domains': ['*']}),
    url(r'^home/$', HomeView.as_view(), name='home'),
    url(r'^$', IndexView.as_view(), name='landing'),

)+ static(base.MEDIA_URL, document_root=base.MEDIA_ROOT)
예제 #39
0
파일: urls.py 프로젝트: adamslapins/velo.lv
    ))
    register_dynamic_trees((
        compose_dynamic_tree('manager', target_tree_alias='mainmenu_lv', parent_tree_item_alias='manager'),
    ))
except ProgrammingError:
    print 'Seems that migrations should be run.'



js_info_dict = {
    # Not yet used
}

urlpatterns = i18n_patterns('',
    #url(r'^$', RedirectView.as_view(url='/lv/sacensibas/42/rezultati/'), name='index'),
    url(r'^$', IndexView.as_view(), name='index'),

    url(_(r'^application/$'), ApplicationCreate.as_view(), name='application'),
    url(_(r'^application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/$'), ApplicationUpdate.as_view(), name='application'),
    url(_(r'^application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/pay/$'), ApplicationPayView.as_view(), name='application_pay'),
    url(_(r'^application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/ok/$'), ApplicationOKView.as_view(), name='application_ok'),



    url(_(r'^company_application/$'), MyCompanyApplicationList.as_view(), name='companyapplication_list'),
    url(_(r'^company_application/add/$'), CompanyApplicationCreate.as_view(), name='companyapplication'),
    url(_(r'^company_application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/$'), CompanyApplicationDetail.as_view(), name='companyapplication'),
    url(_(r'^company_application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/add/$'), CompanyApplicationParticipantAdd.as_view(), name='companyapplication_add'),
    url(_(r'^company_application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/ok/$'), CompanyApplicationParticipantAddOK.as_view(), name='companyapplication_ok'),
    url(_(r'^company_application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/edit/$'), CompanyApplicationUpdate.as_view(), name='companyapplication_edit'),
예제 #40
0
    url(r'^access-forbidden/$', AccessForbiddenView.as_view(), name='access_forbidden'),

# Email handling
    url(r'^ggv/(?P<crs_slug>[-\w]+)/email-question/worksheet/(?P<i>\d+)/(?P<j>\d+)/$', SendEmailWorksheetQuestionToInstructorsView.as_view(), name='email_instructor_question'),
    url(r'^ggv/(?P<crs_slug>[-\w]+)/email-error/worksheet/(?P<i>\d+)/(?P<j>\d+)/$', SendEmailWorksheetErrorToStaffView.as_view(), name='email_staff_ws_error'),
    url(r'^ggv/(?P<crs_slug>[-\w]+)/email-instructor/$', SendEmailToInstructor.as_view(), name='email_instructor'),

    url(r'^ggv/(?P<crs_slug>[-\w]+)/email-manager/deactivate$', SendEmailToManagerDeactivationRequest.as_view(), name='email_manager_deactivate'),
    url(r'^ggv/(?P<crs_slug>[-\w]+)/email-manager/activate$', SendEmailToManagerActivationRequest.as_view(), name='email_manager_activate'), 

    url(r'^ggv/(?P<crs_slug>[-\w]+)/email-manager/new-account$', SendEmailToManagerCreateAccountRequest.as_view(), name='email_manager_request_account'),

# Administration pages

    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^ggvadmin/filebrowser/', include(site.urls)),
    url(r'^grappelli/', include('grappelli.urls')),  # grappelli URLS
    url(r'^ggvadmin',  admin.site.urls, name='staff_admin'),  # admin site


    url(r'^faq/$', FaqView.as_view(), name='faq'),
    url(r'^home/$', HomeView.as_view(), name='ggvhome'),
    url(r'^', IndexView.as_view(), name='splash'),
 
] 

# if settings.DEBUG:
#     urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
#     urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
예제 #41
0
"""SailStreamUI URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from core.views import IndexView
from core.apis import StartView, StopView

urlpatterns = [
    path('captcha/', include('captcha.urls')),
    path('admin/', admin.site.urls),
    path('', IndexView.as_view()),
    path('api/cameras/<str:name>/start', StartView.as_view()),
    path('api/cameras/<str:name>/stop', StopView.as_view()),
]
예제 #42
0
파일: urls.py 프로젝트: marucc/jcrc.info
# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from core.views import IndexView

urlpatterns = patterns("core.views", url(r"^$", IndexView.as_view(), name="index"))