예제 #1
0
파일: urls.py 프로젝트: ajaycode/django1
__author__ = "Ajay"
from django.conf.urls import url, patterns, include
from . import views
from blog.views import Index, PeopleList
from django.contrib import admin

admin.autodiscover()

urlpatterns = [
    # url(r'^$', views.post_list, name='post_list'),
    url(r"^hello$", views.hello, name="post_list"),
    url(r"^$", Index.as_view()),
    url(r"^people$", PeopleList.as_view()),
    url(r"^people_list$", views.people_list),
    url(r"^admin/", include(admin.site.urls)),
    url(r"^person/new/$", views.person_new, name="person_new"),
    url(r"^person/edit/(?P<pk>[0-9]+)/$", views.person_edit, name="person_edit"),
    url(r"^person/(?P<pk>[0-9]+)/$", views.person_detail, name="person_detail"),
    url(r"^person/(?P<pk>[0-9]+)/spouse/", views.spouse_view, name="spouse_view"),
]

# To Do from here
"""
url (r'^person/parents/add/(?P<pk>[0-9]+)/$', views.person_add_parents, name='person_add_parents'),
url (r'^person/parents/edit/(?P<pk>[0-9]+)/$', views.person_edit_parents, name='person_edit_parents'),
url (r'^person/parents/remove/(?P<pk>[0-9]+)/$', views.person_remove_parents, name='person_remove_parents'),
url (r'^person/parents/view/(?P<pk>[0-9]+)/$', views.person_view_parents, name='person_view_parents'),
url (r'^person/(?P<pk>[0-9]+)/children/', views.person_view_children, name='person_view_children'),
"""
예제 #2
0
from django.contrib import admin
from django.urls import path, re_path, include
from django.conf.urls.static import static
from django.conf import settings
from django.views import static

from blog.views import Index, Friends, Detail, Archive, CategoryList, CategoryView, TagList, TagView, About

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', Index.as_view(), name='index'),
    path('friends/', Friends.as_view(), name='friends'),
    path('mdeditor/', include('mdeditor.urls')),
    path("article/", Archive.as_view(), name='archive'),
    path('article/<int:pk>', Detail.as_view(), name='detail'),
    path('category/', CategoryList.as_view(), name='category'),
    path('category/<int:pk>', CategoryView.as_view(), name='article_category'),
    path('tag/', TagList.as_view(), name='tag'),
    path('tag/<int:pk>', TagView.as_view(), name='article_tag'),
    path('about/', About.as_view(), name='about'),
    re_path(r'^static/(?P<path>.*)$',
            static.serve, {'document_root': settings.STATIC_ROOT},
            name='static')
]

admin.site.site_header = 'Mi Primer Blog'
admin.site.site_title = 'Django Blog app'

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
예제 #3
0
from django.urls import path
from blog.views import Home, Detail, Update, Delete, Create, Index
# , Create, )

app_name = 'blog'
urlpatterns = [
    path('create/', Create.as_view(), name='create'),
    path('blog/', Index.as_view(), name='all'),
    path('', Home.as_view(), name='home'),
    path('<str:pk>', Detail.as_view(), name='detail'),
    path('<str:pk>/edit/', Update.as_view(), name='edit'),
    path('<str:pk>/delete/', Delete.as_view(), name='delete')
]
예제 #4
0
from django.contrib import admin
from django.urls import path, include
from django.contrib.auth.decorators import login_required
from django.views.generic import ListView
from blog.models import Post
from registration import views
from blog.views import Index

admin.site.site_title = "ぼっち救出コミュニティ 内部管理サイト"
admin.site.site_header = "ぼっち救出コミュニティ 内部管理サイト"
admin.site.index_title = "メニュー"

index_view = Index.as_view(template_name="blog/post_list.html", model=Post)

