api: fix icon_url

The django template tag `static` already adds /plinth/static/. The url argument
also starts with static which makes it /plinth/static/static/...

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati 2018-02-05 18:14:04 +05:30 committed by James Valleroy
parent 79276f14df
commit 3b753819d3
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -18,14 +18,14 @@
FreedomBox app for api for android app.
"""
from django.http import HttpResponse
import json
from django.core.serializers.json import DjangoJSONEncoder
from django.http import HttpResponse
from django.templatetags.static import static
from plinth import frontpage
from plinth import module_loader
from plinth import frontpage, module_loader
from plinth.modules import names
import json
def access_info(request, **kwargs):
@ -69,4 +69,4 @@ def _get_icon_url(icon_name):
if not icon_name:
return None
return static('static/theme/icons/{}.png'.format(icon_name))
return static('theme/icons/{}.png'.format(icon_name))