On Thu, Jan 15, 2009 at 2:39 AM, Alberto Valverde <[email protected]> wrote: > > Lukasz Szybalski wrote: >> 1. I've noticed these changes in your templates,,,are these necessary >> to replicate? >> >> http://hg.python-rum.org/TgRumDemo/rev/1de6aa2ef67a >> > > Not absolutely necessary but useful. Those tell Rum what the data on > those fields it is supposed to *mean*. Eg, it has no way of knowing that > you want to store an email address in a Unicode field unless you tell it to. >> http://hg.python-rum.org/TgRumDemo/rev/8b862cb62f88 >> > Yes, that's a bug being fixed. If you took the time to look at the code > being changed (*in your app*) you would have noticed that the Group > class has no "name" attribute, hence if the __unicode__ was ever called > it will crash with an AttributeError. > > These changes have been applied to TG's quickstart template so if you > create a new app now with the dev version of tg.devtools you won't need > to apply them. >> 2. What else rum can do for my app? >> > The question is not what Rum can do you for your app, but what *your > app* can do for Rum... ;) >> 3. I also have this database that got converted from a legacy system >> into sqlalchemy file definition(over 80 tables). Can I use rum for >> that? > Yep, it can introspect the database directly with SqlSoup.This might > give you a clue until docs are ready: > http://hg.python-rum.org/RumAlchemy/file/tip/rumalchemy/command.py#l35 >> What customization would be available ? > All, but you would need a reference to the mapped classes so if all > you've got are Table instances (what I'm deducing from your last > sentence) you would need to map them to a trivial class (ie: > MyUser(object): pass) to get a reference to them so you can register > widgets for them or their attributes. This might give you some clues: > > http://hg.python-rum.org/RumDemo/file/tip/rumdemo/rum_metadata.py >> I would like to provide >> some users with view only sections of that data via turbogears2, and >> allow few of them add new notes only (via rum like interface). Can rum >> be used in this scenario or do I need to create tw widgets for each >> table in some way and provide proper authentication? If yes, How? >> > rum_for_notes = RumAlchemyController( > model=None, > allow_only = some_repoze_what_predicate, > template_path = '/path/to/your/templates' > config = {'rum.repositoryfactory':{'models':[Notes]}} > ) > > That will give a CRUD interface for the Notes model only, if you need > finer access control (ie: row level permissions or action level > permissions) then you'll have to wait for 0.3.
Is 0.3 going to be more business oriented, namely every field is a business decision and as such it requires authority, group of fields authority, view, add, edit, delete authorities, and authority for input values (example: if numeric field and less then 0 you need abc authorities, if more then 0 you need xyz, if not blank you need bcd), etc.... Thanks, Lucas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
