Max Ischenko wrote:
>     Anyway, what I'd really like to do instead of the setup-app stuff is
>     have paster just do an internal web request, and you'd write the setup
>     as a controller in your application (probably a controller class written
>     for this particular use case).
> 
> 
> Clever, though I am not sure about if this buys you much. If you need to 
> do web-based install/configuration you can just use normal controllers 
> after initial setup (manual, setup-app or whatever).

It doesn't buy you much, but it's also not very hard to implement.  I'm 
more thinking about the conventions we should build up; preferably ones 
that don't involve lots of new code.  So this technique would lean 
heavily on the existing infrastructure (config files, controllers, etc).

It could be used for initial setup as well, except for actually making a 
blank configuration file.  Running it from a script means that you could 
run just one request as root, which is useful for setup.

I've thought also about a description of available management commands 
too, located somewhere by convention.  Say /.app-admin/description.xml, 
looking like:

<management>
   <url action="../setup" method="POST">
     <a rel="tag" href="http://pythonpaste.org/actions/setup";>setup</a>
     <description>
       Run to setup the application
     </description>
   </url>
   <url action="../ping" method="GET">
     <a rel="tag" href="http://pylonshq.com/actions/ping";>ping</a>
     <description>
       Query this URL to see if the application is alive
     </description>
   </url>
   <url action="../check" method="GET">
     <description>
       Runs a complete check on the installation (permissions, database, 
etc).
     </description>
   </url>
   <url action="../migrate-data" method="POST">
     <description>
       Run this to upgrade the data.
     </description>
   </url>
</management>

And I can imagine more standard operations than just these; some ad-hoc, 
some tagged to indicate they have a specific meaning (that can be 
consumed by automated tools).  One could potentially aggregate these 
descriptions from multiple applications (maybe just via XInclude) to 
represent the administrative options available for a complete site.


-- 
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org
             | Write code, do good | http://topp.openplans.org/careers

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

Reply via email to