On 5/16/06, Arthur Clune <[EMAIL PROTECTED]> wrote:
>
>
> On 16 May 2006, at 13:38, Ed Singleton wrote:
>
> > We could do with a better way to do it, but for the moment I use the
> > WebConsole in the toolbox and copy and paste my script in there.
> > Works fine so far.
>
> That's a useful tip, but what I want is a way to script the creation
> of inital admin users so I can run it on creation.
>
> I don't really want to have to provide a sql dump of the database
> because that gets me away from the db independence that SQLobject
> provides.

I agree entirely.  I don't want to have to use an sql dump because I'm
terrible with SQL and try to avoid it ;-)

You might be able to edit start-myproject.py to accept an argument
that runs a script after the server has started, or that maybe checks
to see if the tables are empty and if so, runs the script.

What I'd really like to be able to do is to add a section to my model
that says "when the tables are created, insert these values" which
would be very useful during development.  Or even a dev-data.cfg file,
that auto loads data when in dev mode.  (I've got into the habit that
as soon as I write my model, I write out a set of values that can be
used to fill the tables for development purposes, that's what I've had
to start adding using the WebConsole).

Ed

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to