示例#1
0
#coding:utf-8
from django.conf.urls import url

from comments.views import CommentView

__author__ = 'qiye'
__date__ = '2018/3/12 18:15'

app_name = 'comments'
urlpatterns = [
    url(r'^post/(?P<article_id>\d+)/$', CommentView.as_view(),name='comment_post'),



]
示例#2
0
文件: urls.py 项目: m6ttl/ew_git
__author__ = 'рвн╛©ф╪╪'

from django.conf.urls import url, include
from comments.views import CommentView

urlpatterns = [
    url(r'^comment/(?P<article_id>\d+)$',
        CommentView.as_view(),
        name='comment-view'),
]
示例#3
0
__author__ = 'liuhui'


from django.conf.urls import url, include
from comments.views import CommentView

urlpatterns = [
    url(r'^comment/(?P<article_id>\d+)$', CommentView.as_view(), name='comment-view'),
]
示例#4
0
from .views import BlogsList, BlogView, CreateBlog, UpdateBlog, CreatePost, UpdatePost, CreateCategory
from django.conf.urls import url, include
from comments.views import CommentView
from django.contrib.auth.decorators import login_required
from core.views import HomePageView
from views import PostView

urlpatterns = [
    url(r'^$', BlogsList.as_view(), name="allblogs"),
    url(r'^new/$', login_required(CreateBlog.as_view()), name="createblog"),
    url(r'^category/$', CreateCategory.as_view(), name="createcategory"),
    url(r'^posts/new$',
        login_required(CreatePost.as_view()),
        name="createpost"),
    url(r'^(?P<pk>\d+)/edit/$', UpdateBlog.as_view(), name="editblog"),
    url(r'^(?P<pk>\d+)/edit/post/$', UpdatePost.as_view(), name="editpost"),
    url(r'^(?P<pk>\d+)/$', BlogView.as_view(), name="oneblog"),
    url(r'^posts/(?P<pk>\d+)$', CommentView.as_view(), name="postview"),
    url(r'^/?sort=title&search=(?P<pk1>\d+)$',
        CommentView.as_view(),
        name="myblogs"),
    url(r'^$', CommentView.as_view(), name='createcomment'),
    #  url(r'^comments/(?P<pk>\d+)/comments$', BlogView.as_view(), name="allcomment"),
]
示例#5
0
from django.urls import path

from comments.views import CommentView

app_name = 'comments'
urlpatterns = [
    path('<int:pid>/', CommentView.as_view(), name='comment')
]
示例#6
0
文件: urls.py 项目: Xuan-Duc/tech2016
from notifications.views import ReadView
from A2A.views import IndexView

urlpatterns = [
    # User views
    url(r'^api/v1/account/avatar/(?P<username>.+)/$', AvatarView.as_view()),
    url(r'^api/v1/accounts/(?P<username>.+)/$', UserDetailView.as_view(),
        name='detail'),
    url(r'^api/v1/accounts/', UserListView.as_view(), name='list'),
    url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'),
    url(r'^api/v1/auth/logout/$', LogoutView.as_view(), name='logout'),

    # Comment views
    url(r'^api/v1/comments/(?P<id>.+)/$', CommentsForPostView.as_view(),
        name='list_comments'),
    url(r'^api/v1/comment/(?P<id>.+)/$', CommentView.as_view(),
        name='create_edit_comment'),

    # Vote views
    url(r'^api/v1/vote/$', VoteView.as_view(), name='vote'),

    # Follow views
    url(r'^api/v1/follow/$', FollowPostView.as_view(), name='follow_post'),

    # Admin
    url(r'^admin/', admin.site.urls),

    # Question views
    url(r'^api/v1/profile/(?P<username>.+)/$', ProfileView.as_view()),
    url(r'^api/v1/topic/question/$', TopicQuestionView.as_view()),
    url(r'^api/v1/topic/(?P<topic_id>.+)/$', TopicDetailView.as_view()),
示例#7
0
    url(r'^ranobe/(?P<pk>[0-9]+)/readstatus/$',
        BookStatusUpdateView.as_view()),
    url(r'^ranobe/(?P<pk>[0-9]+)/chapters/', ChapterPageView.as_view()),
    url(r'^ranobe/(?P<pk>[0-9]+)/history/$', ControlReadHistoryView.as_view()),
    url(r'^ranobe/(?P<pk>[0-9]+)/likes/$', UserLikesView.as_view()),
    url(r'^ranobe/chapters/read/(?P<chapter_id>[0-9]+)/$',
        DetailChapterPage.as_view()),
    path('user/register/', CreateUserView.as_view()),
    path('user/profile/', ProfileView.as_view()),
    path('user/profile/update', ProfileUpdateView.as_view()),
    path('user/profile/bookmark', BookmarkCheckView.as_view()),
    path('user/profile/statistic', ProfileStatisticView.as_view()),
    path('user/profile/comments', ProfileCommentsView.as_view()),
    path('user/profile/ranobes', ProfileRanobesView.as_view()),
    path('admin/', admin.site.urls),
    url(r'^ranobe/(?P<pk>[0-9]+)/comments/$', CommentView.as_view()),
    url(r'^ranobe/(?P<pk>[0-9]+)/comments/post/$',
        CommentCreateView.as_view()),
    url(r'^ranobe/(?P<pk>[0-9]+)/comments/(?P<comment_id>[0-9]+)/$',
        UpdateDestroyCommentView.as_view()),
    path('user/short/', ShortUserView.as_view()),
    path('tags/list/', TagsView.as_view()),
    path('genres/list/', GenresView.as_view()),
    path('authors/list/', AuthorsView.as_view()),
    path('publishers/list/', PublishersView.as_view()),
    path('blog/', BlogListView.as_view()),
    url(r'^blog/(?P<post_id>[0-9]+)/$', DetailBlogView.as_view()),
    url(r'^another/user/(?P<user_id>[0-9]+)/$', AnotherUserView.as_view()),
    url(r'^another/user/(?P<user_id>[0-9]+)/ranobes/$',
        AnotherUserMarkedRanobesView.as_view()),
]
示例#8
0
    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 django.views.generic import TemplateView
import xadmin
from django.views.static import serve
from django.conf.urls import include

from users.views import LoginView, RegisterView, LogoutView
from theme.views import ThemeView, IndexView, SpotView
from comments.views import CommentView
from .settings import MEDIA_ROOT

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    url(r'^$', IndexView.as_view(), name="index"),
    url(r'^login/$', LoginView.as_view(), name="login"),
    url(r'^logout/$', LogoutView.as_view(), name="logout"),
    url(r'^register/$', RegisterView.as_view(), name="register"),
    url(r'^theme/(?P<theme_id>\d+)/$', ThemeView.as_view(), name="theme"),
    url(r'^spot/(?P<spot_id>\d+)/$', SpotView.as_view(), name="spot"),
    url(r'^comment/$', CommentView.as_view(), name="comment"),
    url(r'^media/(?P<path>.*)$', serve, {'document_root': MEDIA_ROOT}),
    url(r'^ueditor/', include('DjangoUeditor.urls')),
]
示例#9
0
from authentication.views import RegisterView, LoginView, logout_view
from feed.views import feed_view, feed_by_rating_view
from userinfo.views import profile_view, settings_view, UserInfoView, status_view
from posts.views import choose_template_view, create_post_view, post_view, edit_post_view, ApiPostView, all_tags_view
from comments.views import CommentView, delete_comment
from search.views import search_view

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^login$', LoginView.as_view(), name='login'),
    url(r'^register$', RegisterView.as_view(), name='register'),
    url(r'^logout$', logout_view, name='logout'),
    url(r'^settings$', settings_view, name='settings'),
    url(r'^user_status$', status_view, name='status'),
    url(r'^userinfo$', UserInfoView.as_view(), name='userinfo'),
    url(r'^profile/(?P<username>.+)$', profile_view, name='detail'),
    url(r'^posts/create/choose_template$', choose_template_view, name='choose_template'),
    url(r'^posts/create/(?P<template_name>.+)$', create_post_view, name='create_post'),
    url(r'^posts/edit/(?P<id>.+)$', edit_post_view, name='edit_post'),
    url(r'^posts/(?P<id>.+)$', post_view, name='post'),
    url(r'tags$', all_tags_view, name='all_tags'),
    url(r'^api/posts/comments/(?P<post_id>.+)$', CommentView.as_view(), name='comments_by_post'),
    url(r'^api/comments/(?P<id>.+)$', delete_comment, name='delete_comment'),
    url(r'^api/posts/(?P<id>.+)$', ApiPostView.as_view(), name='post_api'),
    url('', include('social.apps.django_app.urls', namespace='social')),
    url(r'^ratings/', include('star_ratings.urls', namespace='ratings', app_name='ratings')),
    url(r'^search$', search_view, name='search'),
    url(r'^by_rating$', feed_by_rating_view, name='feed_by_rating'),
    url(r'^$', feed_view, name='feed'),
]
示例#10
0
from django.urls import path
from comments.views import CommentView

urlpatterns = [
    path('add', CommentView.as_view(), name="add-comment"),
    path('<int:pkComment>/update',
         CommentView.as_view(),
         name="update-comment"),
    path('<int:pkComment>/remove',
         CommentView.as_view(),
         name="remove-comment"),
    # path('<int:pkComment>/update', CommentRequest, name="update-comment"),
    # path('<int:pkComment>/remove', CommentRequest, name="remove-comment"),
    # path('<int:com>/update', UpdateComment.as_view(), name="update-comment"),
    # path('<int:com>/remove', CommentView.as_view(), name="remove-comment"),
]
示例#11
0
文件: urls.py 项目: SadovnikI/Project
from django.urls import path
from comments.views import CommentView, CommentAPI

urlpatterns = [
    path('api/comment/<pk>', CommentView.as_view()),
    path('api/auth/addcomment', CommentAPI.as_view()),
]
示例#12
0
    url(r'^login/$', auth_views.login, name='login'),
    url(r'^logout/$', auth_views.logout, name='logout'),
    url(r'^accounts/', include('registration.backends.simple.urls', )),
    url(r'^allauth/', include('allauth.urls', )),  #django registration
    # haystack search with custom form
    url(r'^search/?$',
        SearchView(form_class=MySearchForm),
        name='haystack_search'),
    url(r'^search/autocomplete/', autocomplete),
    # articles, products views
    url(r'^articles/', blogarticle.index),
    url(r'^products/', products.index),
    url(
        r'^entry/(?P<slug>[^\.]+)/',  # for single entry
        blogentry.single_post,
        name='single_entry'),
    url(
        r'^article/(?P<slug>[^\.]+)/',  # for single article 
        blogarticle.single_post,
        name='single_article'),
    # comments class based view
    url(r'^add_comment/$', CommentView.as_view()),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

urlpatterns += url(r'^admin/', include('loginas.urls')),
urlpatterns += url(r'^media/(?P<path>.*)$', serve),
urlpatterns += url(r'^', blogentry.index),  # MAIN PAGE - entries

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += url(r'^__debug__/', include(debug_toolbar.urls)),
示例#13
0
文件: urls.py 项目: hogen0218/movies
from django.conf.urls import url
from comments.views import CommentView

urlpatterns = [
    url(r'^user_comment', CommentView.as_view(), name='user_comment'),
]