-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added larger number of rows on listview page``:wq
- Loading branch information
Showing
3 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,2 +1,14 @@ | ||
How to show larger number of rows on listview page? | ||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|
||
You have been asked to increase the number of heroes one can see on a single page to 250. (The default is 100). You can do this by:: | ||
|
||
|
||
@admin.register(Hero) | ||
class HeroAdmin(admin.ModelAdmin, ExportCsvMixin): | ||
... | ||
list_per_page = 250 | ||
|
||
You can also set it to a smaller value. If we set it to 1 as :code:`list_per_page = 1` the admin looks like this. | ||
|
||
.. image:: icrease_row_count_to_one.png |
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