durusmail: qp: Production/test site strategies?
Production/test site strategies?
2006-12-02
2006-12-02
Re: Production/test site strategies?
2006-12-03
2006-12-03
Production/test site strategies?
David Binger
2006-12-02
On Dec 2, 2006, at 9:52 AM, David K. Hess wrote:

>
> Does anyone have some best practices they can share on how best to
> use the same qp code base in both a production and test site
> sitting side by side in qp_sites?
>
> The biggest issue of course is import qp.sites.xxx statements
> scattered all throughout the xxx application. For instance I'd like
> to run xxx application out of xxx_production and xxx_test
> directories but have them both be able to use import qp.sites.xxx
> statements. I.e. I want the code to have as little awareness of
> this as possible.

I think this might be possible by using a different value of the
QP_SITES environment variable when you run the qp script
to start your production/test sites.

The code that implements this switching behavior is in
qp.sites.__init__.py, where the qp.sites.__path__ is expanded.



reply