Beispiel #1
0
                   MostImportantShow,
                   TodaySort,
                   MonthArchive,
                   Search,
                   Home)

urlpatterns = [
    url(r'^$',
        Home.as_view(),
        name="home",
        ),
    url(r'^home/$',
        ShowNews.as_view()
        ),
    url(r'^home/detail/$',
        NewsDetail.as_view()
        ),
    url(r'^home/important/$',
        ImportantShow.as_view()
        ),
    url(r'^home/most_important/$',
        MostImportantShow.as_view()
        ),
    url(r'^home/today_sort/$',
        TodaySort.as_view()
        ),
    url(r'^home/archive/$',
        MonthArchive.as_view()
        ),
    url(r'^home/search/$',
        Search.as_view()
Beispiel #2
0
from board.utils import ed_required, ed_required_redactor
from news import views

ext_urls = patterns(
    '',
    url(r'/create/$',
        ed_required_redactor(NewsCreate.as_view()),
        name='news-create'),
    url(r'^/delete/(?P<slug>(.*))$',
        ed_required(NewsDelete.as_view()),
        name='news-delete'),
    url(r'^/update/(?P<slug>(.*))$',
        ed_required_redactor(NewsUpdate.as_view()),
        name='news-update'),
    url(r'^/(?P<slug>(.*))$', NewsDetail.as_view(), name='news-detail'),
    url(r'$', NewsList.as_view(), name='news-list'),
)

urlpatterns = patterns(
    '',
    url(r'^contacts',
        TemplateView.as_view(template_name='news/contacts.html'),
        name='contacts'),
    url(r'^oplata$', views.Oplata.as_view(), name='oplata'),
    url(r'^(?P<send_param>oplata)/(?P<token>\w+)$',
        'personal.views.profile_mail',
        name='oplata_mail'),
    url(r'^novosty', include(ext_urls)),
    url(r'^statiy/poleznoe', include(ext_urls)),
    url(r'^novovvedeniy_saita', include(ext_urls)),
Beispiel #3
0
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from rest_framework.urlpatterns import format_suffix_patterns
from views import NewsList, NewsDetail

urlpatterns = patterns('',
    url(r'^$', TemplateView.as_view(template_name='news/list.html')),
    url(r'^list/$', NewsList.as_view(), name='news_list'),
    url(r'^(?P<year>\d+)/$', NewsList.as_view(), name='news_list'),
    url(r'^(?P<year>\d+)/(?P<month>\d+)/$', NewsList.as_view(), name='news_list'),
    url(r'^detail/$', TemplateView.as_view(template_name='news/detail.html')),
    url(r'^detail/(?P<pk>\d+)/$', NewsDetail.as_view(), name='news_detail'),
)

urlpatterns = format_suffix_patterns(urlpatterns)