示例#1
0
    AboutView,
    ContactView,
    ResourceListByCategoryView,
    ResourceListAddedByUserView,
    ResourceCreateView,
    ResourceUpdateView,
    ResourceDeleteView,
)

urlpatterns = [
    path('', HomeView.as_view(), name='home_view'),
    path('category/<str:category_slug>/',
         ResourceListByCategoryView.as_view(),
         name='resource_list_view'),
    path('about/', AboutView.as_view(), name='about_view'),
    path('contact/', ContactView.as_view(), name='contact_view'),

    # URls for only authenticated users
    path('resource/list/',
         login_required(ResourceListAddedByUserView.as_view()),
         name='resource_list_by_me_view'),
    path('resource/create/',
         login_required(ResourceCreateView.as_view()),
         name='resource_create_view'),
    path('resource/update/<int:pk>/',
         login_required(ResourceUpdateView.as_view()),
         name='resource_update_view'),
    path('resource/delete/<int:pk>/',
         login_required(ResourceDeleteView.as_view()),
         name='resource_delete_view'),
]
示例#2
0
文件: urls.py 项目: walison17/timtec
    url(r'^accept_terms/$', AcceptTermsView.as_view(), name='accept_terms'),
    url(r'^course/(?P<slug>[-a-zA-Z0-9_]+)/intro/$',
        CourseView.as_view(),
        name='course_intro'),
    url(r'^course/(?P<slug>[-a-zA-Z0-9_]+)/enroll/$',
        EnrollCourseView.as_view(),
        name='enroll_course'),
    url(r'^course/(?P<slug>[-a-zA-Z0-9_]+)/resume/$',
        ResumeCourseView.as_view(),
        name='resume_course'),
    url(r'^course/(?P<course_slug>[-a-zA-Z0-9_]+)/lesson/(?P<slug>[-a-zA-Z0-9_]+)/$',
        LessonDetailView.as_view(),
        name='lesson'),
    url(r'^html5/', TemplateView.as_view(template_name="html5.html")),
    url(r'^empty/', TemplateView.as_view(template_name="empty.html")),
    url(r'^contact/?$', ContactView.as_view(), name="contact"),

    # Classes
    url(r'^course/(?P<course_slug>[-a-zA-Z0-9_]+)/classes/$',
        ClassListView.as_view(),
        name='classes'),
    url(r'^class/create/$', ClassCreateView.as_view(), name='class-create'),
    url(r'^class/(?P<pk>[0-9]+)/$', ClassUpdateView.as_view(), name='class'),
    url(r'^class/(?P<pk>[0-9]+)/delete/$',
        ClassDeleteView.as_view(),
        name='class-delete'),
    url(r'^class/(?P<pk>[0-9]+)/remove_user/$',
        ClassRemoveUserView.as_view(),
        name='class-remove-user'),
    url(r'^class/(?P<pk>[0-9]+)/evaluations/$',
        ClassEvaluationsView.as_view(),
示例#3
0
    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
from django.conf.urls import url, include
from core.views import TestView
from core.views import ScholarshipView
from core.views import PhoneNumberView
from core.views import ContactView
from core.views import EventView
from core.views import NewsFeedView
from core.views import PositionView
from core.views import GeoJSONFeatureView
from core.views import GeometryObjectView

urlpatterns = [
    url(r'^api-auth/', include('rest_framework.urls')),
    url(r'^_nested_admin/', include('nested_admin.urls')),
    path('admin/', admin.site.urls),
    path('testview/', TestView.as_view()),
    path('contact/', ContactView.as_view()),
    path('scholarship/', ScholarshipView.as_view()),
    path('phone/', PhoneNumberView.as_view()),
    path('events/', EventView.as_view()),
    path('newsfeed/', NewsFeedView.as_view()),
    path('position/', PositionView.as_view()),
    path('feature/', GeoJSONFeatureView.as_view()),
    path('geometryobject/', GeometryObjectView.as_view())
]
示例#4
0
from core.views import AccueilView, ContactView
from django.urls import path


app_name = 'core'

urlpatterns = [
    path('', AccueilView.as_view(), name='home'),
    path('message/submit', ContactView.as_view(), name='message')
]

示例#5
0
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')),
)]
示例#6
0
from haystack.forms import FacetedSearchForm
from haystack.generic_views import FacetedSearchView

# import debug_toolbar

from core.views import HomeView, AboutView, ContactView, UserView
from innovosite.views import InnovositeView, InnovositeListView
from innovosite.views import SubOrganizationView, SubOrganizationListView, BuildingView
from asset.views import AssetView

