(If this is off base please feel free to tell me to go back to my newbie corner and RTFM some more.. ).
I've been working through the pylonsbook tutorial (and thoroughly enjoying the process). One thing I've noticed is that there is some repetition in the way that components are added to a Pylons project. It seems that the general pattern is: [1] In your python env: make sure you have the XYZ egg easy_installed into your python environment. [2] In your pylons project: add some conf settings to development.ini [3] In your pylons project: if XYZ includes middleware add something to config/middleware.py [4] In your pylons project: if XYZ has some routes add something to config/routes.py [5] In your pylons project: import some stuff.. (sometimes in places like lib/helpers) I know one is usually not adding and removing these components that often... but as a newbie touching so many conf files was error prone (I shot myself in the foot several times)... also if you're setting up projects often seems like it would be nice to have a little automation. When I was running through the tutorials I had a couple "hello world" projects going.. was a pain to do #2-5 on each and to try out various auth packages enabling and disabling them. Since I come from apache/mod_python world.. i'm wondering if it would make sense (or already exists please let me know) to have something like the apache "a2enmod" command that could streamline #2-5 a little. Perhaps this could be in the form some additions to the Pylons paster commands. Here is what I mean from a pylons user perspective: [1] In your python env: make sure you have the XYZ egg easy_installed into your python environment. [2] In your pylons project: paster enable-pylons-addon XYZ (gives you an error if step #1 wasn't done). Brainstorming on implementation: For step #2... development.ini like the apache.conf could support directory includes (include all files in a specified directory)... so there could be directory in addition to development.ini for example a pylons-addons-ini directory where the "enable-pylons-addon" command could deposit a file that would get included into the development.ini Not sure how step #3 or #4 could be automated since the ordering is pretty tricky... since certain middleware needs to be before of after other middleware.. perhaps there could be a "run level" concept introduced here to help group them so that ordering can be automated. For step #5 seems like a similar strategy could be adopted as #2 Well... that was what was on my mind this morning for some reason.... and I thought I'd air it out here....please let me know what you think. Steven --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---