mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +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:
parent
32c367253a
commit
7859dee662
@ -113,6 +113,7 @@ def model_admin_view(request, app_label, model_name, rest_of_url):
|
|||||||
return mav(request, rest_of_url)
|
return mav(request, rest_of_url)
|
||||||
|
|
||||||
class ModelAdminView(object):
|
class ModelAdminView(object):
|
||||||
|
"Class that encapsulates all admin views for a given model."
|
||||||
def __init__(self, opts):
|
def __init__(self, opts):
|
||||||
self.opts = opts
|
self.opts = opts
|
||||||
|
|
||||||
@ -129,18 +130,23 @@ class ModelAdminView(object):
|
|||||||
return self.change_view(request, url)
|
return self.change_view(request, url)
|
||||||
|
|
||||||
def add_view(self, request):
|
def add_view(self, request):
|
||||||
|
"The 'add' admin view for this model."
|
||||||
raise NotImplementedError('Add view')
|
raise NotImplementedError('Add view')
|
||||||
|
|
||||||
def change_view(self, request, object_id):
|
def change_view(self, request, object_id):
|
||||||
|
"The 'change' admin view for this model."
|
||||||
raise NotImplementedError('Change view with object %r' % object_id)
|
raise NotImplementedError('Change view with object %r' % object_id)
|
||||||
|
|
||||||
def change_list_view(self, request):
|
def change_list_view(self, request):
|
||||||
|
"The 'change list' admin view for this model."
|
||||||
raise NotImplementedError('Change list view')
|
raise NotImplementedError('Change list view')
|
||||||
|
|
||||||
def delete_view(self, request, object_id):
|
def delete_view(self, request, object_id):
|
||||||
|
"The 'delete' admin view for this model."
|
||||||
raise NotImplementedError('Delete view with object %r' % object_id)
|
raise NotImplementedError('Delete view with object %r' % object_id)
|
||||||
|
|
||||||
def history_view(self, request, 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)
|
raise NotImplementedError('History view with object %r' % object_id)
|
||||||
|
|
||||||
class AdminBoundField(object):
|
class AdminBoundField(object):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user