Florent Aide schrieb:
> On Wed, Oct 15, 2008 at 10:28 PM, Jorge Vargas <[EMAIL PROTECTED]> wrote:
>> I have answer this two times in the past 2 days on IRC, which i think
>> is something that could be back ported or at least write some
>> documentation.
>>
>> The issue at hand is that people want to prepopulate either test data
>> or default SQL rows values, to their models.
>>
>
> If you document a method please document this one which is the
> cleaner. I recommend naming the entry point bootstrap
> (myapp-bootstrap). If you need more info to begin writing docs on this
> method don't hesitate I'll gladly help.
I have written an example command.py that provides a "bootstrap"
function for a console script "bootstrap-<yourpkg>", which creates all
tables and optionally creates a user.
http://paste.turbogears.org/paste/10038
The example is SQLAlchemy, but I have also written a patch against
current TG 1.1 HEAD that adds support for this in commands.py in the
default quickstart template and which also works for SQLObject-based
projects.
http://trac.turbogears.org/ticket/2013
Would this be something that should be added to the default quickstart
template or will this make the code in commands.py too complex?
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---