On Fri, Aug 28, 2009 at 9:38 PM, Jason S.<[email protected]> wrote:
>
>> I create my tables in the test setup with dummy data, and drop then in
>> the teardown.  I don't have anything in websetup.  Websetup is really
>> only useful if you're distributing a public application or if all your
>> developers need to create their own databases.  But in a real
>> situation you probably have existing data so you only create the
>> tables once and then copy them around.
>
> Thanks. I figured the setup-app part could be taken out without
> breaking it, but wasn't sure if I'd be losing out on something down
> the line.
>
> Turns out I'm probably switching to repoze, anyway. I just thought it
> was a little odd that the stock app template combined with the de
> facto default auth library (if you go with the book) made things break
> (of course it does the same thing with other non-reflective models in
> init_model, not just AuthKit). I'm going to write my own test fixtures
> now, but should this be filed as a bug in the paster template?

I guess it's a Pylons bug.  If websetup is called, it should be
consistent between setup-app and the test fixture, and not be
initializing things twice in the latter case.

On the larger issue of whether the default websetup should just be
empty and the test fixture set up its own tables, I don't know.  There
are advocates for the current situation, and I don't want to go
changing the template unless there's consensus among the developers on
a configuration that won't be changed again in six months.

Regarding AuthKit, the situation makes more sense if you realize that
it and the book were written by the same person.

>From what I read, you don't actually have a serious error.  You just
need to put checkfirst=True in the drop call, and add the drop call
before the create call if it's not already there.

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

Reply via email to