Re: Apache on Windows & multiple Django apps

2014-09-05 Thread Collin Anderson
You could also ask for tips on the modwsgi list which may have a good 
solution.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/79917a87-853b-4dbd-9f8c-6035e42d100b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-05 Thread Tom Evans
On Fri, Sep 5, 2014 at 3:28 PM, DJ-Tom  wrote:
> Well that seems much too complicated just for running variations of the
> same application twice. There all kinds of stuff running on that server and
> adding a proxy to it would be a nightmare to check if everything still
> works.
>
> What a pity, Django is such a powerful tool, but lacks easy deployment.
>

Trolling? Django is deployed in the same way as most Python
applications on all platforms, as a WSGI container. There are vast
numbers of popular web servers that host WSGI containers, but they
mainly do not support Windows as well as *nix.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1JGAzgtrDAvt3UtWxDS8Qw4TQU9Qkf1NLSOC75ahYSb9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-05 Thread Robert Grant
I just run it on Windows with foreman start (the Heroku toolbelt) and give 
it Waitress as a server.

On Friday, 5 September 2014 16:28:03 UTC+2, DJ-Tom wrote:
>
> Well that seems much too complicated just for running variations of 
> the same application twice. There all kinds of stuff running on that server 
> and adding a proxy to it would be a nightmare to check if everything still 
> works.
>
> What a pity, Django is such a powerful tool, but lacks easy deployment.
>
>
>> This is why I gave you two solutions. See solution 2. 
>>
>> Cheers 
>>
>> Tom 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1ced790d-ee8c-4c3a-b8fb-b840c47898ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-05 Thread DJ-Tom
Well that seems much too complicated just for running variations of the 
same application twice. There all kinds of stuff running on that server and 
adding a proxy to it would be a nightmare to check if everything still 
works.

What a pity, Django is such a powerful tool, but lacks easy deployment.


> This is why I gave you two solutions. See solution 2. 
>
> Cheers 
>
> Tom 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/553d443f-7a37-41db-a265-a571738de647%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-03 Thread Tom Evans
On Tue, Sep 2, 2014 at 3:28 PM, DJ-Tom  wrote:
>
>
> Am Dienstag, 2. September 2014 13:51:28 UTC+2 schrieb Tom Evans:
>
>>
>> The most obvious and simple solution is to not use Windows.
>
>
> lol - ever heard of the "box of pandora"? :-)
>
> My knowledge of Linux boxes is very close to zero - so setting up a server
> that is not based on Windows would be the most complicated solution for me.
>
> Apart from that, the box on which all of this needs to be run also runs a
> different application server which is Windows-only.
>

This is why I gave you two solutions. See solution 2.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1LvOMZ_ZyH2i5Rzj4FMC-sSA7Mz0SE3gAjCKLBpYo2SBA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-03 Thread DJ-Tom
Hi Collin,

unfortunately, changing this makes no difference at all.

Thomas

Am Dienstag, 2. September 2014 17:45:37 UTC+2 schrieb Collin Anderson:
>
> setdefault is what's causing your trouble. Change it to an explicit:
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'app.settings'
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/15e7ba99-6843-4fce-89fa-a5fe3573e6ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-02 Thread DJ-Tom

*facepalm*... honestly, I did not spot the difference, i believed the line 
I had was right!!!

thanks anyways, I will try that tomorrow.

Am Dienstag, 2. September 2014 17:45:37 UTC+2 schrieb Collin Anderson:
>
> setdefault is what's causing your trouble. Change it to an explicit:
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'app.settings'
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/398b5cbb-adf7-425e-b91f-9902a8f5a6bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-02 Thread Collin Anderson
setdefault is what's causing your trouble. Change it to an explicit:

os.environ['DJANGO_SETTINGS_MODULE'] = 'app.settings'

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3322a2c1-ff5c-45e8-884f-e8852102b36a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-02 Thread DJ-Tom


Am Dienstag, 2. September 2014 13:51:28 UTC+2 schrieb Tom Evans:
 

> The most obvious and simple solution is to not use Windows.
>

lol - ever heard of the "box of pandora"? :-)

My knowledge of Linux boxes is very close to zero - so setting up a server 
that is not based on Windows would be the most complicated solution for me.

Apart from that, the box on which all of this needs to be run also runs a 
different application server which is Windows-only.

Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/062785ad-d55f-40e4-9dd0-79ebf7e875e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-02 Thread Robert Grant
Waitress runs fine on Windows; just install with pip.

