aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-03-10 16:11:52 +0100
committerGravatar ryuslash2012-03-10 16:12:17 +0100
commit662d2fd122ebf3b63ecf8cb2390c535edbc39d07 (patch)
tree229136debc2615113f657de8e7c7526f1b52d541
parent20ade8543a5d30adf1d0afbdfa5381ab8734ed7c (diff)
downloadryuslash.org-662d2fd122ebf3b63ecf8cb2390c535edbc39d07.tar.gz
ryuslash.org-662d2fd122ebf3b63ecf8cb2390c535edbc39d07.zip
Fixed some things to work live
-rw-r--r--aggregator/management/commands/loadfeeds.py9
-rw-r--r--aggregator/migrations/0001_initial.py2
-rw-r--r--aggregator/models.py2
-rw-r--r--settings.py1
4 files changed, 10 insertions, 4 deletions
diff --git a/aggregator/management/commands/loadfeeds.py b/aggregator/management/commands/loadfeeds.py
index 8d9e83c..aff1799 100644
--- a/aggregator/management/commands/loadfeeds.py
+++ b/aggregator/management/commands/loadfeeds.py
@@ -32,10 +32,15 @@ class Command(BaseCommand):
updated=updated,
feed=feed)
+ if 'content' in entry.keys():
+ content = entry.content[0]['value']
+ else:
+ content = entry.summary
+
if feed.with_markdown:
- post.body = markdown.markdown(entry.summary)
+ post.body = markdown.markdown(content)
else:
- post.body = entry.summary
+ post.body = content
post.save()
diff --git a/aggregator/migrations/0001_initial.py b/aggregator/migrations/0001_initial.py
index 1cb4ade..dc3336e 100644
--- a/aggregator/migrations/0001_initial.py
+++ b/aggregator/migrations/0001_initial.py
@@ -27,7 +27,7 @@ class Migration(SchemaMigration):
# Adding model 'Post'
db.create_table('aggregator_post', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('post_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=500)),
+ ('post_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
('title', self.gf('django.db.models.fields.CharField')(max_length=500)),
('body', self.gf('django.db.models.fields.TextField')()),
('remote_url', self.gf('django.db.models.fields.URLField')(max_length=255)),
diff --git a/aggregator/models.py b/aggregator/models.py
index d873e6c..b5c4f3c 100644
--- a/aggregator/models.py
+++ b/aggregator/models.py
@@ -25,7 +25,7 @@ class Feed(models.Model):
ordering = [ '-updated' ]
class Post(models.Model):
- post_id = models.CharField(max_length=500, unique=True)
+ post_id = models.CharField(max_length=255, unique=True)
title = models.CharField(max_length=500)
body = models.TextField()
remote_url = models.URLField(max_length=255)
diff --git a/settings.py b/settings.py
index b46918e..44bc7fa 100644
--- a/settings.py
+++ b/settings.py
@@ -4,6 +4,7 @@ import sys
DEPLOY_PATH = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, DEPLOY_PATH)
+sys.path.insert(0, "/home/ryuslash/.python/lib/python2.6/site-packages/South-0.7.3-py2.6.egg")
DEBUG = True
TEMPLATE_DEBUG = DEBUG