示例#1
0
from django.conf.urls import url
from views import NewsListView

urlpatterns = [
    url(r'^', NewsListView.as_view(), name="news-list"),
]
示例#2
0
文件: urls.py 项目: yunin7/akar
# -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, url

from views import NewsListView, NewsDetailView


urlpatterns = patterns('',
    url(
        r'^$',
        NewsListView.as_view(),
        name='news-list'
    ),
    url(
        r'^(?P<pk>\d+)/$',
        NewsDetailView.as_view(),
        name='news-detail'
    ),
)
示例#3
0
#from django.urls import path
from django.conf.urls import include, url
from views import NewsListView, NewsDetailView

from . import views

urlpatterns = [
    #path('', views.index, name='index'),
    #url(r'', views.index, name='index')
    url(r'^$', NewsListView.as_view(), name='news_list'),
    url(r'^(?P<slug>[-\w]+)/$', NewsDetailView.as_view(), name='news_detail'),
]
urlpatterns = patterns('',
    url(r'^categories/$', CategoriesListView.as_view(), name = 'categories'),
    url(r'^herds/$', HerdsListView.as_view(), name = 'herds'),
    url(r'^use/$', GlobalUseListView.as_view(), name = 'global_uses'),
    url(r'^local_use/$', LocalUseListView.as_view(), name = 'local_uses'),
    url(r'^maintainers/{0}$'.format(MaintainersListView.get_url_part()), MaintainersListView.as_view(), name = 'maintainers'),
    url(r'^repositories/$', RepositoriesListView.as_view(), name = 'repositories'),
    url(r'^license-groups/$', LicenseGroupsView.as_view(), name = 'license_groups'),
    url(r'^$', EbuildsListView.as_view(), name = 'ebuilds'),
    url(r'^ebuild/(?P<pk>\d+)/$', EbuildDetailView.as_view(), name = 'ebuild'),
    url(r'^ebuild/(?P<atom>[^/]+/[^/]+)/$', EbuildDetailView.as_view(), name = 'ebuild'),
    url(r'^packages/{0}$'.format(PackagesListsView.get_url_part()), PackagesListsView.as_view(), name = 'packages'),
    url(r'^newpackages/$', PackagesListsView.as_view(), kwargs = {'order': 'create', 'rev': 'rev'},name = 'newpackages'),

    #url(r'^package/(?:(?P<pk>\d+)|(?P<category>[^/]+)/(?P<name>[^/]+))/$', PackageDetailView.as_view(), name = 'package'),
    url(r'^package/(?P<pk>\d+)/$', PackageDetailView.as_view(), name = 'package'),
    url(r'^package/(?P<atom>[^/]+/[^/]+)/$', PackageDetailView.as_view(), name = 'package'),
    url(r'^news/$', NewsListView.as_view(), name = 'news'),
    url(r'^news/(?P<pk>\d+)/$', NewsDetailView.as_view(), name = 'news_item'),
    url(r'^news/(?P<slug>[^/]+)/$', NewsDetailView.as_view(), name = 'news_item'),
    url(r'^license/(?P<slug>[^/]+)/$', LicenseDetailView.as_view(), name = 'license'),
    url(r'^arches/$', ArchChoiceView.as_view(), name = 'archchoice'),
    url(r'^licenses/$', LicensesListView.as_view(), name = 'licenses'),
    url(r'^filter/$', FilteringView.as_view(), name = 'filter'),
    url(r'^repository/(?P<slug>[^/]+)/$', RepoDetailView.as_view(), name = 'repository'),
    url(r'^rss/$', MainPageFeed()),
    url(r'^atom/$', MainPageFeedAtom()),
    url(r'^(?P<atom>[^/]+/[^/]+)/(?P<table_item>[^/]+)?$', auto_package_or_ebuild, name = 'auto'),
    url(r'^(?P<category>[\w-]+)/$', PackagesListsView.as_view(), name = 'packages'),
)