コード例 #1
0
ファイル: urls.py プロジェクト: Apparati/clockwork.pw
from django.conf.urls import patterns, url

from views import HomePageView, AboutUsView, BlogView

urlpatterns = patterns(
    '',
    url(r'^$', HomePageView.as_view(), name="home"),
    url(r'^about-us/$', AboutUsView.as_view(), name="about_us"),
    url(r'blog/$', BlogView.as_view(), name="blog"),
)
コード例 #2
0
ファイル: urls.py プロジェクト: jonsimington/clockwork.pw
from django.conf.urls import patterns, url

from views import HomePageView, AboutUsView, BlogView, MediaView

urlpatterns = patterns(
    '',
    url(r'^$', HomePageView.as_view(), name="home"),

    url(r'^about-us/$', AboutUsView.as_view(), name="about_us"),

    url(r'^blog/$', BlogView.as_view(), name="blog"),

    url(r'^media/$', MediaView.as_view(), name="media"),
)
コード例 #3
0
from django.conf.urls import url
from django.contrib.auth.decorators import login_required

from views import BlogListView, BlogView, PostDetail, CreateBlog
from views import UpdateBlog, CreatePost, UpdatePost, PostLikeAjaxView
from views import PostLikeCount, CommentsPostView

urlpatterns = [
    url(r'^$', BlogListView.as_view(), name='blog_list'),
    url(r'^(?P<pk>\d+)/$', BlogView.as_view(), name='blog'),
    url(r'^add_blog$', login_required(CreateBlog.as_view()), name='add_blog'),
    url(r'^edit_blog/(?P<pk>\d+)',
        login_required(UpdateBlog.as_view()),
        name='edit_blog'),
    url(r'^add_post', login_required(CreatePost.as_view()), name='add_post'),
    url(r'^edit_post/(?P<pk>\d+)',
        login_required(UpdatePost.as_view()),
        name='edit_post'),
    url(r'post/(?P<pk>\d+)/comments$',
        CommentsPostView.as_view(),
        name='post_comments'),
    url(r'post/(?P<pk>\d+)/likes$',
        PostLikeAjaxView.as_view(),
        name='post_ajax_like'),
    url(r'post/(?P<pk>\d+)$', PostDetail.as_view(), name='post'),
    url(r'post/likes$', PostLikeCount.as_view(), name='likecount'),
]
コード例 #4
0
from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_exempt
from views import BlogList, BlogView, PostView, CreateBlog, UpdateBlog, CreatePost, CreateCategory, UpdatePost, \
    CategoryView, CreatePostInBlog, PostCommentsView, PostLikeCountView, likes_add

urlpatterns = [
    url(r'^$', BlogList.as_view(), name="blog_list"),
    url(r'^(?P<pk>\d+)/$', BlogView.as_view(), name="blog"),
    url(r'^new/$', login_required(CreateBlog.as_view()), name="create_blog"),
    url(r'^(?P<pk>\d+)/edit/$',
        login_required(UpdateBlog.as_view()),
        name="edit_blog"),
    url(r'^(?P<pk>\d+)/new/$',
        login_required(CreatePostInBlog.as_view()),
        name="create_post_in_blog"),
    url(r'^post/(?P<pk>\d+)/$', PostView.as_view(), name="post"),
    url(r'^post/(?P<pk>\d+)/comments/$',
        PostCommentsView.as_view(),
        name="post_comments"),
    url(r'^post/new/$',
        login_required(CreatePost.as_view()),
        name="create_post"),
    url(r'^post/(?P<pk>\d+)/edit/$',
        login_required(UpdatePost.as_view()),
        name="edit_post"),
    url(r'^post/(?P<pk>\d+)/likes/$',
        csrf_exempt(PostLikeCountView.as_view()),
        name="post_likes"),
    url(r'^post/(?P<pk>\d+)/likes/add/$', likes_add, name="post_new_like"),
    url(r'^category/(?P<pk>\d+)/$', CategoryView.as_view(), name="category"),
コード例 #5
0
ファイル: urls.py プロジェクト: Atlantic777/atlantic-blog
from django.conf.urls import patterns, include, url
from views import BlogView, PostView, ArchiveView
from atlantic777.views import menu
from blog import views

urlpatterns = patterns('', 
		url(r'^$', BlogView.as_view()),
		url(r'(?P<pk>\d+)', PostView.as_view()),
		url(r'archive', ArchiveView.as_view()),
		url(r'new', views.new_post),
		)
コード例 #6
0
ファイル: urls.py プロジェクト: crazyface/codeone-test
from django.conf.urls.defaults import patterns, include, url
from views import BlogView, PostView


urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'codeon.views.home', name='home'),
     url(r'^$', BlogView.as_view(), name='blog'),
     url(r'^(?P<pk>\d+)/$', PostView.as_view(), name='post_view'),
)