summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/builder/base.py6
-rw-r--r--app/cron/sync_links.py18
-rw-r--r--app/cron/sync_photos.py17
-rw-r--r--app/links/retriever.py2
4 files changed, 19 insertions, 24 deletions
diff --git a/app/builder/base.py b/app/builder/base.py
index 6e99003..d626505 100644
--- a/app/builder/base.py
+++ b/app/builder/base.py
@@ -207,14 +207,12 @@ class BuildProjects(Build):
included_fields=['id',],
geom_attribute='mpoly',
mimetype = 'application/json',
- pretty_print=True
)
json = str(json)
json ="\n".join(json.splitlines()[3:])
#print json
- path = 'projects/data/'
- fpath = '%s%s.json' %(path, park.id)
- self.write_file(fpath,json)
+ path = 'projects/data/natparks/'
+ self.write_file(path, json, 'json', park.id)
class BuildSitemap(Build):
def build(self):
diff --git a/app/cron/sync_links.py b/app/cron/sync_links.py
index 4bec6d2..cd1373d 100644
--- a/app/cron/sync_links.py
+++ b/app/cron/sync_links.py
@@ -1,13 +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/django/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 links import retriever
-retriever.sync_pinboard_links() \ No newline at end of file
+retriever.sync_pinboard_links()
diff --git a/app/cron/sync_photos.py b/app/cron/sync_photos.py
index 3dc7552..ff601e6 100644
--- a/app/cron/sync_photos.py
+++ b/app/cron/sync_photos.py
@@ -1,15 +1,12 @@
import sys, os
from os.path import dirname, abspath
-
-PROJECT_ROOT = abspath(dirname(dirname(__file__)))
-
-
+PROJECT_ROOT = abspath(dirname(dirname(dirname(__file__))))+'/'
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/utils')
+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() \ No newline at end of file
+retriever.sync_flickr_photos()
diff --git a/app/links/retriever.py b/app/links/retriever.py
index f876405..bcbc8fa 100644
--- a/app/links/retriever.py
+++ b/app/links/retriever.py
@@ -108,4 +108,4 @@ def send_to_delicious(link):
del_tags += tag.strip().replace(' ','_')+' '
delicious.add(settings.DELICIOUS_USER, settings.DELICIOUS_PASS, link.url, link.title, tags = del_tags, extended = striptags(link.description), dt =safestr(link.pub_date), replace="no")
-''' \ No newline at end of file
+'''