urlpatterns = [
	url(r'^$', HomeView.as_view(), name='home'),
    # url(r'^search/', include('haystack.urls')),
    url(r'^search/', FacetedSearchView.as_view(form_class=FacetedSearchForm, facet_fields=['room', 'contact_1_name', 'manufacturer' ]), name='haystack_search'),
	url(r'^about/$', AboutView.as_view(), name='about'),
	url(r'^contact/$', ContactView.as_view(), name='contact'),
    
    url(r'^innovo-sites/$', InnovositeListView.as_view(), name='innovosite_list'),
    url(r'^innovo/(?P<pk>[0-9]+)/$', InnovositeView.as_view(), name='innovosite'),
    
    url(r'^units/$', SubOrganizationListView.as_view(), name='unit_list'),
    url(r'^unit/(?P<pk>[0-9]+)/$', SubOrganizationView.as_view(), name='unit'),
    
    url(r'^building/(?P<pk>[0-9]+)/$', BuildingView.as_view(), name='building'),
    url(r'^asset/(?P<pk>[0-9]+)/$', AssetView.as_view(), name='asset'),
    
    url(r'^user/(?P<pk>[0-9]+)/$', UserView.as_view(), name='user_view'),
    
    url(r'^admin/', admin.site.urls),

    # url(r'^__debug__/', include(debug_toolbar.urls)),
示例#7
0
文件: urls.py 项目: mvictoras/timtec
    url(r'^django/admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^django/admin/', include(django_admin.site.urls)),

    # Privileged browsing
    url(r'^admin/', include('administration.urls')),

    # Public browsing
    url(r'^my-courses/$', UserCoursesView.as_view(), name='user_courses'),
    url(r'^accept_terms/$', AcceptTermsView.as_view(), name='accept_terms'),
    url(r'^course/(?P<slug>[-a-zA-Z0-9_]+)/intro/$', CourseView.as_view(), name='course_intro'),
    url(r'^course/(?P<slug>[-a-zA-Z0-9_]+)/enroll/$', EnrollCourseView.as_view(), name='enroll_course'),
    url(r'^course/(?P<slug>[-a-zA-Z0-9_]+)/resume/$', ResumeCourseView.as_view(), name='resume_course'),
    url(r'^course/(?P<course_slug>[-a-zA-Z0-9_]+)/lesson/(?P<slug>[-a-zA-Z0-9_]+)/$', LessonDetailView.as_view(), name='lesson'),
    url(r'^html5/', TemplateView.as_view(template_name="html5.html")),
    url(r'^empty/', TemplateView.as_view(template_name="empty.html")),
    url(r'^contact/?$', ContactView.as_view(), name="contact"),

    # Classes
    url(r'^course/(?P<course_slug>[-a-zA-Z0-9_]+)/classes/$', ClassListView.as_view(), name='classes'),
    url(r'^class/create/$', ClassCreateView.as_view(), name='class-create'),
    url(r'^class/(?P<pk>[0-9]+)/$', ClassUpdateView.as_view(), name='class'),
    url(r'^class/(?P<pk>[0-9]+)/delete/$', ClassDeleteView.as_view(), name='class-delete'),
    url(r'^class/(?P<pk>[0-9]+)/remove_user/$', ClassRemoveUserView.as_view(), name='class-remove-user'),
    url(r'^class/(?P<pk>[0-9]+)/add_users/$', ClassAddUsersView.as_view(), name='class-add-users'),


    # Services
    url(r'^api/', include(router.urls)),
    # Forum
    url(r'^forum/(?P<course_slug>[-a-zA-Z0-9_]+)/$', CourseForumView.as_view(), name='forum'),
    url(r'^forum/question/(?P<slug>[-a-zA-Z0-9_]+)/$', QuestionView.as_view(), name='forum_question'),
示例#8
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')),
    )
]
示例#9
0
from core.views import HomeView, AboutView, ContactView, UserView
from innovosite.views import InnovositeView, InnovositeListView
from innovosite.views import SubOrganizationView, SubOrganizationListView, BuildingView
from asset.views import AssetView

