forked from django/django
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved the admin CBVs into logically-named modules.
- Loading branch information
Showing
12 changed files
with
643 additions
and
629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from django.contrib.admin.views.edit import ( | ||
AdminDeleteView, AdminAddView, AdminChangeView) | ||
from django.contrib.admin.views.list import AdminChangeListView | ||
from django.contrib.admin.views.history import AdminHistoryView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
class AdminViewMixin(object): | ||
|
||
def __init__(self, **kwargs): | ||
super(AdminViewMixin, self).__init__(**kwargs) | ||
self.model = self.admin_opts.model | ||
self.model_opts = self.model._meta | ||
|
||
def get_queryset(self): | ||
return self.admin_opts.queryset(self.request) |
234 changes: 3 additions & 231 deletions
234
django/contrib/admin/views/cbv.py → django/contrib/admin/views/edit.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.