Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2517 (closed defect: fixed)

Opened 9 years ago

Last modified 8 years ago

paging issue in mako template for tgadmin crud interface (tgext.crud)

Reported by: kashif Owned by: percious
Priority: normal Milestone: 2.1
Component: tg-admin (non-toolbox) Version: 2.1rc1
Severity: major Keywords: pagination broken mako crud
Cc:

Description

Working with tg2.1rc1, the tgext.crud mako template for displaying all records in a model has broken paging. Basically the issue is that it appends the model name twice to the url passed to the paginator.

For example, say we have a model named user, the crud interface adds a 's' to the end of the model name (language sugar) so the normall view all url becomes '/admin/users'. When there are more than 10 users, page numbers are displayed on top for the users list. However the page numbers have urls of form '/admin/users/users?page=2'. The extra users causes nothing to be displayed for pages other than the first page.

I have attached a patch with this ticket. This is a quick fix. All that was needed was to call the paginator without any extra info (the base link was being passed before).

Attachments

tgext_crud_templates_get_all.mak.diff Download (598 bytes) - added by kashif 9 years ago.
patch for fixing pagination in tg2 admin crud mako template.

Change History

Changed 9 years ago by kashif

patch for fixing pagination in tg2 admin crud mako template.

comment:1 Changed 9 years ago by chrisz

  • Milestone changed from __unclassified__ to 2.1

comment:2 Changed 9 years ago by percious

  • Status changed from new to assigned
  • Owner changed from Chris Arndt to percious

comment:3 Changed 8 years ago by pedersen

  • Status changed from assigned to closed
  • Resolution set to fixed

This issue was fixed in release 0.3.9 of tgext.crud.

Closing this out.

Note: See TracTickets for help on using tickets.