urlpatterns = [
    url(r'^$', HomeView.as_view(), name='home'),
    # url(r'^search/', include('haystack.urls')),
    url(r'^search/',
        FacetedSearchView.as_view(
            form_class=FacetedSearchForm,
            facet_fields=['room', 'contact_1_name', 'manufacturer']),
        name='haystack_search'),
    url(r'^about/$', AboutView.as_view(), name='about'),
    url(r'^contact/$', ContactView.as_view(), name='contact'),
    url(r'^innovo-sites/$',
        InnovositeListView.as_view(),
        name='innovosite_list'),
    url(r'^innovo/(?P<pk>[0-9]+)/$',
        InnovositeView.as_view(),
        name='innovosite'),
    url(r'^units/$', SubOrganizationListView.as_view(), name='unit_list'),
    url(r'^unit/(?P<pk>[0-9]+)/$', SubOrganizationView.as_view(), name='unit'),
    url(r'^building/(?P<pk>[0-9]+)/$', BuildingView.as_view(),
        name='building'),
    url(r'^asset/(?P<pk>[0-9]+)/$', AssetView.as_view(), name='asset'),
    url(r'^user/(?P<pk>[0-9]+)/$', UserView.as_view(), name='user_view'),
    url(r'^admin/', admin.site.urls),

    # url(r'^__debug__/', include(debug_toolbar.urls)),
示例#10
0
from django.conf.urls import url

from core.views import ContactView, ContactListView

__author__ = 'scotm'

urlpatterns = [
    url(r'^$', ContactListView.as_view(), name='contact_list'),
    url(r'^(?P<pk>[0-9]+)', ContactView.as_view(), name='contact_view'),
]
示例#11
0
from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
from products.views import MyProducts, ProductDetails

from core.views import ContactView

urlpatterns = patterns('',
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    # Examples:
    url(r'^admin/', include(admin.site.urls)),
    url(r'^myproducts$', MyProducts.as_view(), name='product_list'),
    url(r'^contact/$',
        ContactView.as_view(template_name='contact.html'),
        name='contact'),
    url(r'^(?P<slug>[\w-]+)/*$', ProductDetails.as_view(), name="product_detail"),
    url(r'^$', include('products.urls')),
    
    # url(r'^link2pay/', include('link2pay.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:
    
)

#Add Flatpages for static pages
# urlpatterns += patterns('django.contrib.flatpages.views',
示例#12
0
from django.contrib.auth import views as auth_views

# django rest framework
from rest_framework.authtoken import views

# local django
from core.views import HomePageView, ContactView, SignUpView, LogoutView
from core.api.urls import router

urlpatterns = [
    # /
    path('', HomePageView.as_view(), name='index'),

    # only POST
    # /send-email/
    path('send-email/', ContactView.as_view(), name='send_email'),

    # /login/
    path('login/', auth_views.LoginView.as_view(), name='login'),

    # /signup/
    path('signup/', SignUpView.as_view(), name='signup'),

    # /logout/
    path('logout/', LogoutView.as_view(), name='logout'),

    # /get-token/  POST body{email, password}
    path('get-token/', views.obtain_auth_token),

    # /api/ -> /api/signup/ POST
    path('api/', include(router.urls)),
from dajaxice.core import dajaxice_autodiscover, dajaxice_config
dajaxice_autodiscover()


urlpatterns = patterns('',
    url(r'^ajax_select/', include(ajax_select_urls)),
    url(r'^admin/', include(admin.site.urls)),

    #Rich textarea editor
    (r'^ckeditor/', include('ckeditor_uploader.urls')),

    #About page
    url(r'^blog/about$', 'core.views.about', name='about'),

    #Contact page
    url(r'^blog/contact$', ContactView.as_view(), name='contact'),

    #Posts page (home)
    url(r'^$', PostListView.as_view(), name='post-list'),
    url(r'^blog/(?P<pk>[0-9]+)/$', 'core.views.view_post', name='post-detail'),
    url(r'^blog/category/$', ListView.as_view(model=Category), name='category-list'),
    url(r'^blog/category/(?P<slug>[\w -.?]+)/*$', DetailView.as_view(model=Category, slug_field='name', context_object_name='category'), name='category-detail'),

    url(r'^accounts/profile/(?P<slug>[\w-]+)/$', DetailView.as_view(model=UserProfile, slug_field='user__username', context_object_name='profile'), name='profile-detail'),

    url(r'^blog/tag/(?P<slug>[\w -.?]+)/$', DetailView.as_view(model=Tag, slug_field='name', context_object_name='tag'), name='tag-detail'),
    url(r'^blog/tag/$', ListView.as_view(model=Tag), name='tag-list'),

    #Configure Dajaxice urls
    url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
示例#14
0
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.contrib import admin
from django.contrib.sitemaps.views import sitemap
from django.urls import include, path, re_path

from core.views import (HomeView, AboutUsView, TeamView, ServicesView,
                        ContactView)
from core.sitemaps import HomeViewSitemap, StaticViewSitemap
from seminars.sitemaps import SeminarViewSitemap, SeminarTypeViewSitemap

sitemaps = {
    'home': HomeViewSitemap,
    'static': StaticViewSitemap,
    'seminar_type': SeminarTypeViewSitemap,
    'seminar': SeminarViewSitemap,
}

urlpatterns = [
    re_path(r'^$', HomeView.as_view(), name='home'),
    path('sitemap.xml',
         sitemap, {'sitemaps': sitemaps},
         name='django.contrib.sitemaps.views.sitemap'),
    path('sobre-nos/', AboutUsView.as_view(), name='aboutus'),
    path('time/', TeamView.as_view(), name='team'),
    path('servicos/', ServicesView.as_view(), name='services'),
    path('cursos/', include(('seminars.urls', 'seminars'))),
    path('contato/', ContactView.as_view(), name='contact'),
    path('admin/', admin.site.urls),
]
示例#15
0
from django.contrib import admin
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from core.views import ProjectView, ContactView

urlpatterns = [
    path("admin/", admin.site.urls),
    path("api/project-list/", ProjectView.as_view(), name="project-list"),
    path("api/contact/", ContactView.as_view(), name="contact"),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
示例#16
0
文件: urls.py 项目: zionist/ensc
from django.conf.urls import patterns, include, url
from core.views import PageDetailView, ContactView

urlpatterns = patterns('',
    url(r'^pages/(?P<slug>\D+)$',  PageDetailView.as_view()),
    url(r'^contact$',  ContactView.as_view()),
)