summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2010-04-23 01:54:13 +0000
committerluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2010-04-23 01:54:13 +0000
commita6d95991f82f6a9a110a3c5e323c7f8d4ab4b3f3 (patch)
treee4f91b0a16d9a0aae1027a973915d8f87d5c55e9
parenteaa95c860b89693e5ffd9b6df1d1375b2c03a14b (diff)
fixed 404 template and photo importing script
-rw-r--r--apps/photos/utils.py28
-rw-r--r--cron/sync_photo_sets.py2
-rw-r--r--templates/404.html23
-rw-r--r--templates/base.html1
-rw-r--r--templates/contact_form/contact_form.txt6
-rw-r--r--templates/contact_form/contact_form_subject.txt2
6 files changed, 39 insertions, 23 deletions
diff --git a/apps/photos/utils.py b/apps/photos/utils.py
index 0e69c4e..b3d8be1 100644
--- a/apps/photos/utils.py
+++ b/apps/photos/utils.py
@@ -252,18 +252,22 @@ def sync_sets(*args, **kwargs):
# okay it already exists, but is it up-to-date?
#get_photos_in_set(row,set.id)
- except ObjectDoesNotExist:
- s = PhotoGallery.objects.create (
- set_id = force_unicode(info['id']),
- set_title = force_unicode(post.findtext('title')),
- set_desc = force_unicode(post.findtext('description')),
- set_slug = slugify(force_unicode(post.findtext('title'))),
- primary = force_unicode(info['primary']),
- )
- get_photos_in_set(s)
- #create the gallery thumbnail image:
- photo = Photo.objects.get(flickr_id__exact=str(info['primary']))
- make_gallery_thumb(photo,s)
+ except ObjectDoesNotExist:
+ disregard = ['POTD 2008','Snow Day','Wedding','Some random stuff']
+ if force_unicode(post.findtext('title')) in disregard:
+ pass
+ else:
+ s = PhotoGallery.objects.create (
+ set_id = force_unicode(info['id']),
+ set_title = force_unicode(post.findtext('title')),
+ set_desc = force_unicode(post.findtext('description')),
+ set_slug = slugify(force_unicode(post.findtext('title'))),
+ primary = force_unicode(info['primary']),
+ )
+ get_photos_in_set(s)
+ #create the gallery thumbnail image:
+ photo = Photo.objects.get(flickr_id__exact=str(info['primary']))
+ make_gallery_thumb(photo,s)
def get_photos_in_set(set):
BASE_PATH = 'http://flickr.com/services/rest/'
diff --git a/cron/sync_photo_sets.py b/cron/sync_photo_sets.py
index c8b67df..6fec651 100644
--- a/cron/sync_photo_sets.py
+++ b/cron/sync_photo_sets.py
@@ -8,4 +8,4 @@ sys.path.append('/home/luxagraf/webapps/django/lib/python2.5/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from photos import utils
-utils.sync_flickr_photos() \ No newline at end of file
+utils.sync_sets() \ No newline at end of file
diff --git a/templates/404.html b/templates/404.html
index d3db4f8..54826c8 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -2,29 +2,40 @@
{% load typogrify %}
{% block pagetitle %}Luxagraf | Error 404 {% endblock %}
-
+{%block bodyid%}id="writing-detail" class="single"{%endblock%}
{% block title %}404 Page Not Found{% endblock %}
{% block primary %}
<article>
- <h1>Error 404 &ndash; Page Not Found</h1>
+
+<header>
+ <h1>Error 404 &ndash; Page Not Found</h1>
+ <aside class="meta">
+ <section class="geo">Oh my god you broke the internet.</section>
+
+ </aside>
+ </header>
+ <div id="post-body">
+
- <p><b>Oh my god you broke the internet.</b></p>
+ <p><b></b></p>
<p><b>Al Gore is pissed.</b></p>
-<p><b>So is the hamster</b></p>
+<p><b>So is the hamster.</b></p>
<p>This is probably because of one or more of the following:</p>
<p>The hamster who fetches these pages has stepped out for a smoke break (he earns extra travel money over at the Philip Morris Labs where he poses as a rat and gets paid under the table).</p>
<p>The hamster who fetches these pages is actually at Phillip Morris Labs working right now in which case you'll just have to wait until he comes back here.</p>
<p>The hamster who fetches the pages finally made enough extra travel money working nights at the Philip Morris Labs to actually travel and is no longer running this site at all, in fact he's sipping Mai Tai's in Indonesia even as we speak, laughing that semi-sinister but always endearing high pitched squeak of a laugh.</p>
<p>The hamster may be innocent. Perhaps I was drunk and left the page in the back of a cab.</p>
- <p>Wait, why is this our fault? Why are you so quick to blame the hamster? This could be your fault. You might have man hands or thick, clumsy fingers or that led you to type the wrong address. Or you might just be an idiot. Or you might be following the links of an idiot. See what happens when you visit other sites? Keep it simple, make the hamster happy. Limit your internet usage to luxagraf only.</p>
- <p>Of course its possible that you're ahead of me and the page simply hasn't been invented yet, which makes you a genius. And explains why the hamster couldn't find it.</p>
+ <p>Wait, why is this our fault? Why are you so quick to blame the hamster? This could be your fault. You might have man hands or thick, clumsy fingers that led you to type the wrong address. Or you might just be an idiot. Or you might be following the links of an idiot. See what happens when you visit other sites? Keep it simple, make the hamster happy. Limit your internet usage to luxagraf only.</p>
+ <p>Of course it's also possible that you're ahead of me and the page simply hasn't been invented yet, which makes you a genius. And explains why the hamster couldn't find it.</p>
<p>It's also entirely possible that the page exists but the hamster doesn't want to show it to you. It maybe one of those "backroom" pages he has, where secret stuff beyond your wildest imaginings is happening even now, right this second, just behind this blank white curtain. Stuff which you can only guess at. You can ask the hamster for an invite. Just email a full body shot, two forms of ID and a credit card number for verification purposes.</p>
<p>Whatever the case you may <a href="javascript:history.go(-1)">return from whence you came</a>, <a href="/" title="Luxagraf Homepage">Head for the main page</a> or try searching again for whatever it is you wanted to find.</p>
+ </div>
+ <div class="clearfix">
</article>
{% endblock %}
diff --git a/templates/base.html b/templates/base.html
index 68a1942..d0c80f0 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -21,6 +21,7 @@
type="text/css"
media="screen">
+
{%block stylesheet%}{%endblock%}
<!--[if lte IE 7]><link rel="stylesheet" href="http://luxagraf.net/media/css/ie.css" type="text/css" media="screen, projection"><![endif]-->
diff --git a/templates/contact_form/contact_form.txt b/templates/contact_form/contact_form.txt
index 701b8bb..5d8bf3e 100644
--- a/templates/contact_form/contact_form.txt
+++ b/templates/contact_form/contact_form.txt
@@ -1,5 +1,5 @@
-Message from luxagraf:
-
Name: {{name}}
-Wrote: {{body}} \ No newline at end of file
+Wrote: {{body}}
+
+Reply-To Address: {{email}} \ No newline at end of file
diff --git a/templates/contact_form/contact_form_subject.txt b/templates/contact_form/contact_form_subject.txt
index 9719f2c..2eb8f20 100644
--- a/templates/contact_form/contact_form_subject.txt
+++ b/templates/contact_form/contact_form_subject.txt
@@ -1 +1 @@
-[luxagraf] {{subject_line}} \ No newline at end of file
+[luxmail] {{subject_line}} \ No newline at end of file