Merge branch 'master' of github.com:samuelclay/NewsBlur

* 'master' of github.com:samuelclay/NewsBlur:
  Fixing broken hashlib issue with feeds and no link.
  Adding MongoDB slave to local_settings template.
This commit is contained in:
Samuel Clay 2011-11-16 13:58:14 -08:00
commit c656c86721
2 changed files with 7 additions and 1 deletions

View file

@ -124,7 +124,9 @@ class Feed(models.Model):
self.next_scheduled_update = datetime.datetime.utcnow()
if not self.queued_date:
self.queued_date = datetime.datetime.utcnow()
self.hash_address_and_link = hashlib.sha1(self.feed_address+self.feed_link).hexdigest()
feed_address = self.feed_address or ""
feed_link = self.feed_link or ""
self.hash_address_and_link = hashlib.sha1(feed_address+feed_link).hexdigest()
max_feed_title = Feed._meta.get_field('feed_title').max_length
if len(self.feed_title) > max_feed_title:

View file

@ -16,6 +16,10 @@ MONGO_DB = {
'port': 27017
}
MONGODB_SLAVE = {
'host': '127.0.0.1'
}
DEBUG = True
MEDIA_URL = '/media/'