where is everything in django admin?
I would like to figure out where everything is in django admin. Since i am currently trying to modify the behavior rather heavily right now, so perhaps a reference would be helpful. For example, where is ModelAdmin located, i cannot find it anywhere in C:\Python26\Lib\site-packages\django\contrib\admin. I need that because i would like to look at how it is implemented so that i can override with confidence. I need to do that in part because of this page: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-methods, for example, i would like to override ModelAdmin.add_view, but i can't find the original source for that. As well as i would like to see the url routing file for admi开发者_开发知识库n, so i can easily figure out which url corresponding to which template etc.
Thanks a lot for any pointers!
A simple cross-file text search should be enough to show you where everything is.
If you can't make that work, you should be able to follow the imports - you import ModelAdmin from django.contrib.admin, so open the __init__.py
file inside that directory, and see that there ModelAdmin is itself imported from django.contrib.admin.options
. Open that file, and you'll see the code.
精彩评论