Ticket #10061: t10061-r11201.patch1.diff

File t10061-r11201.patch1.diff, 1.7 KB (added by Rob Hudson <treborhudson@…>, 15 years ago)

patch on t10061-r11201

  • django/contrib/admin/sites.py

    diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py
    index 964719e..59a75f0 100644
    a b from django import http, template  
    33from django.contrib.admin import ModelAdmin
    44from django.contrib.admin import actions
    55from django.contrib.auth import authenticate, login
    6 from django.db.models.base import ModelBase
    76from django.core.exceptions import ImproperlyConfigured
     7from django.core.urlresolvers import reverse
     8from django.db.models.base import ModelBase
    89from django.shortcuts import render_to_response
    910from django.utils.functional import update_wrapper
    1011from django.utils.safestring import mark_safe
  • django/contrib/admindocs/views.py

    diff --git a/django/contrib/admindocs/views.py b/django/contrib/admindocs/views.py
    index 4f22fe0..5d77cd7 100644
    a b class GenericSite(object):  
    2424def get_root_path():
    2525    from django.contrib import admin
    2626    try:
    27         return urlresolvers.reverse(admin.site.root, args=[''])
     27        return urlresolvers.reverse('admin:index')
    2828    except urlresolvers.NoReverseMatch:
    2929        return getattr(settings, "ADMIN_SITE_ROOT_URL", "/admin/")
    3030
  • django/core/urlresolvers.py

    diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py
    index 6b41659..99d9fe0 100644
    a b def resolve(path, urlconf=None):  
    294294    return get_resolver(urlconf).resolve(path)
    295295
    296296def reverse(viewname, urlconf=None, args=None, kwargs=None, prefix=None, app_name=None):
    297     print "REVERSE",viewname,app_name
    298297    parts = viewname.split(':')
    299298    parts.reverse()
    300299    view = parts[0]
Back to Top