mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing rss feed for blurblogs to start with the newest story. Duh.
This commit is contained in:
parent
15df6b6b47
commit
59cf3fe8c4
4 changed files with 7 additions and 8 deletions
|
@ -194,7 +194,7 @@ class Feed(models.Model):
|
|||
if feeds:
|
||||
return feeds[0], False
|
||||
|
||||
if feed_link.endswith('/'):
|
||||
if feed_link and feed_link.endswith('/'):
|
||||
feeds = cls.objects.filter(feed_address=feed_address, feed_link=feed_link[:-1])
|
||||
if feeds:
|
||||
return feeds[0], False
|
||||
|
|
|
@ -877,7 +877,7 @@ def shared_stories_rss_feed(request, user_id, username):
|
|||
data['generator'] = 'NewsBlur'
|
||||
data['docs'] = None
|
||||
|
||||
shared_stories = MSharedStory.objects.filter(user_id=user.pk)[:30]
|
||||
shared_stories = MSharedStory.objects.filter(user_id=user.pk).order_by('-shared_date')[:25]
|
||||
for shared_story in shared_stories:
|
||||
story_data = {
|
||||
'title': shared_story.story_title,
|
||||
|
|
8
fabfile.py
vendored
8
fabfile.py
vendored
|
@ -1,4 +1,4 @@
|
|||
from fabric.api import cd, env, local, parallel
|
||||
from fabric.api import cd, env, local, parallel, serial
|
||||
from fabric.api import put, run, settings, sudo
|
||||
# from fabric.colors import red, green, blue, cyan, magenta, white, yellow
|
||||
try:
|
||||
|
@ -105,6 +105,7 @@ def pull():
|
|||
def pre_deploy():
|
||||
compress_assets(bundle=True)
|
||||
|
||||
@serial
|
||||
def post_deploy():
|
||||
cleanup_assets()
|
||||
|
||||
|
@ -126,10 +127,7 @@ def deploy_code(copy_assets=False, full=False):
|
|||
run('rm -fr static/*')
|
||||
if copy_assets:
|
||||
transfer_assets()
|
||||
if full:
|
||||
with settings(warn_only=True):
|
||||
run('pkill -c gunicorn')
|
||||
else:
|
||||
with settings(warn_only=True):
|
||||
run('pkill -c gunicorn')
|
||||
# run('kill -HUP `cat logs/gunicorn.pid`')
|
||||
run('curl -s http://%s > /dev/null' % env.host)
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
<head>
|
||||
<title>{{ social_profile.blurblog_title }}</title>
|
||||
<link rel="alternate" type="application/rss+xml" href="{% url shared-stories-rss-feed social_profile.user_id social_profile.username|slugify %}" title="{{ social_profile.feed_title }} RSS feed">
|
||||
<link rel="shortcut icon" HREF="{{ social_profile.photo_url }}">
|
||||
<link rel="shortcut icon" href="{{ social_profile.photo_url }}">
|
||||
<link rel="icon" href="{{ social_profile.photo_url }}">
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1.5">
|
||||
|
||||
{% include_stylesheets "blurblog" %}
|
||||
|
|
Loading…
Add table
Reference in a new issue