From 6dca31fffb9dd52014a85e01c30a142b933d86ef Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 20 Jan 2011 17:27:34 -0600 Subject: fixed paths in cron script and bugs in blog models, got rid of flatpages --- apps/blog/models.py | 4 ++-- cron/sync_links.py | 10 +++++----- cron/sync_photo_sets.py | 9 +++++---- cron/sync_photos.py | 12 ++++++------ settings.py | 2 -- templates/includes/recent_entries.html | 24 ++++++++++++------------ 6 files changed, 30 insertions(+), 31 deletions(-) diff --git a/apps/blog/models.py b/apps/blog/models.py index 85f105f..ff510f7 100644 --- a/apps/blog/models.py +++ b/apps/blog/models.py @@ -115,8 +115,8 @@ class Entry(models.Model): return self.enable_comments and datetime.datetime.today() - datetime.timedelta(30) <= self.pub_date def get_thumbnail_url(self): - image_dir, img = self.thumbnail.url.split('post-thumbs/')[1].split('/') - return '%spost-thumbs/%s/%s' %(settings.IMAGES_URL, image_dir, img) + image_dir, img = self.thumbnail.url.split('post-thumbnail/')[1].split('/') + return '%spost-thumbnail/%s/%s' %(settings.IMAGES_URL, image_dir, img) def get_image_url(self): image_dir, img = self.image.url.split('post-images/')[1].split('/') diff --git a/cron/sync_links.py b/cron/sync_links.py index e516bfe..ba1ee8f 100644 --- a/cron/sync_links.py +++ b/cron/sync_links.py @@ -1,10 +1,10 @@ import sys, os -sys.path.append('/home/luxagraf/webapps/django1_2') -sys.path.append('/home/luxagraf/webapps/django1_2/luxagraf') -sys.path.append('/home/luxagraf/webapps/django1_2/luxagraf/apps') -sys.path.append('/home/luxagraf/webapps/django1_2/luxagraf/lib') -sys.path.append('/home/luxagraf/webapps/django1_2/luxagraf/lib/utils') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf/apps') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf/lib') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf/lib/utils') sys.path.append('/home/luxagraf/webapps/django/lib/python2.6/') os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' diff --git a/cron/sync_photo_sets.py b/cron/sync_photo_sets.py index 1f93a82..0b5dcc8 100644 --- a/cron/sync_photo_sets.py +++ b/cron/sync_photo_sets.py @@ -1,9 +1,10 @@ import sys, os -sys.path.append('/home/luxagraf/webapps/django1_2') -sys.path.append('/home/luxagraf/webapps/django1_2/luxagraf') -sys.path.append('/home/luxagraf/webapps/django1_2/luxagraf/apps') -sys.path.append('/home/luxagraf/webapps/django1_2/luxagraf/lib') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf/apps') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf/lib') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf/lib/utils') sys.path.append('/home/luxagraf/webapps/django/lib/python2.6/') os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' diff --git a/cron/sync_photos.py b/cron/sync_photos.py index 06f7156..5d9cfc2 100644 --- a/cron/sync_photos.py +++ b/cron/sync_photos.py @@ -1,11 +1,11 @@ import sys, os -sys.path.append('/home/luxagraf/webapps/django1_2') -sys.path.append('/home/luxagraf/webapps/django1_2/luxagraf') -sys.path.append('/home/luxagraf/webapps/django1_2/luxagraf/apps') -sys.path.append('/home/luxagraf/webapps/django1_2/lib/python2.6/') -sys.path.append('/home/luxagraf/webapps/django1_2/luxagraf/lib') - +sys.path.append('/home/luxagraf/webapps/django124/luxagraf') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf/apps') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf/lib') +sys.path.append('/home/luxagraf/webapps/django124/luxagraf/luxagraf/lib/utils') +sys.path.append('/home/luxagraf/webapps/django/lib/python2.6/') os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from photos import retriever diff --git a/settings.py b/settings.py index 22a40b6..b27c1cc 100644 --- a/settings.py +++ b/settings.py @@ -99,7 +99,6 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'pagination.middleware.PaginationMiddleware', - 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', 'fdigg.middleware.FckDiggMiddleware', #'debug_toolbar.middleware.DebugToolbarMiddleware', ) @@ -139,7 +138,6 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', - 'django.contrib.flatpages', 'django.contrib.sitemaps', 'django.contrib.gis', 'filebrowser', diff --git a/templates/includes/recent_entries.html b/templates/includes/recent_entries.html index 3632ebe..845374d 100644 --- a/templates/includes/recent_entries.html +++ b/templates/includes/recent_entries.html @@ -1,28 +1,28 @@
-

Dinosaur National Monument, Part Two: Down the River

- - Dinosaur National Monument, Part Two: Down the River -

This is the only real way to see Dinosaur National Monument — you must journey down the river. There are two major rivers running through Dinosaur, the Yampa, which carves through Yampa Canyon, and the Green, which cuts through Lodore. Adventure Bound Rafting runs some of the best whitewater rafting trips in Colorado and I was lucky enough to go down the Green River with them, through the majestic Lodore Canyon.

- -

Dinosaur National Monument, Part One: Echo Park

- Dinosaur National Monument, Part One: Echo Park + Dinosaur National Monument, Part One: Echo Park

Dinosaur National Monument was poorly named. The best parts of it are not the fossils in the quarry (which is closed for 2010 anyway) but the canyon country — some of the best, most remote canyon country you'll find in this part of the world.

-
+

The Endless Crowds of Yellowstone

- The Endless Crowds of Yellowstone + The Endless Crowds of Yellowstone

There is wilderness in Yellowstone, even if it's just inches from the boardwalks that transport thousands around the geothermal pools. It may not be wilderness on a grand scale — the sweeping mountain peaks or wild rivers of other parks — but in some ways that makes it more enticing. As one Ranger told me, Yellowstone isn't about the big picture, the grand scenery, it's about the tiny details within each pool. To really see Yellowstone, he said, you have to take your time, move slowly and look closely.

+
+

Backpacking in the Grand Tetons

+ + Backpacking in the Grand Tetons +

Hiking into the wilderness empties your mind. You fall into the silence of the mountains and you can relax in a way that's very difficult to do in the midst of civilization. The white noise that surrounds us in our everyday lives, that noise we don't even notice as it adds thin layers of stress that build up over days, weeks, years, does not seem capable of following us into the mountains.

+
-- cgit v1.2.3