예제 #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
파일: urls.py 프로젝트: webadmin87/midnight
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'),
]