From 76c37ce3acc7a4af0271c7535d4a33042f7749b5 Mon Sep 17 00:00:00 2001
From: Dan McGee
Date: Tue, 24 Jul 2012 09:35:55 -0500
Subject: Replace deprecated direct_to_template() with render() shortcut
Now that Django actually provides a concise way to use a RequestContext
object without instantiating it, we can use that rather than the old
function-based generic view that worked well to do the same.
Additionally, these function-based generic views will be gone in Django
1.5, so might as well make the move now.
Signed-off-by: Dan McGee
---
retro/views.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'retro')
diff --git a/retro/views.py b/retro/views.py
index 3bc59e9f..31226deb 100644
--- a/retro/views.py
+++ b/retro/views.py
@@ -1,6 +1,6 @@
from django.http import Http404
+from django.shortcuts import render
from django.views.decorators.cache import cache_page
-from django.views.generic.simple import direct_to_template
RETRO_YEAR_MAP = {
@@ -26,6 +26,6 @@ def retro_homepage(request, year):
context = {
'year': year,
}
- return direct_to_template(request, 'retro/%s' % template, context)
+ return render(request, 'retro/%s' % template, context)
# vim: set ts=4 sw=4 et:
--
cgit v1.2.3-2-g168b
From f9252df1138ae388168cf76cb3d654a2abbce4ec Mon Sep 17 00:00:00 2001
From: Dan McGee
Date: Mon, 21 Jan 2013 15:14:44 -0600
Subject: Switch to using the cached STATICFILES_STORAGE backend
This should finally let us crank up the Expires: header to far-future
values in production since updates to JS and CSS files will take effect
immediately.
Some minor removals were made from retro stylesheets as they were
referencing files that don't actually exist because they were missing
from the web archive.
Signed-off-by: Dan McGee
---
retro/static/2002/main.css | 1 -
retro/static/2003/main.css | 5 ++---
2 files changed, 2 insertions(+), 4 deletions(-)
(limited to 'retro')
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;
}
--
cgit v1.2.3-2-g168b
From e969da2d40ed3256a89ff10d627a11e70a451b6a Mon Sep 17 00:00:00 2001
From: Dan McGee
Date: Thu, 31 Jan 2013 08:49:50 -0600
Subject: Run pngcrush and optipng over most static content
The programs have improved a bit and found some room for optimization,
especially in the static logo content. Some files were reduced in size
by 50% or more.
Signed-off-by: Dan McGee
---
retro/static/2007/logo.png | Bin 15730 -> 14892 bytes
retro/static/2008/logo.png | Bin 15730 -> 14892 bytes
retro/static/2009/sevenl_button.png | Bin 9028 -> 6840 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
(limited to 'retro')
diff --git a/retro/static/2007/logo.png b/retro/static/2007/logo.png
index b2b6d863..44968cd1 100644
Binary files a/retro/static/2007/logo.png and b/retro/static/2007/logo.png differ
diff --git a/retro/static/2008/logo.png b/retro/static/2008/logo.png
index b2b6d863..44968cd1 100644
Binary files a/retro/static/2008/logo.png and b/retro/static/2008/logo.png differ
diff --git a/retro/static/2009/sevenl_button.png b/retro/static/2009/sevenl_button.png
index 131b4dc8..93adcdf0 100644
Binary files a/retro/static/2009/sevenl_button.png and b/retro/static/2009/sevenl_button.png differ
--
cgit v1.2.3-2-g168b
From b7b24740640e24883cd17fd683e1d465fbb343f8 Mon Sep 17 00:00:00 2001
From: Dan McGee
Date: Tue, 16 Apr 2013 22:12:01 -0500
Subject: Various minor code cleanups and fixes
Most of these were suggested by PyCharm, and include everything from
little syntax issues and other bad smells to dead or bad code.
Signed-off-by: Dan McGee
---
retro/templates/retro/index-20030330.html | 1 -
1 file changed, 1 deletion(-)
(limited to 'retro')
diff --git a/retro/templates/retro/index-20030330.html b/retro/templates/retro/index-20030330.html
index 449731af..51cc8ba3 100644
--- a/retro/templates/retro/index-20030330.html
+++ b/retro/templates/retro/index-20030330.html
@@ -232,7 +232,6 @@ Happy holidays!
-
--
cgit v1.2.3-2-g168b