Ejemplo n.º 1
0
from django.conf.urls import url
from blog.views import IndexView, ArticleView, AboutView, AllView, DownView, SearchView, ColumnView, UserView, TagView, CategoryView
from django.views.generic import TemplateView, DetailView

urlpatterns = [
    url(r'^$', IndexView.as_view()),
    url(r'^article/(?P<slug>\w+).html$', ArticleView.as_view()),
    url(r'^all/$', AllView.as_view()),
    url(r'^search/$', SearchView.as_view()),
    url(r'^login/$', TemplateView.as_view(template_name="blog/login.html")),
    url(r'^register/$',
        TemplateView.as_view(template_name="blog/register.html")),
    url(r'^forgetpassword/$',
        TemplateView.as_view(template_name="blog/forgetpassword.html")),
    url(r'^resetpassword/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
        TemplateView.as_view(template_name="blog/resetpassword.html")),
    url(r'^column/(?P<column>\w+)$', ColumnView.as_view()),
    url(r'^user/(?P<slug>\w+)$', UserView.as_view()),
    url(r'^tag/(?P<tag>\w+)/$', TagView.as_view()),
    url(r'^category/(?P<category>\w+)/$', CategoryView.as_view()),
    url(r'^about/$', AboutView.as_view()),
    url(r'^down/$', DownView.as_view()),
]
Ejemplo n.º 2
0
from blog.views import (
    IndexView,
    ArticleView,
    AllView,
    SearchView,
    ColumnView,
    UserView,
    NewsView,
    TagView,
    CategoryView,
)
from django.views.generic import TemplateView, DetailView
from blog.models import News

urlpatterns = [
    url(r"^$", IndexView.as_view()),
    url(r"^article/(?P<slug>\w+).html$", ArticleView.as_view()),
    url(r"^all/$", AllView.as_view()),
    url(r"^search/$", SearchView.as_view()),
    #        url(r'^login/$',TemplateView.as_view(template_name="blog/login.html")),
    #        url(r'^register/$',TemplateView.as_view(template_name="blog/register.html")),
    #        url(r'^forgetpassword/$',TemplateView.as_view(template_name="blog/forgetpassword.html")),
    #        url(r'^resetpassword/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',TemplateView.as_view(template_name="blog/resetpassword.html")),
    url(r"^column/(?P<column>\w+)$", ColumnView.as_view()),
    url(r"^user/(?P<slug>\w+)$", UserView.as_view()),
    url(r"^about/$", NewsView.as_view()),
    url(r"^news/(?P<pk>\w+)$", DetailView.as_view(model=News)),
    url(r"^tag/(?P<tag>\w+)/$", TagView.as_view()),
    url(r"^category/(?P<category>\w+)/$", CategoryView.as_view()),
]
Ejemplo n.º 3
0
Archivo: urls.py Proyecto: levylll/NGB
from django.conf.urls import url
from blog.views import IndexView,ArticleView,AllView,SearchView,ColumnView,UserView,NewsView,TagView,CategoryView
from django.views.generic import TemplateView,DetailView
from blog.models import News

