Django

Code

Ticket #10061: admin-urls.9.diff

File admin-urls.9.diff, 1.9 kB (added by Johan, 1 year ago)

I've attempted my first try at a patch. Here its is. Its much simpler than the other patches. Am i missing something ?

  • django/contrib/admin/sites.py

    old new  
    164164                name='%sadmin_index' % self.name), 
    165165            url(r'^logout/$', 
    166166                wrap(self.logout), 
    167                 name='%sadmin_logout'), 
     167                name='%sadmin_logout' % self.name), 
    168168            url(r'^password_change/$', 
    169169                wrap(self.password_change), 
    170170                name='%sadmin_password_change' % self.name), 
  • django/contrib/admin/templates/admin/base.html

    old new  
    2525        {% block branding %}{% endblock %} 
    2626        </div> 
    2727        {% if user.is_authenticated and user.is_staff %} 
    28         <div id="user-tools">{% trans 'Welcome,' %} <strong>{% firstof user.first_name user.username %}</strong>. {% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}<a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a> / <a href="{{ root_path }}logout/">{% trans 'Log out' %}</a>{% endblock %}</div> 
     28        <div id="user-tools">{% trans 'Welcome,' %} <strong>{% firstof user.first_name user.username %}</strong>. {% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}<a href="{% url admin_password_change %}">{% trans 'Change password' %}</a> / <a href="{% url admin_logout %}">{% trans 'Log out' %}</a>{% endblock %}</div> 
    2929        {% endif %} 
    3030        {% block nav-global %}{% endblock %} 
    3131    </div>