mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
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:
parent
79276f14df
commit
3b753819d3
@ -18,14 +18,14 @@
|
|||||||
FreedomBox app for api for android app.
|
FreedomBox app for api for android app.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from django.http import HttpResponse
|
import json
|
||||||
|
|
||||||
from django.core.serializers.json import DjangoJSONEncoder
|
from django.core.serializers.json import DjangoJSONEncoder
|
||||||
|
from django.http import HttpResponse
|
||||||
from django.templatetags.static import static
|
from django.templatetags.static import static
|
||||||
|
|
||||||
from plinth import frontpage
|
from plinth import frontpage, module_loader
|
||||||
from plinth import module_loader
|
|
||||||
from plinth.modules import names
|
from plinth.modules import names
|
||||||
import json
|
|
||||||
|
|
||||||
|
|
||||||
def access_info(request, **kwargs):
|
def access_info(request, **kwargs):
|
||||||
@ -69,4 +69,4 @@ def _get_icon_url(icon_name):
|
|||||||
if not icon_name:
|
if not icon_name:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return static('static/theme/icons/{}.png'.format(icon_name))
|
return static('theme/icons/{}.png'.format(icon_name))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user