urlpatterns = [
    path("admin/", admin.site.urls),
    path("", login_required(index_view), name="login"),
    path("blog/", include("blog.urls")), #blog/と書かれたurlだったら、blogアプリのurls.pyに処理を移行させる
    path('', include("django.contrib.auth.urls")), #post_list.htmlのurl 'logout'など、デフォルトの移行先処理を使うために必要
    path("signup/", views.SignUpView.as_view(), name="signup"),
    path("send_completely/", views.SendCompletelyView.as_view(), name="send_completely"),
    path("activate/<uidb64>/<token>/", views.ActivateView.as_view(),name="activate"),
]
예제 #5
0
파일: urls.py 프로젝트: Janteby1/bloggy_v2
"""project 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 blog.views import (
    Index        
)

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'blog/', include('blog.urls', namespace='blog')),
    url(r'users/', include('users.urls', namespace='users')),
    url(r'^$', Index.as_view(), name='index'),
]
예제 #6
0
"""PFTL URL Configuration

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

from blog.views import Index

urlpatterns = [
    path('', Index.as_view(), name='home'),
    path('admin/', admin.site.urls),
]
예제 #7
0
파일: urls.py 프로젝트: fcrios145/blag_plax
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from blog.views import Index, Prueba, Resume
import blog.urls

urlpatterns = [
    # Examples:
    url(r'^$', Index.as_view(), name='home'),
    url(r'^prueba/', Prueba.as_view(), name='prueba'),
    url(r'^resume/', Resume.as_view(), name='resume'),
    url(r'^blog/', include(blog.urls)),

    url(r'^admin/', include(admin.site.urls)),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
예제 #8
0
from django.conf.urls import url

from blog.views import Index, Detail, About, Acticle, Comment, MoodList, Login, Reg, Quit

urlpatterns = [
    url(r'^$', Index.as_view(), name='主页'),
    url(r'^detail/(\d+)/$', Detail.as_view(), name='文章详情'),
    url(r'^about', About.as_view(), name='关于'),
    url(r'^acticle', Acticle.as_view(), name='成长'),
    url(r'^comment', Comment.as_view(), name='留言'),
    url(r'^moodList', MoodList.as_view(), name='说说'),
    url(r'^login', Login.as_view(), name='登录'),
    url(r'^reg', Reg.as_view(), name='注册'),
    url(r'^quit', Quit.as_view(), name='注销'),
]
예제 #9
0
    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 blog.views import Index, ArticleCreate, ArticleDetail, Login, Logout, ArticleCenter, ArticleDelete, ArticleModify, Register, Search

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r"^$", Index.as_view(), name="index"),
    url(r"^detail/(?P<article_id>\d+)/$",
        ArticleDetail.as_view(),
        name="detail"),
    url(r"^create/$", ArticleCreate.as_view(), name="create_article"),
    url(r"^login/$", Login.as_view(), name="login"),
    url(r"^logout/$", Logout.as_view(), name="logout"),
    url(r"^register/$", Register.as_view(), name="register"),
    url(r"^article_center/(?P<author_id>\d+)/$",
        ArticleCenter.as_view(),
        name="article_center"),
    url(r"^article_delete/$", ArticleDelete.as_view(), name="article_delete"),
    url(r"^article_modify/(?P<article_id>\d+)/$",
        ArticleModify.as_view(),
        name="article_modify"),
    url(r"^search/$", Search.as_view(), name="search")
예제 #10
0
파일: urls.py 프로젝트: zoomstereo/blog
"""main 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
from django.contrib import admin

from blog.views import Index

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', Index.as_view()),
]
예제 #11
0
from django.contrib import admin
from django.urls import path
from blog.views import Index

urlpatterns = [path('admin/', admin.site.urls), path('', Index.as_view())]
예제 #12
0
파일: urls.py 프로젝트: mbryantms/architect
# URLconf
from django.urls import path
from blog.views import Index

from . import views

urlpatterns = [
    path('', Index.as_view()),
]