diff options
author | luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f> | 2009-11-12 21:58:26 +0000 |
---|---|---|
committer | luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f> | 2009-11-12 21:58:26 +0000 |
commit | b0464d2bcb252c8d2cef9dfca9dd7b40ec498c55 (patch) | |
tree | f39715fefd2828fd794a25fcf5301ed1ffd14ce0 /apps/blog/models.py | |
parent | c9022d38a303dcd756d34a2cbc4e3c49b22e0cf2 (diff) |
speed optimizations
Diffstat (limited to 'apps/blog/models.py')
-rw-r--r-- | apps/blog/models.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/blog/models.py b/apps/blog/models.py index 5093f5b..7ad415c 100644 --- a/apps/blog/models.py +++ b/apps/blog/models.py @@ -13,9 +13,10 @@ from tagging.models import Tag from photos.models import PhotoGallery from locations.models import Location,Region #from locations.signals import create_location_item +from blog.signals import update_recent def get_upload_path(self, filename): - return "images/post-thumbs/heloo/%s/%s" %(datetime.datetime.today().strftime("%Y"), filename) + return "images/post-thumbs/%s/%s" %(datetime.datetime.today().strftime("%Y"), filename) def markdown_processor(md): processed = markdown.markdown(md, safe_mode = False).split('<break>') @@ -109,4 +110,8 @@ class LatestFull(Feed): return Entry.objects.filter(status__exact=1).order_by('-pub_date')[:10] -#signals.post_save.connect(create_location_item, sender=Entry)
\ No newline at end of file +from django.dispatch import dispatcher +from django.db.models import signals + +signals.post_save.connect(update_recent, sender=Entry) + |