diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | app/blog/models.py | 1 | ||||
-rw-r--r-- | app/builder/views.py | 7 | ||||
-rw-r--r-- | app/cron/sync_photo_sets.py | 20 | ||||
-rw-r--r-- | app/cron/sync_photos.py | 4 | ||||
-rw-r--r-- | config/requirements.txt | 10 | ||||
-rw-r--r-- | config/settings/settings.py | 9 | ||||
-rw-r--r-- | design/templates/admin/buttons.html | 1 | ||||
-rw-r--r-- | design/templates/archives/writing_date.html | 26 | ||||
-rw-r--r-- | design/templates/details/entry.html | 2 | ||||
-rw-r--r-- | design/templates/details/gifs.html | 4 | ||||
-rw-r--r-- | design/templates/details/photo_galleries.html | 2 |
12 files changed, 37 insertions, 50 deletions
@@ -1,7 +1,6 @@ *.sass-cache *~ -media/js/mainmap.js # OS generated files # .DS_Store .DS_Store? diff --git a/app/blog/models.py b/app/blog/models.py index 0f73f86..1876460 100644 --- a/app/blog/models.py +++ b/app/blog/models.py @@ -6,6 +6,7 @@ from django.contrib.syndication.views import Feed from django.contrib.sitemaps import Sitemap from django.template.defaultfilters import truncatewords_html from PIL import Image +from django import forms #http://freewisdom.org/projects/python-markdown/ import markdown diff --git a/app/builder/views.py b/app/builder/views.py index f266cb8..ca1296f 100644 --- a/app/builder/views.py +++ b/app/builder/views.py @@ -61,12 +61,17 @@ def do_build(request): elif section == 'home': BuildWriting().build_homepage() context = {'message': 'Writing Homepage to Disk',} + #Crawl Flickr for new Photosets + elif section == 'scrapeflickr': + from photos import retriever + retriever.sync_sets() + context = {'message': 'Crawling Flickr for new photosets',} """ elif section == 'all': g.build_entire_site() context = {'message': 'Writing Entire Site to disk',} """ - + else: context = {} #return redirect('/admin/', message='test') diff --git a/app/cron/sync_photo_sets.py b/app/cron/sync_photo_sets.py index 8c18a9a..beac435 100644 --- a/app/cron/sync_photo_sets.py +++ b/app/cron/sync_photo_sets.py @@ -1,15 +1,13 @@ import sys, os from os.path import dirname, abspath - -PROJECT_ROOT = abspath(dirname(dirname(__file__))) - - +PROJECT_ROOT = abspath(dirname(dirname(dirname(__file__))))+'/' +#PROJECT_ROOT = abspath(dirname(dirname(__file__))) +print PROJECT_ROOT sys.path.append(PROJECT_ROOT) -sys.path.append(PROJECT_ROOT+'/apps') -sys.path.append(PROJECT_ROOT+'/lib') -sys.path.append(PROJECT_ROOT+'/lib/utils') -sys.path.append('/home/luxagraf/webapps/django1_3/lib/python2.7/') -os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' - +sys.path.append(PROJECT_ROOT+'/app') +sys.path.append(PROJECT_ROOT+'/app/lib') +sys.path.append(PROJECT_ROOT+'/config') +sys.path.append('/home/luxagraf/apps/venv/bin/python2.7/') +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings.settings' from photos import retriever -retriever.sync_sets()
\ No newline at end of file +retriever.sync_sets() diff --git a/app/cron/sync_photos.py b/app/cron/sync_photos.py index ff601e6..634a2fc 100644 --- a/app/cron/sync_photos.py +++ b/app/cron/sync_photos.py @@ -1,12 +1,12 @@ import sys, os from os.path import dirname, abspath PROJECT_ROOT = abspath(dirname(dirname(dirname(__file__))))+'/' +#PROJECT_ROOT = abspath(dirname(dirname(__file__))) sys.path.append(PROJECT_ROOT) sys.path.append(PROJECT_ROOT+'/app') -sys.path.append(PROJECT_ROOT+'/app/lib/utils') +sys.path.append(PROJECT_ROOT+'/app/lib') sys.path.append(PROJECT_ROOT+'/config') sys.path.append('/home/luxagraf/apps/venv/bin/python2.7/') os.environ['DJANGO_SETTINGS_MODULE'] = 'settings.settings' - from photos import retriever retriever.sync_flickr_photos() diff --git a/config/requirements.txt b/config/requirements.txt index 043e5e5..c900a67 100644 --- a/config/requirements.txt +++ b/config/requirements.txt @@ -1,14 +1,22 @@ -Django==1.5.1 +Django==1.5.2 Markdown==2.2.0 PIL==1.1.7 +argparse==1.2.1 distribute==0.6.31 django-extensions==0.9 +flickr-api==0.4 +gunicorn==18.0 httplib2==0.7.7 jsmin==2.0.2 +oauth==1.0.1 psycopg2==2.4.5 +pylibmc==1.2.3 python-dateutil==2.1 requests==0.14.0 six==1.2.0 wsgiref==0.1.2 yolk==0.4.3 yuicompressor==2.4.7 + + + diff --git a/config/settings/settings.py b/config/settings/settings.py index f1a3d95..7738337 100644 --- a/config/settings/settings.py +++ b/config/settings/settings.py @@ -48,7 +48,7 @@ FLICKR_API_SECRET = '42ad60f04745cd9b' #Pinboard User Info PIN_USER = "luxagraf" -PIN_PASS = "translinguis" +PIN_PASS = "hyperrealtryptamine@34zaq" #root url BASE_URL = "http://luxagraf.net/" #path to the folder that holds the generated html files @@ -150,6 +150,7 @@ INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.sitemaps', 'django.contrib.gis', + 'django_extensions', 'locations', 'blog', 'photos', @@ -159,7 +160,7 @@ INSTALLED_APPS = ( 'templatetags', 'projects', 'guide', - 'pages' + 'pages', + 'books', + 'stuff', ) - - diff --git a/design/templates/admin/buttons.html b/design/templates/admin/buttons.html index 9bd6f00..d3a120f 100644 --- a/design/templates/admin/buttons.html +++ b/design/templates/admin/buttons.html @@ -50,6 +50,7 @@ <li class="item"><a href="/admin/build/build?id=feed">Build RSS Feed</a></li> <li class="item"><a href="/admin/build/build?id=sitemap">Build Sitemap</a></li> <li class="item"><a href="/admin/build/build?id=all">Build Entire Site</a></li> + <li class="item"><a href="/admin/build/build?id=scrapeflickr">Scrape Flickr</a></li> </ul> </div> </div> diff --git a/design/templates/archives/writing_date.html b/design/templates/archives/writing_date.html deleted file mode 100644 index 67144b3..0000000 --- a/design/templates/archives/writing_date.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify %} -{% load html5_datetime %} -{% block pagetitle %}{{block.super}}: Archive{% endblock %} -{% block bodyid %}id="archive"{%endblock%} -{% block primary %} -<p>How did you get here? You URL chopping maniac you. Right on.</p> - -<h1>{% if type == 'year' %}{{date}}, on luxagraf{%else%} Archive: {{date}} {% endif %}</h1>{% if type == 'year' %} - <ul class="archive">{% regroup object_list by pub_date.month as entries_by_month %}{% for entries in entries_by_month %} - <li><span>{{ entries.list.0.pub_date|date:"F Y" }}</span> - <ul>{% for post in entries.list %} - <li> - <a href="{{post.get_absolute_url}}" title="{{post.title}}">{{post.title|smartypants|widont|safe }}</a> - <time datetime="{{post.pub_date|html5_datetime}}">{{post.pub_date|date:"M d, Y"}}</time> - </li> {% endfor %} - </ul> - </li>{% endfor %} - </ul>{% else %} - <ul class="archive">{% for post in object_list %} - <li><a href="{{post.get_absolute_url}}" title="{{post.title}}">{{post.title|smartypants|widont|safe }}</a> - <time datetime="{{post.pub_date|html5_datetime}}">{{post.pub_date|date:"M d, Y"}}</time> - </li> {% endfor %} - </ul> - {% endif %} -{% endblock%} diff --git a/design/templates/details/entry.html b/design/templates/details/entry.html index bc23646..5784831 100644 --- a/design/templates/details/entry.html +++ b/design/templates/details/entry.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% load typogrify %} -{% block pagetitle %}{{object.title|title|smartypants|safe}} | Luxagraf, a travelogue | {% if object.country_name == "United States" %}{{object.location_name|smartypants|safe}}, {{object.state_name}}{%else%}{{object.location_name|smartypants|safe}}, {{object.country_name}}{%endif%}){% endblock %} +{% block pagetitle %}{{object.title|title|smartypants|safe}} - Luxagraf, Writing{%comment%}{% if object.country_name == "United States" %}{{object.location_name|smartypants|safe}}, {{object.state_name}}{%else%}{{object.location_name|smartypants|safe}}, {{object.country_name}}{%endif%}{%endcomment%}{% endblock %} {% block metadescription %}{{object.meta_description|striptags|safe}}{% endblock %} {%block extrahead%} diff --git a/design/templates/details/gifs.html b/design/templates/details/gifs.html index 7dd8208..5519a89 100644 --- a/design/templates/details/gifs.html +++ b/design/templates/details/gifs.html @@ -74,10 +74,10 @@ </script> </head> <body id="home"> -<audio id="snd" preload="auto" loop autoplay autobuffer> +{%if object.music_ogg %}<audio id="snd" preload="auto" loop autoplay autobuffer> <source src="{{object.music_ogg.url}}" type="video/ogg"/> <source src="{{object.music_mp3.url}}" /> -</audio> +</audio>{%endif%} <img id="giffy" src="{{object.gif.url}}" alt="{{object.title}}" /> </body> </html> diff --git a/design/templates/details/photo_galleries.html b/design/templates/details/photo_galleries.html index a7eed95..cdaf2c2 100644 --- a/design/templates/details/photo_galleries.html +++ b/design/templates/details/photo_galleries.html @@ -6,7 +6,7 @@ {%block htmlclass%}class="black"{%endblock%} -{% block metadescription %}{{object.meta_description|striptags|safe}}{% endblock %} +{% block metadescription %}{{object.set_desc|truncatewords:30|smartypants|safe}}{% endblock %} {%block bodyid%}class="image_gallery"{%endblock%} |