dont fail if /api/upload is called without the right arguments, render api page: fixes #2611
This commit is contained in:
parent
31c3cc908b
commit
f56218e33a
2 changed files with 10 additions and 2 deletions
|
@ -20,5 +20,5 @@ class Command(BaseCommand):
|
|||
elif len(args) == 2:
|
||||
target = args[0]
|
||||
base = args[1]
|
||||
print('update docs', target, 'base', base)
|
||||
print('update documentation in ', target, 'based on', base)
|
||||
documentation.update(target, base)
|
||||
|
|
|
@ -5,7 +5,8 @@ import os.path
|
|||
from datetime import datetime
|
||||
|
||||
from django import forms
|
||||
from django.shortcuts import get_object_or_404, redirect
|
||||
from django.shortcuts import get_object_or_404, redirect, render_to_response
|
||||
from django.template import RequestContext
|
||||
from django.conf import settings
|
||||
from django.db.models import Count
|
||||
|
||||
|
@ -219,6 +220,13 @@ actions.register(addMedia, cache=False)
|
|||
|
||||
@login_required_json
|
||||
def firefogg_upload(request):
|
||||
if not 'profile' in request.GET or not 'id' in request.GET:
|
||||
context = RequestContext(request, {
|
||||
'api': [],
|
||||
'settings': settings,
|
||||
'sitename': settings.SITENAME
|
||||
})
|
||||
return render_to_response('api.html', context)
|
||||
profile = request.GET['profile']
|
||||
oshash = request.GET['id']
|
||||
config = settings.CONFIG['video']
|
||||
|
|
Loading…
Reference in a new issue