On Tuesday, 2 September 2014 13:51:28 UTC+2, Tom Evans wrote:
>
> On Tue, Sep 2, 2014 at 12:08 PM, DJ-Tom > 
> wrote: 
> > Most likely the docs refer to this section of wsgi.py: 
> > 
> >> # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This 
> >> breaks 
> >> # if running multiple sites in the same mod_wsgi process. To fix this, 
> use 
> >> # mod_wsgi daemon mode with each site in its own daemon process, or use 
> >> # os.environ["DJANGO_SETTINGS_MODULE"] = "spcmanage.settings" 
> > 
> > 
> > But I already have set this in wsgi.py: 
> > os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings") 
> > 
> > Daemon mode is not possible as this is only available in NON-Windows 
> > environments. 
> > 
> > So I'm still stuck with this. I did quite a lot of search for this but 
> > apparently nobody knows an answer that actually works. 
> > 
>
> The most obvious and simple solution is to not use Windows. Whilst 
> lots of open source software does work on Windows (to some extent), 
> almost all of it is not developed, designed or targeted for Windows. 
> Using Windows will make your life harder, not easier (I've never had 
> to track down specific binary versions of a python package, for 
> instance). 
>
> The next most simple solution is to not use mod_wsgi, use 
> mod_proxy_http to proxy to a standalone http server that runs django 
> in its own wsgi container. Again, your problem here is finding one 
> that runs well on Windows. uWSGI apparently supports it via Cygwin... 
>
> Cheers 
>
> Tom 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/97edcc5d-ee32-4ff3-843a-ec3c8866c530%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-02 Thread Tom Evans
On Tue, Sep 2, 2014 at 12:08 PM, DJ-Tom  wrote:
> Most likely the docs refer to this section of wsgi.py:
>
>> # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This
>> breaks
>> # if running multiple sites in the same mod_wsgi process. To fix this, use
>> # mod_wsgi daemon mode with each site in its own daemon process, or use
>> # os.environ["DJANGO_SETTINGS_MODULE"] = "spcmanage.settings"
>
>
> But I already have set this in wsgi.py:
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")
>
> Daemon mode is not possible as this is only available in NON-Windows
> environments.
>
> So I'm still stuck with this. I did quite a lot of search for this but
> apparently nobody knows an answer that actually works.
>

The most obvious and simple solution is to not use Windows. Whilst
lots of open source software does work on Windows (to some extent),
almost all of it is not developed, designed or targeted for Windows.
Using Windows will make your life harder, not easier (I've never had
to track down specific binary versions of a python package, for
instance).

The next most simple solution is to not use mod_wsgi, use
mod_proxy_http to proxy to a standalone http server that runs django
in its own wsgi container. Again, your problem here is finding one
that runs well on Windows. uWSGI apparently supports it via Cygwin...

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1Lyocr4qfuYitKYL-MpMM7KxpdYFQLzf7sH_Mwo2pkraw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-02 Thread DJ-Tom
Most likely the docs refer to this section of wsgi.py:

# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This 
> breaks
> # if running multiple sites in the same mod_wsgi process. To fix this, use
> # mod_wsgi daemon mode with each site in its own daemon process, or use
> # os.environ["DJANGO_SETTINGS_MODULE"] = "spcmanage.settings"
>

But I already have set this in wsgi.py:
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")

Daemon mode is not possible as this is only available in NON-Windows 
environments.

So I'm still stuck with this. I did quite a lot of search for this but 
apparently nobody knows an answer that actually works.

Am Montag, 1. September 2014 19:11:41 UTC+2 schrieb Collin Anderson:
>
> See the docs on deploying with mod_wsgi:
>
> https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/
>
> If multiple Django sites are run in a single mod_wsgi process, all of them 
> will use the settings of whichever one happens to run first. This can be 
> solved with a minor edit to wsgi.py (see comment in the file for 
> details), or by using mod_wsgi daemon mode 
> 
>  and 
> ensuring that each site runs in its own daemon process.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dd26b9f6-ddca-4909-b2e3-31deb904a252%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Apache on Windows & multiple Django apps

2014-09-01 Thread Collin Anderson
See the docs on deploying with mod_wsgi:

https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/

If multiple Django sites are run in a single mod_wsgi process, all of them 
will use the settings of whichever one happens to run first. This can be 
solved with a minor edit to wsgi.py (see comment in the file for details), 
or by using mod_wsgi daemon mode 

 and 
ensuring that each site runs in its own daemon process.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/25c86b53-5bad-4b91-b0aa-8c66a9cf2df6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Apache on Windows & multiple Django apps

2014-09-01 Thread DJ-Tom
Hi,

I'm currently trying to get the same Django app running twice under 
different URLs on the same server.

App 1 ran last year under https://www.sample.com/2013/app and should stay 
there for reference purposes.

App 2 should run under https://www.sample.com/2014/app and also should use 
a different code base and different database than last years version.

I tried the following settings in httpd.conf, but regardless if I use the 
2013 or 2014 url, I always get the 2013 version of the application... 

I also changed the database setting in the 2014 version in settings.py, but 
it seems as if this is never executed. 

what is the correct way to set this up on Windows/Apache?

#
# WSGI / Django Konfiguration

WSGIApplicationGroup %{GLOBAL}

WSGIScriptAlias /2013/app "D:/dev/app/app/wsgi.py"
WSGIScriptAlias /2014/app "D:/dev/app.2014/app/wsgi.py"

WSGIPythonPath "D:/dev/app"



Order deny,allow
Allow from all





Order deny,allow
Allow from all



Alias /static "D:/wwwroot/app/static/"
Alias /static2014 "D:/wwwroot/app.2014/static/"
Header set X-XSS-Protection 0


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8dd8494e-1714-4867-85bd-b4c669d91ee8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.