Ticket #17498: admin.sites.2.patch
File admin.sites.2.patch, 1.2 KB (added by , 13 years ago) |
---|
-
django/contrib/admin/sites.py
354 354 app_label = model._meta.app_label 355 355 has_module_perms = user.has_module_perms(app_label) 356 356 357 if has_module_perms:357 if not model_admin.no_index and has_module_perms : 358 358 perms = model_admin.get_model_perms(request) 359 359 360 360 # Check whether user has any perm for this module. … … 415 415 app_dict = {} 416 416 for model, model_admin in self._registry.items(): 417 417 if app_label == model._meta.app_label: 418 if has_module_perms:418 if not model_admin.no_index and has_module_perms : 419 419 perms = model_admin.get_model_perms(request) 420 420 421 421 # Check whether user has any perm for this module. -
django/contrib/admin/options.py
69 69 prepopulated_fields = {} 70 70 formfield_overrides = {} 71 71 readonly_fields = () 72 no_index = False 72 73 73 74 def __init__(self): 74 75 overrides = FORMFIELD_FOR_DBFIELD_DEFAULTS.copy()