Exemplo 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()),
]
Exemplo 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()),
]
Exemplo n.º 3
0
     name='login-view'),
 url(r'^register/$',
     TemplateView.as_view(template_name="sys/register.html"),
     name='register-view'),
 url(r'^forgetpassword/$',
     TemplateView.as_view(template_name="sys/forgetpassword.html"),
     name='forgetpassword-view'),
 url(r'^resetpassword/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
     TemplateView.as_view(template_name="sys/resetpassword.html"),
     name='resetpassword-view'),
 url(r'^aboutme/$', AboutMeView.as_view(), name='aboutme-view'),
 url(r'^media/article/(?P<path>.*)', 'django.views.static.serve',
     {'document_root': settings.MEDIA_ROOT + '/article'}),
 url(r'^article/(?P<pk>\d+)/$', ArticleView.as_view(), name='article-view'),
 url(r'^tag/(?P<tag_name>.+)/$', TagsView.as_view(), name='tag-view'),
 url(r'^all/$', AllView.as_view(), name='all-view'),
 url(r'^comment/(?P<slug>\w+)/$',
     PostCommentView.as_view(),
     name='postcomment-view'),
 url(r'^search/$', SearchView.as_view(), name='search-view'),
 url(r'^category/(?P<pk>\w+)/$',
     CaregoryView.as_view(),
     name='category-view'),
 url(r'^datearticle/(?P<year>\d+)/(?P<month>\d+)/$',
     DateArticleView.as_view(),
     name='datearticle-view'),
 url(r'^msgbook/$', MsgBookView.as_view(), name='msgbook-view'),
 url(r'^photo/$', PhotoView.as_view(), name='photo-view'),
 url(r'^photolist/(?P<pk>\d+)/$',
     PhothListView.as_view(),
     name='photolist-view'),
Exemplo n.º 4
0
Arquivo: urls.py Projeto: 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()),
]
Exemplo n.º 5
0
Arquivo: urls.py Projeto: jqlts1/blog
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
from django.conf.urls import include, url
from DjangoUeditor import urls as DjangoUeditor_urls
from django.conf import settings

urlpatterns = [
        url(r'^$', IndexView.as_view(), name='index-view'),
        url(r'^(?P<url>\w+)/(?P<pk>\w+).html$',
            ArticleView.as_view(), name='article-detail-view'),
        url(r'^ueditor/', include(DjangoUeditor_urls)),

        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'),