示例#1
0
"""music_2 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 search.views import Index, Search, Good_luck

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', Index.as_view(), name='index'),
    path('search/', Search.as_view(), name='search'),
    path('goodluck/', Good_luck.as_view(), name='goodluck'),
]
示例#2
0
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 *
from django.conf.urls import patterns,include, url
from django.contrib import admin
from search.views import Index

admin.autodiscover()

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^index/',Index.as_view()),
    url(r'^tinymce/',include('tinymce.urls')),
    url(r'^search/$','search.views.search'),
    url(r'^weblog/$','coltrane.views.entries_index'),
    url(r'^weblog/(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$','coltrane.views.entry_details'),
    url(r'', include('django.contrib.flatpages.urls')),
]
	
	
	
示例#3
0
from django.conf.urls import patterns
from django.conf.urls import url
from django.conf.urls import include
from django.contrib.auth.decorators import login_required

from search.views import Index
from search.views import Proxy
from search.views import FindGroups
from search.views import FindPosts

# Create your views here.
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', Index.as_view(), name='index'),
    url(r'^findPosts/$', login_required(FindPosts.as_view()), name='find_posts'),
    url(r'^findGroups/$', login_required(FindGroups.as_view()), name='find_groups'),
    url(r'^proxy/$', login_required(Proxy.as_view()), name='proxy'),
    url(r'^account/', include('account.urls')),
    url(r'^control-center/', include(admin.site.urls)),
)
示例#4
0
"""cloud_SRI_python URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/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 search.views import Index, Detail

urlpatterns = [
    url('', include('pwa.urls')),
    url(r'^admin/', admin.site.urls),
    url(r'^$', Index.as_view(), name='index'),
    url(r'^(?P<docum>.+)/$', Detail.as_view(), name='detail'),
]