urlpatterns = [
        url(r'^$',IndexView.as_view()),
        url(r'^article/(?P<slug>\w+).html$',ArticleView.as_view()),
        url(r'^all/$',AllView.as_view()),
        url(r'^search/$',SearchView.as_view()),
        url(r'^login/$',TemplateView.as_view(template_name="blog/login.html")),
        url(r'^register/$',TemplateView.as_view(template_name="blog/register.html")),
        url(r'^forgetpassword/$',TemplateView.as_view(template_name="blog/forgetpassword.html")),
        url(r'^resetpassword/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',TemplateView.as_view(template_name="blog/resetpassword.html")),
        url(r'^column/(?P<column>\w+)$',ColumnView.as_view()),
        url(r'^user/(?P<slug>\w+)$',UserView.as_view()),
        url(r'^news/$',NewsView.as_view()),
        url(r'^news/(?P<pk>\w+)$',DetailView.as_view(model=News)),
        url(r'^tag/(?P<tag>\w+)/$',TagView.as_view()),
        url(r'^category/(?P<category>\w+)/$',CategoryView.as_view()),
]
Ejemplo n.º 4
0
    url(r'^article/(?P<slug>[\s\S]*).html$',
        ArticleView.as_view(),
        name='article-detail-view'),
    url(r'^all/$', AllView.as_view(), name='all-view'),
    url(r'^search/$', SearchView.as_view()),
    url(r'^login/$',
        TemplateView.as_view(template_name="blog/login.html"),
        name='login-view'),
    url(r'^register/$',
        TemplateView.as_view(template_name="blog/register.html"),
        name='register-view'),
    url(r'^forgetpassword/$',
        TemplateView.as_view(template_name="blog/forgetpassword.html"),
        name='forgetpassword-view'),
    url(r'^resetpassword/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
        TemplateView.as_view(template_name="blog/resetpassword.html"),
        name='resetpassword-view'),
    url(r'^column/(?P<column>[\s\S]*)/$',
        ColumnView.as_view(),
        name='column-detail-view'),
    url(r'^user/(?P<slug>[\s\S]*)$', UserView.as_view(), name='user-view'),
    url(r'^news/$', NewsView.as_view(), name='news-view'),
    url(r'^news/(?P<pk>[\s\S]*)$',
        DetailView.as_view(model=News),
        name='news-detail-view'),
    url(r'^tag/(?P<tag>[\s\S]*)/$', TagView.as_view(), name='tag-detail-view'),
    url(r'^category/(?P<category>[\s\S]*)/$',
        CategoryView.as_view(),
        name='category-detail-view'),
]
Ejemplo n.º 5
0
Archivo: urls.py Proyecto: jqlts1/blog
        url(r'^all/$', AllView.as_view(), name='all-view'),
        url(r'^search/$', SearchView.as_view()),
        url(r'^login/$',
            TemplateView.as_view(template_name="blog/login.html"),
            name='login-view'),
        url(r'^register/$',
            TemplateView.as_view(template_name="blog/register.html"),
            name='register-view'),
        url(r'^forgetpassword/$',
            TemplateView.as_view(template_name="blog/forgetpassword.html"),
            name='forgetpassword-view'),
        url(r'^resetpassword/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
            TemplateView.as_view(template_name="blog/resetpassword.html"),
            name='resetpassword-view'),
        url(r'^column/(?P<column>\w+)/$',
            ColumnView.as_view(), name='column-detail-view'),
        url(r'^user/(?P<slug>\w+)$', UserView.as_view(), name='user-view'),
        url(r'^news/$', NewsView.as_view(), name='news-view'),
        url(r'^news/(?P<pk>\w+)$',
            DetailView.as_view(model=News), name='news-detail-view'),
        url(r'^tag/(?P<tag>\w+)/$', TagView.as_view(), name='tag-detail-view'),
        url(r'^(?P<category>\w+)/$',
            CategoryView.as_view(), name='category-detail-view'),
]


if settings.DEBUG:
    from django.conf.urls.static import static
    urlpatterns += static(
        settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Ejemplo n.º 6
0
urlpatterns = [
        url(r'^$', IndexView.as_view(), name='index-view'),
        url(r'^article/(?P<slug>\w+).html$',
            ArticleView.as_view(), name='article-detail-view'),
        url(r'^all/$', AllView.as_view(), name='all-view'),
        url(r'^search/$', SearchView.as_view()),
        url(r'^login/$',
            TemplateView.as_view(template_name="blog/login.html"),
            name='login-view'),
        url(r'^register/$',
            TemplateView.as_view(template_name="blog/register.html"),
            name='register-view'),
        url(r'^forgetpassword/$',
            TemplateView.as_view(template_name="blog/forgetpassword.html"),
            name='forgetpassword-view'),
        url(r'^resetpassword/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
            TemplateView.as_view(template_name="blog/resetpassword.html"),
            name='resetpassword-view'),
        url(r'^column/(?P<column>\w+)/$',
            ColumnView.as_view(), name='column-detail-view'),
        url(r'^user/(?P<slug>\w+)$', UserView.as_view(), name='user-view'),
        url(r'^news/$', NewsView.as_view(), name='news-view'),
        url(r'^news/(?P<pk>\w+)$',
            DetailView.as_view(template_name='blog/news_detail.html'), name='news-detail-view'),
        url(r'^news/(?P<pk>\w+)$',
            new, name='news-detail-view'),
        url(r'^tag/(?P<tag>\w+)/$', TagView.as_view(), name='tag-detail-view'),
        url(r'^category/(?P<category>\w+)/$',
            CategoryView.as_view(), name='category-detail-view'),
]