#9215 closed (fixed)
Implementation example for paginaton
Reported by: | Scot Hacker | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.0 |
Severity: | Keywords: | pagination | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
This patch demonstrates a working example of Pagination, in addition to the shell example currently provide in the Pagination docs.
Attachments (1)
Change History (7)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
milestone: | post-1.0 |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
There are lots of markup errors visible from just reading through this. Have you actually applied it, run "make html" in the docs directory and viewed the output? Things that I noticed are
- Underlines of headings must be at least as long as the thing they are underlining.
- Text preceding a code fragment that ends with ":" should be written as "::" so that the code fragment is marked up as code (in multiple places the code fragments won't be converted to HTML code fragments).
- The
{#...#}
template tag is for single line comments, not comments containing a newline. Start and end markers must be on the same line. The code example given won't actually work as written. - The text that starts with a double dot (things like
".. In views.py"
) looks odd. It should be just normal text introducing the code.
We might end up putting this somewhere else (in a separate file, for example), but it looks useful. However, the markup and code should all be correct before we can go further.
comment:3 by , 16 years ago
Thanks for the tips - I wasn't aware of the documentation build system. May I suggest a link to http://docs.djangoproject.com/en/dev/internals/documentation/ on the ticket submission form for documentation submittors?
This second patch builds fine and addresses all of your points above.
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 16 years ago
You'll see in the final patch that I've changed a few things to remove some extraneous code that wasn't strictly relevant to the example (so that it stays as small as possible). I also changed the place where you were using the __repr__
method in the template (as {{ contacts }}
), since that output is for internal use, not a public display string.
@shacker: if you want to open another ticket with a patch against the AUTHORS file if you're not already in there, please do so.
Original version of this documentation courtesy Matt Dennenbaum, who assisted with this patch.
http://www.ninjacipher.com/2008/08/04/new-django-paginator-example/