Commit 2e83bc7d authored by xaingling's avatar xaingling

fix api help text error

parent 7f51e9e8
from django.urls import reverse, get_script_prefix, get_resolver, get_urlconf
from django.urls import reverse
from django.db.models import Q
......@@ -11,7 +11,6 @@ def make_edit_link(instance):
def make_add_link(instance):
opt = instance._meta
link = reverse('admin:{}_{}_add'.format(opt.app_label, opt.model_name))
print("script_prefix", get_script_prefix())
return link
......@@ -12,7 +12,7 @@ from cgi import escape
from django_admin_listfilter_dropdown.filters import DropdownFilter
from common.admin_common import CommentBoxAdminBase
from common.utilities import make_edit_link
from django.urls import get_script_prefix
from .models import (
......@@ -239,8 +239,9 @@ class ImageInline(admin.StackedInline):
extra = 0
def image_tag(self, obj):
the_link = get_script_prefix()[:-1] + obj.picture.url
u = mark_safe('<img src="{url}" width="150" height="150" />'.format(
return u
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment