Ticket #15810: dj_adm_add_applabel_class.diff
File dj_adm_add_applabel_class.diff, 5.7 KB (added by , 14 years ago) |
---|
-
django/contrib/admin/templates/admin/change_list.html
43 43 </a> 44 44 › 45 45 <a href="../"> 46 {{ app_label |capfirst }}46 {{ app_label.title|capfirst }} 47 47 </a> 48 48 › 49 49 {{ cl.opts.verbose_name_plural|capfirst }} -
django/contrib/admin/templates/admin/delete_selected_confirmation.html
4 4 {% block breadcrumbs %} 5 5 <div class="breadcrumbs"> 6 6 <a href="../../">{% trans "Home" %}</a> › 7 <a href="../">{{ app_label |capfirst }}</a> ›7 <a href="../">{{ app_label.title|capfirst }}</a> › 8 8 <a href="./">{{ opts.verbose_name_plural|capfirst }}</a> › 9 9 {% trans 'Delete multiple objects' %} 10 10 </div> -
django/contrib/admin/templates/admin/object_history.html
4 4 {% block breadcrumbs %} 5 5 <div class="breadcrumbs"> 6 6 <a href="../../../../">{% trans 'Home' %}</a> › 7 <a href="../../../">{{ app_label |capfirst }}</a> ›7 <a href="../../../">{{ app_label.title|capfirst }}</a> › 8 8 <a href="../../">{{ module_name }}</a> › 9 9 <a href="../">{{ object|truncatewords:"18" }}</a> › 10 10 {% trans 'History' %} -
django/contrib/admin/templates/admin/auth/user/change_password.html
10 10 {% block breadcrumbs %}{% if not is_popup %} 11 11 <div class="breadcrumbs"> 12 12 <a href="../../../../">{% trans "Home" %}</a> › 13 <a href="../../../">{{ opts.app_label |capfirst|escape }}</a> ›13 <a href="../../../">{{ opts.app_label.title|capfirst|escape }}</a> › 14 14 <a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> › 15 15 <a href="../">{{ original|truncatewords:"18" }}</a> › 16 16 {% trans 'Change password' %} -
django/contrib/admin/templates/admin/change_form.html
17 17 {% block breadcrumbs %}{% if not is_popup %} 18 18 <div class="breadcrumbs"> 19 19 <a href="../../../">{% trans "Home" %}</a> › 20 <a href="../../">{{ app_label |capfirst|escape }}</a> ›20 <a href="../../">{{ app_label.title|capfirst|escape }}</a> › 21 21 {% if has_change_permission %}<a href="../">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %} › 22 22 {% if add %}{% trans "Add" %} {{ opts.verbose_name }}{% else %}{{ original|truncatewords:"18" }}{% endif %} 23 23 </div> -
django/contrib/admin/templates/admin/delete_confirmation.html
4 4 {% block breadcrumbs %} 5 5 <div class="breadcrumbs"> 6 6 <a href="../../../../">{% trans "Home" %}</a> › 7 <a href="../../../">{{ app_label |capfirst }}</a> ›7 <a href="../../../">{{ app_label.title|capfirst }}</a> › 8 8 <a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> › 9 9 <a href="../">{{ object|truncatewords:"18" }}</a> › 10 10 {% trans 'Delete' %} -
django/contrib/admin/util.py
385 385 return limit_choices_to # already a Q 386 386 else: 387 387 return models.Q(**limit_choices_to) # convert dict to Q 388 389 390 class AppLabel(str): 391 def __new__(cls,value,title=None): 392 obj = str.__new__(cls, value) 393 obj._my_title = title 394 return obj 395 396 def title(self): 397 if self._my_title is not None: 398 return self._my_title 399 return super(AppLabel,self).title() -
django/contrib/admin/sites.py
388 388 app_dict = {} 389 389 for model, model_admin in self._registry.items(): 390 390 if app_label == model._meta.app_label: 391 app_label = model._meta.app_label 391 392 if has_module_perms: 392 393 perms = model_admin.get_model_perms(request) 393 394 … … 416 417 # Sort the models alphabetically within each app. 417 418 app_dict['models'].sort(key=lambda x: x['name']) 418 419 context = { 419 'title': _('%s administration') % capfirst(app_label),420 'title': _('%s administration') % (app_label.title()), 420 421 'app_list': [app_dict], 421 422 'root_path': self.root_path, 422 423 }