2015-03-12 18:47 GMT+01:00 Riccardo Magliocchetti <
[email protected]>:

> I've started looking in django.contrib.admin.sites and found a couple of
> issues, first at line 469, if app_label == model._meta.app_label is true,
> shouldn't we add a break after we found an app_label? AFAIU with the
> django 1.7 app registry rework the label is unique between applications we
> don't need to do more work once we have found one
>

Yes, that's correct.


> Then there's obviously some duplication between index and app_index
> methods, would it make sense to add an helper method with an optional
> parameter to filter for the app_label?
>

Yes, it would.

Finally it looks to me that everything in the app_dict but the permissions
> could be cached somehow. Would it make sense to cache the app_dict so it
> would be cheaper to add the app_list in the other views?
>

Yes, it looks like there's room for optimization.

PR please? ;-)

-- 
Aymeric.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANE-7mU1C9SH_FT1HrMxHaU3Nq9j_TJtFpAYPBSjaBMscriV%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to