1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

newforms-admin: Added docstrings to ModelAdminView methods

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-01-14 20:03:28 +00:00
parent 32c367253a
commit 7859dee662

View File

@ -113,6 +113,7 @@ def model_admin_view(request, app_label, model_name, rest_of_url):
return mav(request, rest_of_url)
class ModelAdminView(object):
"Class that encapsulates all admin views for a given model."
def __init__(self, opts):
self.opts = opts
@ -129,18 +130,23 @@ class ModelAdminView(object):
return self.change_view(request, url)
def add_view(self, request):
"The 'add' admin view for this model."
raise NotImplementedError('Add view')
def change_view(self, request, object_id):
"The 'change' admin view for this model."
raise NotImplementedError('Change view with object %r' % object_id)
def change_list_view(self, request):
"The 'change list' admin view for this model."
raise NotImplementedError('Change list view')
def delete_view(self, request, object_id):
"The 'delete' admin view for this model."
raise NotImplementedError('Delete view with object %r' % object_id)
def history_view(self, request, object_id):
"The 'history' admin view for this model."
raise NotImplementedError('History view with object %r' % object_id)
class AdminBoundField(object):