Skip to content

Commit 3eef83b

Browse files
Update AppList menu item to use the new Django 1.7 application registry
1 parent 65035cc commit 3eef83b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client_admin/items.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from django.apps import apps as app_registry
1516
from django.contrib import admin
1617
from django.utils.safestring import mark_safe
1718
from django.utils.text import capfirst
@@ -203,8 +204,9 @@ def init_with_context(self, context):
203204
continue
204205
app_label = getattr(admin.site._registry[model], 'app_label', None) or model._meta.app_label
205206
if app_label not in apps:
207+
app_title = app_registry.get_app_config(app_label).verbose_name
206208
apps[app_label] = {
207-
'title': capfirst(app_label.title()),
209+
'title': app_title,
208210
'url': get_admin_app_list_url(model),
209211
'models': []
210212
}

0 commit comments

Comments
 (0)