Beispiel #1
0
     'page-art'),
    (r'^svn/$', TemplateView.as_view(template_name='public/svn.html'), {},
     'page-svn'),
    (r'^donate/$', 'donate', {}, 'page-donate'),
    (r'^download/$', 'download', {}, 'page-download'),
    (r'^master-keys/$', 'keys', {}, 'page-keys'),
    (r'^master-keys/json/$', 'keys_json', {}, 'pgp-keys-json'),
    (r'^people/(?P<slug>[-\w]+)/$', 'people', {}, 'people'),
)

# Feeds patterns, used below
feeds_patterns = patterns(
    '',
    (r'^$', 'public.views.feeds', {}, 'feeds-list'),
    (r'^news/$', cache_page(311)(NewsFeed())),
    (r'^packages/$', cache_page(313)(PackageFeed())),
    (r'^packages/(?P<arch>[A-z0-9]+)/$', cache_page(313)(PackageFeed())),
    (r'^packages/all/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(PackageFeed())),
    (r'^packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(
        PackageFeed())),
    (r'^releases/$', cache_page(317)(ReleaseFeed())),
)

# Includes and other remaining stuff
urlpatterns += patterns(
    '',
    (r'^admin/', include(admin.site.urls)),
    (r'^devel/', include('devel.urls')),
    (r'^feeds/', include(feeds_patterns)),
    (r'^groups/', include('packages.urls_groups')),
    (r'^mirrorlist/', include('mirrors.urls_mirrorlist')),
Beispiel #2
0
        name='page-svn'),
    url(r'^donate/$', public.views.donate, name='page-donate'),
    url(r'^download/$', public.views.download, name='page-download'),
    url(r'^master-keys/$', public.views.keys, name='page-keys'),
    url(r'^master-keys/json/$', public.views.keys_json, name='pgp-keys-json'),
    url(r'^people/(?P<slug>[-\w]+)/$', public.views.people, name='people'),
    url(r'^security/$', public.views.security, name='security'),
])

# Feeds patterns, used below
feeds_patterns = [
    url(r'^$', public.views.feeds, name='feeds-list'),
    url(r'^news/$',
        cache_page(311)(NewsFeed())),
    url(r'^packages/$',
        cache_page(313)(PackageFeed())),
    url(r'^packages/(added|removed)/$',
        cache_page(313)(PackageUpdatesFeed())),
    url(r'^packages/(added|removed)/(?P<arch>[A-z0-9]+)/$',
        cache_page(313)(PackageUpdatesFeed())),
    url(r'^packages/(added|removed)/all/(?P<repo>[A-z0-9\-]+)/$',
        cache_page(313)(PackageUpdatesFeed())),
    url(
        r'^packages/(added|removed)/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$',
        cache_page(313)(PackageUpdatesFeed())),
    url(r'^packages/(?P<arch>[A-z0-9]+)/$',
        cache_page(313)(PackageFeed())),
    url(r'^packages/all/(?P<repo>[A-z0-9\-]+)/$',
        cache_page(313)(PackageFeed())),
    url(r'^packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$',
        cache_page(313)(PackageFeed())),
Beispiel #3
0
from django.conf.urls.defaults import patterns, include, url
from packages.views import LastUpdatedPackages

from feeds import PackageFeed

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

from django.conf import settings
import os.path

feeds_patterns = patterns(
    '',
    #(r'^$',          'public.views.feeds', {}, 'feeds-list'),  # feed list
    (r'^packages/$', PackageFeed()),
    #(r'^packages/(?P<arch>[A-z0-9]+)/$',
    #PackageFeed()),
    #(r'^packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$',
    #PackageFeed()),
)

urlpatterns = patterns(
    '',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^packages/', include('packages.urls')),
    url(r'^feeds/', include(feeds_patterns)),
    url(r'^feeds/packages/$', LastUpdatedPackages()),
)

if settings.DEBUG == True:
Beispiel #4
0
#    (r'^svn/$',   TemplateView.as_view(template_name='public/svn.html'),
#        {}, 'page-svn'),
    (r'^developers/$',   'userlist', { 'user_type':'devs' },    'page-devs'),
#    (r'^trustedusers/$', 'userlist', { 'user_type':'tus' },     'page-tus'),
#    (r'^fellows/$',      'userlist', { 'user_type':'fellows' }, 'page-fellows'),
    (r'^donate/$',       'donate',   {}, 'page-donate'),
    (r'^download/$',     'download', {}, 'page-download'),
    (r'^master-keys/$',  'keys',     {}, 'page-keys'),
    (r'^master-keys/json/$', 'keys_json', {}, 'pgp-keys-json'),
)

# Feeds patterns, used below
feeds_patterns = patterns('',
    (r'^$',          'public.views.feeds', {}, 'feeds-list'),
    (r'^news/$',     cache_page(300)(NewsFeed())),
    (r'^packages/$', cache_page(300)(PackageFeed())),
    (r'^packages/(?P<arch>[A-z0-9]+)/$',
        cache_page(300)(PackageFeed())),
    (r'^packages/all/(?P<repo>[A-z0-9\-]+)/$',
        cache_page(300)(PackageFeed())),
    (r'^packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$',
        cache_page(300)(PackageFeed())),
    (r'^releases/$', cache_page(300)(ReleaseFeed())),
)

# Includes and other remaining stuff
urlpatterns += patterns('',
    # cache this static JS resource for 1 week rather than default 5 minutes
    (r'^admin/',     include(admin.site.urls)),
    (r'^devel/',     include('devel.urls')),
    (r'^feeds/',     include(feeds_patterns)),
Beispiel #5
0
    'news': sitemaps.NewsSitemap,
    'packages': sitemaps.PackagesSitemap,
    'package-files': sitemaps.PackageFilesSitemap,
    'package-groups': sitemaps.PackageGroupsSitemap,
    'split-packages': sitemaps.SplitPackagesSitemap,
}

admin.autodiscover()
urlpatterns = []

# Feeds patterns, used later
feeds_patterns = patterns(
    '',
    (r'^$', 'public.views.feeds', {}, 'feeds-list'),
    (r'^news/$', NewsFeed()),
    (r'^packages/$', PackageFeed()),
    (r'^packages/(?P<arch>[A-z0-9]+)/$', PackageFeed()),
    (r'^packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$', PackageFeed()),
)

# Sitemaps
urlpatterns += patterns(
    'django.contrib.sitemaps.views',
    # Thanks Django, we can't cache these longer because of
    # https://code.djangoproject.com/ticket/2713
    (r'^sitemap.xml$', 'index', {
        'sitemaps': our_sitemaps
    }),
    (r'^sitemap-(?P<section>.+)\.xml$', 'sitemap', {
        'sitemaps': our_sitemaps
    }),