On Wed, Jun 20, 2012 at 4:17 AM, Biswas, Pinakee <[email protected]>wrote:
> Hi,**** > > ** ** > > I have been going through Pyramid documentation for the platform we are > building.**** > > ** ** > > It’s probably a bit too early to ask this considering we have just started > on Pyramid. But it would be quite helpful in understanding if you could > please let me know the following:**** > > ** ** > > We have gone through the documentation for migration from Pylons to > Pyramid but some of the things we are not clear:**** > > ** ** > > **1. **I think there is no controller in Pyramid and I think the > Views probably plays the role (for what is there in Pylons). In Pylons, I > could have multiple controllers (or python files/modules in controller > folder to say in crude way). I think in Pyramid, it would probably be the > same (new python modules) but route needs to be defined. The view.py is > provided when a Project is created.**** > A class containing view methods is equivalent to a Pylons controller. You can't use a 'controller' variable to look it up at runtime. Instead, you have to attach each view method to the desired route using @view_config (or a few other ways). The pyramid_handlers add-on provides a "Handler" abstraction that mimics Pylons controllers more closely. > **2. **In Pylons, lib folder contained 3rd party code and any other > code that doesn’t fit in the main application. Is there anything similar in > Pyramid? Or any similar convention? > Not in the Pyramid scaffolds but you can easily add a /lib directory. See: http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/pylons/index.html Pyramid for Pylons users http://docs.pylonsproject.org/projects/akhet/en/latest/ Akhet (specifically the demo app, which has a 'lib' directory, and a helpers module tied to 'h' in templates) > **** > > ** ** > > Looking forward to your help…**** > > ** ** > > Thanks,**** > > Pinakee**** > > ** ** > > ******** > > ** ** > > P* *Please don't print this e-mail unless you really need to, this will > preserve trees on planet earth. **** > > > ----------------------------Disclaimer------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **** > > The information contained in this message (including any attachments) is > confidential and may be privileged. If you have received it by mistake > please notify the sender by return e-mail and permanently delete this > message and any attachments from your system. Please note that e-mails are > susceptible to change and malwares. VVIDIA COMMUNICATIONS PVT LTD. > (including its group companies) shall not be liable for the improper or > incomplete transmission of the information contained in this communication > nor for any delay in its receipt or damage to your system. **** > > > -------------------------------------------------------------------------------------------------------------------------Disclaimer---------------------------------------------------------------------------------------------------------- > **** > > ** ** > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" 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/pylons-discuss?hl=en. > -- Mike Orr <[email protected]> -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
<<image001.png>>
