multi projects / dynamic controler creation

23 views
Skip to first unread message

abc_coder

unread,
Jul 4, 2012, 2:44:08 AM7/4/12
to turbo...@googlegroups.com
Hi all,

I have some problem and I don't know how to make best solution for that.

I want to have many projects on my web site taken from database (Projects) and manage it separatly.
For each project, I would like to assign resources such as people, materials, expenses, etc.. Each resource has its own separate table in the database.

When I create new project in Projects table then I want assign resources and view each project as a new subpage in my website.

How can I do this?

I think that quick solution can be dynamic controller creation. When I add new project for database then it has its own controller, but I don't know if it is good solution and I don't know also how to create controllers in dynamic way.

I would be grateful for any tips and any code examples.

Alessandro Molina

unread,
Jul 4, 2012, 6:46:59 AM7/4/12
to turbo...@googlegroups.com
You can use the _lookup or _default method of the controllers to
dynamically dispatch requests.

The _lookup way requires to return a controller instance which will be
used to serve the successive parts of the url.
You can off course create the controller inside the _lookup itself to
implement dynamic dispatch
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/turbogears/-/0nmLMfQoqm0J.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to
> turbogears+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.
Reply all
Reply to author
Forward
0 new messages