hipoxia ha scritto: > hi all, > > i search that problem on the net but i could't find any solution, > > my problem is that, when using paginate the paginate var_name is a > sequence object as you know, my object is a map object of sqlalchemy, > but if there is no record at that mapping, paginates i think > redirecting the page but the url is doubling :S > > like that http://127.0.0.1:8080/mypath/mypath?something > but it must be http://127.0.0.1:8080/mypath?something > > turbogears verion is 1.0.8, > sqlalchemy version is 0.5.2 > python version is 2.4 > > > Note: for some reasons i am using 2 databases one of them is > postgresql so i don't need to simulate pagination offset, other is > mssql (i hate it) and i need simulate the offset, so i change a little > bit the paginate.py as below > > def paginate(var_name, default_order='', default_reversed=None, > limit=10, > max_limit=0, allow_limit_override=None, max_pages=5, > max_sort=1000, dynamic_limit=None, simulate__=False): > ....... > ....... > paginate_instance = Paginate( > current_page=page, > limit=limit_, > pages=pages_to_show, > page_count=page_count, > input_values=input_values, > order=order, > ordering=ordering, > row_count=row_count, > var_name=var_name, > simulate__=simulate__) > ............. > ............. > > global _simulate_offset > _simulate_offset = None > if _simulate_offset is None: > _simulate_offset = get('paginate.simulate_offset', > None) > if _simulate_offset is None: > _simulate_offset = False > so_db = get('sqlobject.dburi', 'NOMATCH:').split > (':', 1)[0] > sa_db = get('sqlalchemy.dburi', 'NOMATCH:').split > (':', 1)[0] > if so_db in _so_no_offset or sa_db in > _sa_no_offset: > _simulate_offset = True > log.warning("paginate: simulating OFFSET," > " paginate may be slow" > " (disable with > paginate.simulate_offset=False)") > if simulate__ == True: > _simulate_offset = True > > i think there is no connection between my problem and my changes at > paginate.py file? > > >
did you solved this issue? I'm having the same problem. Gla -- Glauco Uri --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

