Ticket #17498: admin.sites.patch
File admin.sites.patch, 1.5 KB (added by , 13 years ago) |
---|
-
django/contrib/admin/sites.py
old new 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 has_module_perms and not hasattr(model._meta, 'no_index') : 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 has_module_perms and not hasattr(model._meta, 'no_index') : 419 419 perms = model_admin.get_model_perms(request) 420 420 421 421 # Check whether user has any perm for this module. -
django/db/models/options.py
old new 17 17 DEFAULT_NAMES = ('verbose_name', 'verbose_name_plural', 'db_table', 'ordering', 18 18 'unique_together', 'permissions', 'get_latest_by', 19 19 'order_with_respect_to', 'app_label', 'db_tablespace', 20 'abstract', 'managed', 'proxy', 'auto_created' )20 'abstract', 'managed', 'proxy', 'auto_created', 'no_index') 21 21 22 22 class Options(object): 23 23 def __init__(self, meta, app_label=None):