mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
bug fixes from missed django/python upgrade
This commit is contained in:
parent
d370bd5b2e
commit
991cc3855d
4 changed files with 6 additions and 6 deletions
|
@ -399,7 +399,7 @@ def share_story(request, token=None):
|
|||
def save_story(request, token=None):
|
||||
code = 0
|
||||
story_url = request.POST['story_url']
|
||||
user_tags = request.POST.getlist('user_tags') or request.REQUEST.getlist('user_tags[]') or []
|
||||
user_tags = request.POST.getlist('user_tags') or request.POST.getlist('user_tags[]') or []
|
||||
add_user_tag = request.POST.get('add_user_tag', None)
|
||||
title = request.POST['title']
|
||||
content = request.POST.get('content', None)
|
||||
|
|
|
@ -68,7 +68,7 @@ def opml_upload(request):
|
|||
code = -1
|
||||
|
||||
return HttpResponse(json.encode(dict(message=message, code=code, payload=payload)),
|
||||
mimetype='text/html')
|
||||
content_type='text/html')
|
||||
|
||||
def opml_export(request):
|
||||
user = get_user(request)
|
||||
|
@ -78,7 +78,7 @@ def opml_export(request):
|
|||
exporter = OPMLExporter(user)
|
||||
opml = exporter.process()
|
||||
|
||||
response = HttpResponse(opml, mimetype='text/xml')
|
||||
response = HttpResponse(opml, content_type='text/xml')
|
||||
response['Content-Disposition'] = 'attachment; filename=NewsBlur-%s-%s' % (
|
||||
user.username,
|
||||
now.strftime('%Y-%m-%d')
|
||||
|
|
|
@ -1567,9 +1567,9 @@ def complete_river(request):
|
|||
@json.json_view
|
||||
def unread_story_hashes__old(request):
|
||||
user = get_user(request)
|
||||
feed_ids = request.REQUEST.getlist('feed_id') or request.REQUEST.getlist('feed_id[]')
|
||||
feed_ids = request.POST.getlist('feed_id') or request.POST.getlist('feed_id[]')
|
||||
feed_ids = [int(feed_id) for feed_id in feed_ids if feed_id]
|
||||
include_timestamps = is_true(request.REQUEST.get('include_timestamps', False))
|
||||
include_timestamps = is_true(request.POST.get('include_timestamps', False))
|
||||
usersubs = {}
|
||||
|
||||
if not feed_ids:
|
||||
|
|
|
@ -15,7 +15,7 @@ def load_recommended_feed(request):
|
|||
page = max(int(request.GET.get('page', 0)), 0)
|
||||
usersub = None
|
||||
refresh = request.GET.get('refresh')
|
||||
now = datetime.datetime.now
|
||||
now = datetime.datetime.now()
|
||||
unmoderated = request.GET.get('unmoderated', False) == 'true'
|
||||
|
||||
if unmoderated:
|
||||
|
|
Loading…
Add table
Reference in a new issue