예제 #1
0
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
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
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
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'),
)