I'll try with this tonight, and hope I can get it to work to at least
reproduce the problem. The reason I asked for git/hg is so that I can
definitively reproduce the problem using the same code in the same layout
you're using, and I'm not guessing.

I'll still try, but would very much appreciate it if you could provide
either the original code, or a quickstarted project that I can download that
reproduces the problem in as few extra lines of code as possible.
Troubleshooting is much easier then.

On Wed, Feb 23, 2011 at 7:28 AM, Vineet <[email protected]> wrote:

> Hi !
> For learning purpose, I have taken a single database-table.
> So the code is quite small & can be reproduced here.
> (Some standard defs generated by quickstart are not reproduced here).
>
> A nice table with data-rows is rendered by visiting--
> "http://localhost:8080/color/";
>
> But,
> 1] The links to next pages are not working.
> After clicking the links, "Default" page is rendered.
>
> 2] Which method(s) need to be customized (& where it can be found) in
> order to---
> A] filter the records to display.
> B] customize Add/Edit forms rendering(I have understood how to define
> forms thro' sprox)
>
>
>
> ========== \model\color.py =============
> --This maps to a MySQL table named 'clr' in database 'whl'--
>
> from sqlalchemy import Column
> from sqlalchemy import Text, Integer, String
>
> from mwhl.model import DeclarativeBase
>
> class Color(DeclarativeBase):
>
>    __tablename__ = 'clr'
>
>    clrid = Column(Integer, primary_key=True)
>    frid = Column(Integer)
>    clrnm = Column(String(50))
>    clrcd = Column(String(25))
>    active = Column(Text)
>
> ========== \development.ini =============
>
> sqlalchemy.url=mysql://root:123@localhost:3306/whl
> templating.mako.reloadfromdisk = true
> templating.mako.compiled_templates_dir = %(here)s/data/templates
>
> ========== \controllers\root.py =============
>
> from tg import expose, flash, require, url, request, redirect,
> tmpl_context
> from mwhl.widgets.clr_form import create_clradd_form
> from pylons.i18n import ugettext as _, lazy_ugettext as l_
> from tgext.admin.tgadminconfig import TGAdminConfig
> from tgext.admin.controller import AdminController
> from repoze.what import predicates
>
> from mwhl import model
> from mwhl.lib.base import BaseController
> from mwhl.model import DBSession, Color
> from mwhl.controllers.secure import SecureController
>
> from mwhl.controllers.error import ErrorController
>
> from tgext.crud import CrudRestController
> from sprox.tablebase import TableBase
> from sprox.fillerbase import TableFiller
>
> __all__ = ['RootController']
>
> class ColorTable(TableBase):
>    __model__ = Color
>    __omit_fields__ = ['frid']
> color_table = ColorTable(DBSession)
>
> class ColorTableFiller(TableFiller):
>    __model__ = Color
> color_table_filler = ColorTableFiller(DBSession)
>
> class ColorController(CrudRestController):
>    model = Color
>    table = color_table
>    table_filler = color_table_filler
>
> class RootController(BaseController):
>
>    secc = SecureController()
>
>    admin = AdminController(model, DBSession,
> config_type=TGAdminConfig)
>    error = ErrorController()
>
>    color = ColorController(DBSession)
>
>    @expose('mwhl.templates.index')
>    def index(self):
> # return '<h1>Welcome to MyWheels</h1>'
>        return dict(page='index')
>
>    @expose()
>    def default(self, *args, **kw):
>        return "This page is not ready"
> ====================
> Thanks,
>
> Vineet.
>
> ==========================================================
> On Feb 22, 8:36 pm, Michael Pedersen <[email protected]> wrote:
> > Best choice is to provide either a git or hg repository that we can
> clone, I
> > think. Provide us with details on where to look, and we'll take a look
> from
> > there to see what we can do.
> >
> > I can't promise definitive answers, but we will try.
> >
> >
> >
> > On Tue, Feb 22, 2011 at 7:48 AM, Vineet <[email protected]>
> wrote:
> > > I have created an app using TG 2.1 CrudRestController (& of course,
> > > SA).
> > > It works fine.
> >
> > > Now I am stuck-up for 2 things.
> >
> > > 1] It displays the table with all records from database-table named
> > > 'clr'.
> > > I want to filter them by 'clrnm'.
> > > I read from docs that the 'get_all' method of 'CrudRestController'
> > > needs to be overridden and give there the required query.
> > > In Sprox docs, they have shown how to override 'RestController'
> > > method.
> > > But I couldn't find help on overriding CrudRestController's 'get_all'
> > > method.
> >
> > > 2] On the top-side of the table, links for next pages appear, but not
> > > working.
> > > (I have coded it exactly as per the docs given for CrudRestController
> > > in TG 2.1).
> > > Can anybody please indicate whether anything extra (apart from TG
> > > docs) needs to be done !
> > > (My code is not reproduced here to keep this post brief).
> > > I will post the code if required.
> >
> > > Thanks in advance,
> >
> > > Vineet.
> >
> > > --
> > > 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.
> >
> > --
> > Michael J. Pedersen
> > My IM IDs: Jabber/[email protected], ICQ/103345809,
> AIM/pedermj022171
> >           Yahoo/pedermj2002, MSN/[email protected]
>
> --
> 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.
>
>


-- 
Michael J. Pedersen
My IM IDs: Jabber/[email protected], ICQ/103345809, AIM/pedermj022171
          Yahoo/pedermj2002, MSN/[email protected]

-- 
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.

Reply via email to