diff options
-rw-r--r-- | retro/static/2002/main.css | 1 | ||||
-rw-r--r-- | retro/static/2003/main.css | 5 | ||||
-rw-r--r-- | settings.py | 3 | ||||
-rw-r--r-- | urls.py | 77 |
4 files changed, 48 insertions, 38 deletions
diff --git a/retro/static/2002/main.css b/retro/static/2002/main.css index fb8d4a68..ea33cfae 100644 --- a/retro/static/2002/main.css +++ b/retro/static/2002/main.css @@ -89,7 +89,6 @@ ul.list { } table.border { - background-image: url('bg.gif'); background-repeat: no-repeat; background-color: #000000; border-bottom: #cccccc 1px solid; diff --git a/retro/static/2003/main.css b/retro/static/2003/main.css index a9aa1dd8..b9b2330d 100644 --- a/retro/static/2003/main.css +++ b/retro/static/2003/main.css @@ -140,7 +140,7 @@ table.box { } table.header { - background: #000000 url('bg.gif') no-repeat; + background: #000000; border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; border-right: #cccccc 1px solid; @@ -231,7 +231,6 @@ th { } th.row { - background: url('grid.png'); } th.rowhdr { @@ -243,7 +242,7 @@ th.rowhdr { td.box_headline { color: #dddddd; - background: #000000 url('bg.gif') no-repeat; + background: #000000; border-bottom: #cccccc 1px solid; padding: 0px; } diff --git a/settings.py b/settings.py index 8ed5cb61..dbc06159 100644 --- a/settings.py +++ b/settings.py @@ -89,6 +89,9 @@ STATICFILES_DIRS = ( os.path.join(DEPLOY_PATH, 'sitestatic'), ) +# Static files backend that allows us to use far future Expires headers +STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.CachedStaticFilesStorage' + # Configure where messages should reside MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' @@ -21,38 +21,6 @@ our_sitemaps = { admin.autodiscover() urlpatterns = [] -# Feeds patterns, used later -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())), -) - -# Sitemaps -urlpatterns += patterns('', - (r'^sitemap.xml$', - cache_page(1800)(sitemap_views.index), - {'sitemaps': our_sitemaps, 'sitemap_url_name': 'sitemaps'}), - (r'^sitemap-(?P<section>.+)\.xml$', - cache_page(1800)(sitemap_views.sitemap), - {'sitemaps': our_sitemaps}, 'sitemaps'), -) - -# Authentication / Admin -urlpatterns += patterns('django.contrib.auth.views', - (r'^login/$', 'login', { - 'template_name': 'registration/login.html'}), - (r'^logout/$', 'logout', { - 'template_name': 'registration/logout.html'}), -) - # Public pages urlpatterns += patterns('public.views', (r'^$', 'index', {}, 'index'), @@ -71,8 +39,18 @@ urlpatterns += patterns('public.views', (r'^master-keys/json/$', 'keys_json', {}, 'pgp-keys-json'), ) -urlpatterns += patterns('retro.views', - (r'^retro/(?P<year>[0-9]{4})/$', 'retro_homepage', {}, 'retro-homepage'), +# 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 @@ -97,6 +75,30 @@ urlpatterns += patterns('', (r'^todolists/$','todolists.views.public_list'), ) +# Retro home page views +urlpatterns += patterns('retro.views', + (r'^retro/(?P<year>[0-9]{4})/$', 'retro_homepage', {}, 'retro-homepage'), +) + +# Sitemaps +urlpatterns += patterns('', + (r'^sitemap.xml$', + cache_page(1800)(sitemap_views.index), + {'sitemaps': our_sitemaps, 'sitemap_url_name': 'sitemaps'}), + (r'^sitemap-(?P<section>.+)\.xml$', + cache_page(1800)(sitemap_views.sitemap), + {'sitemaps': our_sitemaps}, 'sitemaps'), +) + +# Authentication / Admin +urlpatterns += patterns('django.contrib.auth.views', + (r'^login/$', 'login', { + 'template_name': 'registration/login.html'}), + (r'^logout/$', 'logout', { + 'template_name': 'registration/logout.html'}), +) + +# Redirects for older known pages we see in the logs legacy_urls = ( ('^about.php', '/about/'), ('^changelog.php', '/packages/?sort=-last_update'), @@ -120,4 +122,11 @@ legacy_urls = ( urlpatterns += [url(old_url, RedirectView.as_view(url=new_url)) for old_url, new_url in legacy_urls] + +def show_urls(urllist=urlpatterns, depth=0): + for entry in urllist: + print " " * depth, entry.regex.pattern + if hasattr(entry, 'url_patterns'): + show_urls(entry.url_patterns, depth + 1) + # vim: set ts=4 sw=4 et: |