Django

Code

Ticket #951 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

admin_url is without /admin/ path in bookmarklets

Reported by: Nebojša Đorđević - nesh <nesh@studioquattro.co.yu> Assigned to: adrian
Milestone: Component: django.contrib.admin
Version: Keywords:
Cc: nesh@studioquattro.co.yu Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

When I fixed #950 I still got invalid url-s from bookmarklets.html.

In source:django/trunk/django/contrib/admin/views/doc.py#1476, url is generated like this:

def bookmarklets(request):
    return render_to_response('admin_doc/bookmarklets', {
        'admin_url': "%s://%s" % (os.environ.get('HTTPS') == 'on' and 'https' or 'http', request.META['HTTP_HOST']),
    }, context_instance=DjangoContext(request))

and that only returns my site root without /admin/ path.

Attachments

Change History

12/01/05 01:03:24 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(In [1522]) Fixed #951 -- Admin bookmarklets no longer assume admin is rooted at '/'


Add/Change #951 (admin_url is without /admin/ path in bookmarklets)




Change Properties
Action