示例#1
0
from django.conf.urls import url
from midnight_main.views import CommentView
from . import views, forms, models

urlpatterns = [
    url(r'^catalog/(?P<section_slug>[A-z0-9_-]+)/(?P<slug>[A-z0-9_-]+)/$',
        views.detail,
        name='catalog_detail'),
    url(r'^catalog/(?P<slug>[A-z0-9_-]+)/$', views.index, name='catalog_list'),
    url(r'^catalog/$', views.index, name='catalog_list'),
    url(r'^product-comments/$',
        CommentView.as_view(model_cls=models.ProductComment,
                            form_cls=forms.ProductCommentForm),
        name='product_comments'),
]
示例#2
0
文件: urls.py 项目: nanson/midnight
from django.conf.urls import url
from midnight_main.views import CommentView
from . import views, forms, models

urlpatterns = [
    url(r"^catalog/(?P<section_slug>[A-z0-9_-]+)/(?P<slug>[A-z0-9_-]+)/$", views.detail, name="catalog_detail"),
    url(r"^catalog/(?P<slug>[A-z0-9_-]+)/$", views.index, name="catalog_list"),
    url(r"^catalog/$", views.index, name="catalog_list"),
    url(
        r"^product-comments/$",
        CommentView.as_view(model_cls=models.ProductComment, form_cls=forms.ProductCommentForm),
        name="product_comments",
    ),
]
示例#3
0
from django.conf.urls import url

from midnight_main.views import CommentView
from midnight_news import models
from . import views, forms

urlpatterns = [
    url(r'^news/(?P<section_slug>[A-z0-9_-]+)/(?P<slug>[A-z0-9_-]+)/$', views.detail, name='news_detail'),
    url(r'^news/(?P<slug>[A-z0-9_-]+)/$', views.index, name='news_list'),
    url(r'^news/$', views.index, name='news_list'),
    url(r'^news-comments/$', CommentView.as_view(model_cls=models.NewsComment, form_cls=forms.NewsCommentForm), name='news_comments'),
]