summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/blog/models.py1
-rw-r--r--app/builder/views.py7
-rw-r--r--app/cron/sync_photo_sets.py20
-rw-r--r--app/cron/sync_photos.py4
4 files changed, 18 insertions, 14 deletions
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()