Re: How do I minimize memory usage with WSGI and Apache?

2009-08-10 Thread Graham Dumpleton
On Aug 11, 3:11 am, Jumpfroggy wrote: > Wow, lots of good feedback here.  Thanks! > > On Aug 9, 6:17 pm, Graham Dumpleton > wrote: > > > Replace use of mod_python with mod_wsgi. > > I'm using mod_wsgi for everything already, forgot to say.  When I > research

Re: How do I minimize memory usage with WSGI and Apache?

2009-08-10 Thread Graham Dumpleton
On Aug 11, 9:08 am, Jumpfroggy wrote: > On Aug 10, 2:24 pm, dartdog wrote: > > > Big help!! Had just started getting using too much memory notices from > > Webfaction yesterday evening... > > Yeah, I didn't even pay attention till I hit about 120-140MB on my > 80MB plan and got everything turn

Re: Apache mod_wsgi Django setup - Forbidden You don't have permission to access /mysite on this server.

2009-08-11 Thread Graham Dumpleton
On Aug 12, 12:13 am, justin jools wrote: > Ive been the install instructions in > :http://wiki.thinkhole.org/howto:django_on_windows%E2%80%8F > (with mod_wsgi) > > install python 26, Apache 2.2, modwsgi ap2.2 py26 > > and apache loads modwsgi fine. > > when I check localhost: apache says - It

Re: Deploying django on apache - cant access database

2009-08-11 Thread Graham Dumpleton
For SQLite database, the directory the database is in must also be writable to user that Apache runs as. The location of the database in settings file must also be an absolute path, can't use a relative path. BTW, what is: Alias test.django.com "/Users/someone/djangoproject/appname" for in co

Re: Deploying django on apache - cant access database

2009-08-12 Thread Graham Dumpleton
t; setup is working and I ca get on with actually developing the app > better as well as trying to master the django framework > > Thomas > > On 12 Aug, 00:02, Graham Dumpleton wrote: > > > > > For SQLite database, the directory the database is in must also be >

Re: Problem with getting setting up apache server for django

2009-08-13 Thread Graham Dumpleton
On Aug 14, 3:08 pm, NiJoMi wrote: > Hi > I am a complete novice with Django, and have run into a problem > getting it to run on a wamp server. > I have managed to install Python v2.6.1, WampServer2, mod_wsgi, > PostgreSql, psycopg2 and Django onto WindowsXP Professional SP3 in > order to make a

Re: Problem with getting setting up apache server for django

2009-08-14 Thread Graham Dumpleton
] [error] [client 127.0.0.1]     import > socket > [Fri Aug 14 08:14:40 2009] [error] [client 127.0.0.1]   File "C:\ > \Python26\\lib\\socket.py", line 46, in > [Fri Aug 14 08:14:40 2009] [error] [client 127.0.0.1]     import > _socket > [Fri Aug 14 08:14:40 200

Re: Problem with getting setting up apache server for django

2009-08-14 Thread Graham Dumpleton
lease do not go posting a tutorial. Half the problem is that people who don't really understand what they are doing post their tutorials and the net gets polluted with them and people can't find the real documentation in the noise. End result is that they use some ones partially inaccurat

Re: Using glovar vars

2009-08-14 Thread Graham Dumpleton
On Aug 14, 10:13 pm, Jani Tiainen wrote: > Steve Patrick kirjoitti: > > > Hi everybody, > > I´m new in Django and maybe my problem is a bit stupid...I would like > > to use a global variable (for all the application) to store some info > > No you don't want to. And even it's possible in theory,

Re: mod_wsgi question

2009-08-15 Thread Graham Dumpleton
On Aug 16, 11:56 am, tdelam wrote: > Hi Clifford, > > Thanks for replying, so If I understand this correctly, I will need to > recompile mod_wsgi with that directive set to the new python binary? No. It generally should be sufficient to use the --with-python option to 'configure' script when b

Re: Using glovar vars

2009-08-15 Thread Graham Dumpleton
On Aug 16, 1:11 am, Jani Tiainen wrote: > Graham Dumpleton kirjoitti: > > > > > > > > > On Aug 14, 10:13 pm, Jani Tiainen wrote: > >> Steve Patrick kirjoitti: > > >>> Hi everybody, > >>> I´m new in Django and maybe my problem

Re: Django and stackless python

2009-08-16 Thread Graham Dumpleton
Did you actually bother to reinstall mod_python after you nuked your original Python installation. Likely when reinstalling it you lost everything that was in prior site-packages and so are missing the Python module component bits of mod_python, ie., no longer installed. If from command line stac

Re: Django and stackless python

2009-08-16 Thread Graham Dumpleton
> import mod_python > > Traceback (most recent call last): >   File "", line 1, in > ImportError: No module named mod_python > > > > so nope  :( > > Alan > > On Aug 16, 2:01 pm, Graham Dumpleton > wrote: > > > > > Did you actual

Re: Django and stackless python

2009-08-16 Thread Graham Dumpleton
hinking about using mod_wsgi myself... > > > I'll investigate mod_wsgi setup. > > > Should i keep something in mind now that i have stackless instead of > > regular python? > > > Alan. > > > On Aug 16, 2:37 pm, Graham Dumpleton > > wrote: > >

Re: Problem with getting setting up apache server for django

2009-08-16 Thread Graham Dumpleton
gt;         django.wsgi: >         import os >         import sys > >         sys.path.append('E:/Django/djangotest') >         sys.path.append('C:/imfree/bin/Python26/Lib/site-packages/django') Why are you adding site-packages directory Django directory. That will

Re: Problem with getting setting up apache server for django

2009-08-16 Thread Graham Dumpleton
On Aug 17, 4:33 pm, Graham Dumpleton wrote: > On Aug 17, 2:43 pm, NiJoMi wrote: > > > Done a reinstall and checked each step. > > --- > > Step 1: Installed WampServer2 and verified working > >         Location: C:

Re: Django "freezing" after a few minutes?

2009-08-19 Thread Graham Dumpleton
On Aug 20, 1:01 am, erikcw wrote: > Hi, > > I'm running Django through mod_wsgi and Apache (2.2.8) on Ubuntu 8.04. > > I've been running Django on this setup for about 6 months without any > problems. Yesterday, I moved my database (postgres 8.3) to its own > server, and my Django site started

Re: mod_python problem

2009-08-20 Thread Graham Dumpleton
On Aug 21, 12:34 pm, Bryan Fordham wrote: > Also tried switching to wsgi, just to see if it would make a > difference. It didn't. > > I'm seriously stumped Is the page truly blank? Ie., have you gone 'View Source' in the browser to see what is returned. Are you sure you haven't stuffed up some

Re: Fastest http+sql server combination

2009-08-24 Thread Graham Dumpleton
On Aug 25, 6:19 am, Michael wrote: > On Mon, Aug 24, 2009 at 3:57 PM, Léon Dignòn wrote: > > > Hello, > > > there are plenty of possible combinations out there. The suggested one > > is apache and mod_wsgi, but in the docs is also mentioned, that > > fastcgi could be faster if configured prope

Re: First time deploying Django project

2009-08-26 Thread Graham Dumpleton
On Aug 26, 7:51 pm, Kenneth Gonsalves wrote: > On Wednesday 26 Aug 2009 2:42:47 pm HB wrote: > > > Hey, > > I'm trying to deploy my first Django application to Apache. > > The project is located under:  /home/me/SshConnector/ > > Here is my configuration: > > > > >         Options Indexes Foll

Re: First time deploying Django project

2009-08-26 Thread Graham Dumpleton
rror: Could not import settings 'SshConnector.settings' (Is it > on sys.path? Does it have syntax errors?): No module named > SshConnector.settings This can occur because Apache normally runs as a special user and that user will need permissions to access the files in your home account. The erro

Re: How do you configure django+http+ftp?

2009-08-30 Thread Graham Dumpleton
On Aug 31, 6:30 am, Léon Dignòn wrote: > And causes new ones. My apache runs other also websites. Don't run the whole Apache as a different user. Use mod_wsgi daemon mode and make just that daemon process running Django run as a different user. Graham > On Aug 30, 9:12 pm, Mike Ramirez wrot

Re: Database connection closed after each request?

2009-08-31 Thread Graham Dumpleton
On Aug 31, 8:47 pm, Mike wrote: > Hi, > > I also would like to note that this code is not threadsafe - you can't > use it with python threads because of unexpectable results, in case of > mod_wsgi please use prefork daemon mode with threads=1 Provided you set WSGIApplicationGroup to %{GLOBAL}

Re: Django and SSL Deployment using mod_wsgi

2009-08-31 Thread Graham Dumpleton
On Sep 1, 3:39 am, Francis wrote: > We setup a Nginx proxy in front of Apache/WSGI and got Nginx to handle > the SSL cert and simply pass on a flag to WSGI if the connection was > coming through http or https. > > Next you'll want a SSL middleware, we > use:http://www.djangosnippets.org/snippe

Re: Django and SSL Deployment using mod_wsgi

2009-09-01 Thread Graham Dumpleton
referring to the is_secure check of the WSGI middleware. If you want the redirect, although that also can be done in various ways using Apache as well, then yes, you would still require it. Graham > Thanks, > Alex > > On Aug 31, 6:02 pm, Graham Dumpleton > wrote: > > > > > On

Re: Same application with different URLs

2009-09-05 Thread Graham Dumpleton
On Sep 5, 6:54 am, Petr Tuma wrote: > One more note, just if somebody else runs into this. > > Apparently, the problem with this solution is that under certain > conditions, SetEnv from one virtual host can be visible inside the > Python interpreter associated with another virtual host. Since >

Re: regex problem in urls.py in Django 1.1/mod_wsgi

2009-09-05 Thread Graham Dumpleton
On Sep 6, 3:52 pm, Karen Tracey wrote: > On Sun, Sep 6, 2009 at 1:36 AM, Jim Myers wrote: > > > Thanks, but that doesn't do it either. > > I changed the regex to: > > > ^portal/student/(?P\S+)/profile_edit/$ > > > and it still doesn't match :( > > It should: > > >>> import re > >>> re.match(r'

Re: apache2+mod_wsgi: 403 Forbidden

2009-09-08 Thread Graham Dumpleton
On Sep 9, 12:28 am, Matias wrote: > sorry, I messed up! > > I'm not sure now, i couldn't test it, but maybe you should set the Directory > directive in the specific path where wsgi files are > > >        Order Allow,Deny >        Deny from all > > Don't use wildcards, ie., '*', like that, i

Re: IOError: request data read error on POST, anyone solved this?

2009-09-09 Thread Graham Dumpleton
On Sep 9, 8:09 pm, "jeremias.kangas" wrote: > Hi all, > > This error started popping on last sunday, and it keeps happening > pretty randomly, like 1-2 times a day. I read from the internet that > this problem seems to be pretty common, though didn't find out if > anyone had any success solving

Re: Snow Leopard Issues?

2009-09-10 Thread Graham Dumpleton
On Sep 11, 9:38 am, Anthony wrote: > Has anyone running Django on their MacBook updgraded to Snow Leopard > successfully?  I've been holding off to avoid any potential hassles, > but with the release of 10.6.1, would like to do it soon. > > - Python 2.5 > - Django 1.0.2 (although I may upgrade

Re: django deploy problem

2009-09-11 Thread Graham Dumpleton
On Sep 11, 7:05 pm, Mike Ramirez wrote: > On Friday 11 September 2009 01:52:10 lfrodrigues wrote: > > > > > > > Hi, > > > I want to deploy 2 django sites in different subdirectories so I have: > > > > >   > >       SetHandler python-program > >       PythonHandler django.core.handlers.modpyth

Re: Call function on server start

2009-03-24 Thread Graham Dumpleton
On Mar 25, 11:53 am, Malcolm Tredinnick wrote: > On Tue, 2009-03-24 at 14:59 -0700, JGAllen23 wrote: > > Is there any way to call a function on server start?  I have some > > maintenance stuff that I'd like to run on server start (both manage.py > > runserver and apache reload).  Is there any w

Re: What's the most scalable Django deployment out there currently?

2009-03-24 Thread Graham Dumpleton
On Mar 25, 3:45 pm, Alex Gaynor wrote: > On Wed, Mar 25, 2009 at 12:43 AM, Adam V. wrote: > > > Curse (http://www.curse.com/) manages to stay up on WoW patch day, so > > that's a pretty good sign. > > Curse is no longer running on Django(it's ASP.net now I think), no idea if > that was a techn

Re: What's the most scalable Django deployment out there currently?

2009-03-25 Thread Graham Dumpleton
On Mar 26, 12:41 am, Oli Warner wrote: > David, slightly off-topic, but you should see some impressive gains if you > move your static handling off Apache onto something lighter > (Cherokee/Lighttpd/nginx/etc) and reverse-proxy the dynamic stuff through to > a localhost-bound Apache. > > Hell,

Re: Auth (or session?) issue and www prefix

2009-03-25 Thread Graham Dumpleton
On Mar 26, 11:04 am, Julien Phalip wrote: > Hi there, > > If I login on my site on example.com, and then visitwww.example.com > it asks me to login again. I can't tell if it's an issue with > contrib.auth or contrib.session, or if that's a problem with my Apache > configuration. My guess is tha

Re: Updating a model method

2009-03-30 Thread Graham Dumpleton
On Mar 31, 1:43 am, Thomas Guettler wrote: > Hi, > > If you only change the method, but no model, you don't need to call 'syncdb'. > > If your webserver is configured correct, then you just need to hit ctrl-r > (reload > in firefox). > > This should work if you use the development server of dj

Re: Serving static content

2009-03-30 Thread Graham Dumpleton
On Mar 31, 10:37 am, Jack Orenstein wrote: > I have my first Django app running, but with very basic html. I'm   > trying to add my first tag and finding it difficult to serve up   > the image file. > > I've read this:http://docs.djangoproject.com/en/dev/howto/static- > files/?from=olddocs, wh

Re: dev server vs. real server oddity

2009-03-30 Thread Graham Dumpleton
You don't say whether you are using mod_python, mod_wsgi or fastcgi. Knowing may be important. Graham On Mar 31, 11:59 am, dls wrote: > I'm running a Django blog on Webfaction using the Byteflow engine, and > I'm having an issue where this url: > > http://realvelour.com/blog/2009/ > > works fin

Re: IOError: request data read error (revisited)

2009-03-31 Thread Graham Dumpleton
On Apr 1, 1:34 am, akaihola wrote: > We ran into the same issue Chunlei Wu described in January[1]. A user > was trying to upload large files and all we got were 500 errors by e- > mail: > >   File "/home/citedesarts/src/django/django/http/multipartparser.py", > line 406, in read > IOError: req

Re: Mod_wsgi and mod_python

2009-04-02 Thread Graham Dumpleton
On Apr 2, 5:20 pm, Pythoni wrote: > I am using Django with mod_python and it works but during peak times > ( heavy loads about 50 Apache jobs), the system is almost hanged > Is it  worth changing from mod_python into mod_wsgi? > What would I get or lose? Read: http://blog.dscpl.com.au/2009/

Re: Django domain handling and shortcut url, strange

2009-04-02 Thread Graham Dumpleton
See: http://docs.djangoproject.com/en/dev/ref/settings/#setting-SESSION_COOKIE_DOMAIN Graham On Apr 2, 8:28 pm, coulix wrote: > Hi, > > i have the following domainwww.foo.comand an alias foo.com > When i post a comment i want to redirect to the submit page so i use a > wrapper for this: > >

Re: RSS producing wrong link from get_absolute url

2009-04-02 Thread Graham Dumpleton
What do you have 'django.root' option set to in Apache configuration related to mod_python? Graham On Apr 3, 9:23 am, John Baker wrote: > I have a strange problem with simple RSS feeds. It works fine locally > on my development machine but when I deploy to the test server running > through mod_

Re: Reacting to browser closing the socket

2009-04-04 Thread Graham Dumpleton
On Apr 4, 4:44 pm, Marcus Weseloh wrote: > Hi Malcom, > > thanks for your response! > > On Sat, 04 Apr 2009 12:21:11 +1100 > > Malcolm Tredinnick wrote: > > You're not really trying to solve a valid problem here. The > > development server isn't intended for streaming data or anything like > >

Re: wsgi.WSGIHandler:how to get a WebOb Request at first place

2009-04-06 Thread Graham Dumpleton
On Apr 7, 2:33 pm, Coonay wrote: > i want to get a WebOb Request ASAP when the WSGIHandler is called,such > as retrieve the SERVER_NAME and SERVER_PORT meta information from the > request,my stupid idea is in the line 261 of wsgi.py that add > following : > >         server_name =  request.META

Re: Running django on a web hosting account

2009-04-06 Thread Graham Dumpleton
On Apr 7, 12:13 pm, dls wrote: > Webfaction is not free, but offers some > pretty impressive setups for Django websites (as well as many other > language), and have competitive pricing. > > They will do an install of the necessary libraries and modules for > whateve

Re: wsgi.WSGIHandler:how to get a WebOb Request at first place

2009-04-06 Thread Graham Dumpleton
On Apr 7, 4:31 pm, Coonay wrote: > On Apr 7, 12:54 pm, Graham Dumpleton > wrote: > > > On Apr 7, 2:33 pm, Coonay wrote: > > > > i want to get a WebOb Request ASAP when the WSGIHandler is called,such > > > as retrieve the SERVER_NAME and SERVER_PORT meta i

Re: Something is eating memory. How to track it down?

2009-04-08 Thread Graham Dumpleton
On Apr 8, 5:43 pm, Andy Baker wrote: > Wow! So Python will eat RAM until restarted? That changes the way I am > thinking about this problem. > > So the trick will be tweaking the number of processes and the number of > requests allowed between a restart. I know one item requests a big chunk of

Re: Django Deployment Methods: Survey (via DjangoSites)

2009-04-08 Thread Graham Dumpleton
Is the list of options on the site somewhere where a login isn't required? I had a dig around when you first mentioned this, but couldn't find it. Can you also point at a particular site which has the option selected so can see how it presents in site information? Can one also search by the infor

Re: Django Deployment Methods: Survey (via DjangoSites)

2009-04-09 Thread Graham Dumpleton
On Apr 9, 5:15 pm, Ross Poulton wrote: > > Sorry if these things might be obvious and I have missed them. Right > > now djangosites isn't even responding properly from where I am. > > Browser not able to get down styling.css properly. Maybe your > > mod_python died from all the traffic. (Hint)

Re: Sending large, generated files

2009-04-14 Thread Graham Dumpleton
On Apr 15, 7:49 am, Alex Loddengaard wrote: > I've found several messages on this list discussing ways to send large files > in a HttpResponse.  One can use FileWrapper, or one can use a generator and > yield chunks of the large file.  What about the case when the large file is > generated at H

Re: Target WSGI script cannot be loaded as Python module

2009-04-14 Thread Graham Dumpleton
On Apr 15, 12:07 pm, Thierry wrote: > I'm currently running Apache 2.2 on Windows and I can get the hello > world of modwsgi to run.  However, when I configure my Django project, > Apache has the following errors from the error.log file: > > mod_wsgi (pid=5956): Target WSGI script 'C:/django_pr

Re: Leopard deploy directory?

2009-04-15 Thread Graham Dumpleton
On Apr 15, 9:26 pm, Ayaz Ahmed Khan wrote: > On 14-Apr-09, at 4:12 AM, Shannon wrote: > > > > > Hi -- I am working on a django-powered site on Leopard server.  Where > > is the recommended/conventional deployment directory?  Every example I > > see uses a particular user's home directory, but t

Re: Django request.POST is truncating data when 'Content-Encoding', 'gzip' is set in client request

2009-04-15 Thread Graham Dumpleton
On Apr 15, 7:44 pm, usaar33 wrote: > I just looked at the source code.  This is a django bug. > Ticket filed @http://code.djangoproject.com/ticket/10819 When Apache is decompressing the content you run up against a limitation in way mutating input filters are dealt with. Namely, when request

Re: Django request.POST is truncating data when 'Content-Encoding', 'gzip' is set in client request

2009-04-15 Thread Graham Dumpleton
Oh, reading past content length also will not necessarily work in mod_python due to bugs it has: http://issues.apache.org/jira/browse/MODPYTHON-212 If you read in blocks may be okay, but not if you try and read all data in one go. Graham On Apr 15, 8:44 pm, Graham Dumpleton wrote: > On

Re: Sending large, generated files

2009-04-15 Thread Graham Dumpleton
On Apr 16, 1:36 am, Rick Wagner wrote: > > From memory, file wrappers at django level, in order to work across > > different hosting mechanisms supported, only allow a file name to be > > supplied. At the WSGI level the file wrapper actually takes a file > > like object. If you were doing this

Re: Django request.POST is truncating data when 'Content-Encoding', 'gzip' is set in client request

2009-04-15 Thread Graham Dumpleton
unked request content, nor does mod_python. Apache/ mod_wsgi 3.0 does allow chunked request content, but again, to make use of it you are stepping outside of what WSGI 1.0 allows. Graham > On Apr 15, 3:55 am, Graham Dumpleton > wrote: > > > Oh, reading past content length al

Re: Django-Apache internationalization issue

2009-04-18 Thread Graham Dumpleton
On Apr 18, 7:30 pm, gurcharan wrote: > Hi > > I've used Django i18n module to implement internationalization in my > site. I'm facing a strange issue - 118n is working on Django webserver > but not on Apache and also no error message is getting logged. > > Can anyone have any clue why it's happ

Re: Problem with non-flup WSGI handler and Django

2009-04-18 Thread Graham Dumpleton
On Apr 18, 3:43 pm, "drumscan...@gmail.com" wrote: > Hi, > > I wrote a replacement for 'flup' to attach Django to IIS7 FastCGI. My > WSGI handler works OK with non-Django applications, but when I use > WSGIHandler from Django, I cannot resolve any URL under the root. > Problem, I believe, is in

Re: Optimal Django / Apache / mod_wsgi configuration

2009-04-19 Thread Graham Dumpleton
On Apr 20, 1:08 pm, Greg wrote: > Hi all, > > My django sites and static media are currently served by the same > multi-process apache installation, and I'm wondering if it would be > more efficient — memory-wise — to have a completely seperate apache > install for media (listening to a seperat

Re: Optimal Django / Apache / mod_wsgi configuration

2009-04-19 Thread Graham Dumpleton
On Apr 20, 2:34 pm, Greg wrote: > Cheers for your suggestion Alex, I'll look into nginx. > > > How are you currently using mod_wsgi? Are you using embedded mode or > > daemon mode? Also, which Apache MPM are you using? Finally, do you > > have requirements to run crap like PHP on the same Apach

Re: installing a development environment on a 1and1.com shared hosting.

2009-04-21 Thread Graham Dumpleton
On Apr 22, 7:16 am, Didine wrote: > Hello, > > Is there any way to install & deploy a django application on a > 1and1.comshared hosting ? > Thanks for you help. What type of plans do they offer and what are you trying to use? There is currently a discussion going on on mod_python list about c

Re: Webpy vs Django [and how to ask questions the smart way]

2009-04-22 Thread Graham Dumpleton
On Apr 23, 10:00 am, James Bennett wrote: > On Wed, Apr 22, 2009 at 3:04 PM, Phil Mocek > > wrote: > > That depends on how you look at things.  I've been referencing Eric S. > > Raymond's essay, "How to Ask Questions the Smart Way" [2], on this list > > recently, because I'm not used to such p

Re: Decimal to Decimal nightmare

2009-04-25 Thread Graham Dumpleton
On Apr 25, 12:37 am, Newt wrote: > Hello, > > in my latest application I have models with like 15 Decimal fields, > with different decimal places. > > when I try to save an object of that model, I get sometimes (often, > but not always) this error: > >   File "/home/newt/django/1.0/sites/cdms/i

Re: Decimal to Decimal nightmare

2009-04-25 Thread Graham Dumpleton
t; > Ales > > On Apr 25, 12:40 pm, Graham Dumpleton > wrote: > > > On Apr 25, 12:37 am, Newt wrote: > > > > Hello, > > > > in my latest application I have models with like 15 Decimal fields, > > > with different decimal places. > > >

Re: Decimal to Decimal nightmare

2009-04-25 Thread Graham Dumpleton
d added the interpreter directive. And now I'll > try it... > > Ales > > On Apr 25, 1:17 pm, Graham Dumpleton > wrote: > > > Presuming you are only running the one web application on the server, > > do things improve it you add directive: > > >   Pytho

Re: Enable request timeout?

2009-05-04 Thread Graham Dumpleton
On May 5, 3:36 am, Shadow wrote: > Hi, > > I'm developing my site at the moment (locally) and it has an infinite > loop somewhere. But my requests aren't timing out. The apache > processes just get larger and larger, till I have to kill apache. > > I'm guessing I need to set a timeout setting,

Re: TIME_ZONE problem

2009-05-06 Thread Graham Dumpleton
On May 6, 4:38 am, George Song wrote: > On 5/5/2009 6:48 AM, Michel Thadeu Sabchuk wrote: > > > > > Hi guys, > > > I'm having a weird problem with TIME_ZONE settings. Some view list > > objects based on the time, future time objects are not shown. > > > The problem is that sometimes all objects

Re: TIME_ZONE problem

2009-05-07 Thread Graham Dumpleton
On May 7, 2:41 am, George Song wrote: > On 5/6/2009 4:02 AM, Graham Dumpleton wrote: > > > > > > > On May 6, 4:38 am, George Song wrote: > >> On 5/5/2009 6:48 AM, Michel Thadeu Sabchuk wrote: > > >>> Hi guys, > >>> I'

Re: apache maximum users config

2009-05-13 Thread Graham Dumpleton
On May 14, 12:08 am, knight wrote: > Hi, > > I have a django application running on apache2 with default > httpd.conf. > Is anybody knows a simple way to configure apache2 (httpd.conf) for > the best performance. > I mean allow maximum amount of simultaneous users? There is no answer we can pr

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-14 Thread Graham Dumpleton
On May 14, 7:14 pm, Valery Khamenya wrote: > Hi, > > I have 2 issues that presumably could be related: > > 1. when I totally stop apache, I see that some apache processes remain > running. When I repeat the stop operation, apache says that apache is not > running, whereas the processes do exist

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-14 Thread Graham Dumpleton
On May 14, 11:08 pm, Valery wrote: > By the way, regarding the 30 func calls per HTTP request you'd mean > it is a bare conflict WSGI vs mod_python? That is likely to be a Django issue, you will have to explain that one better and maybe someone else can help. Graham --~--~-~--~~--

Re: Get ServerName in settings.py

2009-05-21 Thread Graham Dumpleton
On May 21, 11:51 pm, Donn Ingle wrote: > Hi, > Given that my apache uses many VirtualHosts and within each a ServerName, > how can I get that ServerName into a variable in my settings.py file? > > I am usingWSGIand mod_python. (different setups on dev vs. server) > > The reason is that I need t

Re: Installing django

2009-05-21 Thread Graham Dumpleton
On May 22, 10:51 am, LeonTheCleaner wrote: > How about I pay someone $20 to do this for me? I just wanna work on > the python codet, instead of dealing with django installation. Seems > like a fair trade for me. > > On May 21, 5:34 pm, LeonTheCleaner wrote: > > > Thanks guys. So after I instal

Re: IOError: request data read error (revisited)

2009-05-21 Thread Graham Dumpleton
_Response to try and capture request content and response to see how much of the request is actually being received. BTW, are you using mod_wsgi embedded mode or daemon mode? Also post an actual example traceback and what errors you get in the Apache error log just to validate the nature of the probl

Re: What, if any, Apache modules are required to implement Django authentication?

2009-05-23 Thread Graham Dumpleton
On May 23, 5:59 am, palewire wrote: > The default httpd.conf loaded on my CentOS server contains the > following authentication modules. > > LoadModule auth_basic_module modules/mod_auth_basic.so > LoadModule auth_digest_module modules/mod_auth_digest.so > LoadModule authn_file_module modules/m

Re: running django with wsgi over apache

2009-05-24 Thread Graham Dumpleton
On May 25, 3:42 am, Sam Chuparkoff wrote: > On Sun, 2009-05-24 at 13:27 -0300, Gabriel wrote: > > The problem was with one of the applications 'profile'. It seems it > > already exists somewhere. > > Correct, there is a standard python module called profile. > > $ python > Python 2.6.2 (r262:71

Re: IOError: request data read error (revisited)

2009-05-25 Thread Graham Dumpleton
7;/var/www/domain.com/django.wsgi', >  'SCRIPT_NAME': u'', >  'SCRIPT_URI': 'http://domain.com/ajax/random_items/', >  'SCRIPT_URL': '/ajax/random_items/', >  'SERVER_ADDR': 'xx.xx.xx.xx', >  'SE

Re: What, if any, Apache modules are required to implement Django authentication?

2009-05-25 Thread Graham Dumpleton
; > > [1]: > >http://docs.djangoproject.com/en/dev/topics/auth/#other-authenticatio... > > [2]:http://docs.djangoproject.com/en/dev/howto/apache-auth/?from=olddocs > > [3]:http://docs.djangoproject.com/en/dev/howto/auth-remote-user/ > > > have a nice day! > > > On May 23,

Re: What, if any, Apache modules are required to implement Django authentication?

2009-05-26 Thread Graham Dumpleton
of processes. So, what is the real problem you are trying to solve? Graham > Thanks again, > > Ben. > > On Mon, May 25, 2009 at 4:07 PM, Graham Dumpleton < > > graham.dumple...@gmail.com> wrote: > > > On May 26, 5:20 am, Ben Welsh wrote: > >

Re: What, if any, Apache modules are required to implement Django authentication?

2009-05-26 Thread Graham Dumpleton
mode? Are you hosting static files on the same web server? Are you running PHP crap on the same server inside of Apache? And finally, have you fiddled with the default KeepAlive/Timeout Apache directives? Graham > On Tue, May 26, 2009 at 11:10 PM, Graham Dumpleton < > > graham.dumpl

Re: What, if any, Apache modules are required to implement Django authentication?

2009-05-27 Thread Graham Dumpleton
  mod_so.c > > httpd.conf... > Timeout 20 > KeepAlive Off > MaxKeepAliveRequests 100 > KeepAliveTimeout 5 > > > StartServers       2 > MinSpareServers    2 > MaxSpareServers    5 > ServerLimit      200 > MaxClients       200 > MaxRequestsPerChild

Re: Environmental variables not recognized by mod_python

2009-05-27 Thread Graham Dumpleton
On May 27, 6:13 pm, emy_66 wrote: > My django site isn't able to read my environmental variable - PATH - > when run by mod_python. In my .profile file my path is /usr/local/ > ncbi:/usr/local/bin. This gives me access to programs I call using > subprocess from django. Could I get your advice as

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-27 Thread Graham Dumpleton
.wsgi file isn't doing what you think it does for prefork/embedded mode. Read: http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode Graham > regards > Valery > > On May 15, 1:55 am, Graham Dumpleton > wrote: > > > On May 14, 11:08 pm, Valery wrote: > > >

Re: Troubles after switching to WSGI: lost apache processes, multiple view func calls per HTTP request

2009-05-27 Thread Graham Dumpleton
On May 28, 5:42 am, Valery Khamenya wrote: > Hi Karen, > > I appreciate very much your reply, thank you. > > the line is injected, it does logging fine, let's wait for the next > occurrence. (yep, things are not reproducible) Also see: http://code.google.com/p/modwsgi/wiki/DebuggingTechniq

Re: Internationalization and Apache

2009-05-28 Thread Graham Dumpleton
On May 28, 11:56 pm, Damien MATHIEU <4...@dmathieu.com> wrote: > Hi, > > Using the internal web server, I correctly load every language string > located in application_path/locale/language/LC_MESSAGES/django.mo > But whenever I use Apache, they don't appear to be loaded anymore. > > However it a

Re: Format dates using a specific locales under mod_python

2009-05-28 Thread Graham Dumpleton
On May 28, 10:16 pm, luper rouch wrote: > By default, dates are formated in English (things like .strftime("%A") > return days names in English). > > I tried to put locale.setlocale(locale.LC_TIME, 'fr_FR.UTF-8') in the > settings file and it works well on the development server. The problem >

Re: Internationalization and Apache

2009-06-02 Thread Graham Dumpleton
n > > > environment problem, specifically related to the locale environment > > > variables.  Perhaps if you follow Graham's advice below about writing a > > > view > > > that displays os.environ variables and compare the values between > > > development s

Re: Bug in admin related to django.root

2009-06-03 Thread Graham Dumpleton
On Jun 4, 9:56 am, Kevin Audleman wrote: > Hi gang, > > I am serving my django website out of a sub-folder, > e.g.http://www.mydomain.com/directory. My hosting provider is WebFaction > and they've set things up so that the /directory part is stripped from > the URL before it reaches my django

Re: Can't find templates (?) when deploying with Apache and mod_wsgi

2009-06-03 Thread Graham Dumpleton
You do realise that Apache will generally run your application as a special user. If that special user doesn't have read access to stuff, then things can not work properly. See: http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Access_Rights_Of_Apache_User There is a lot of documentatio

Re: Using Django authentication for web pages outside Django?

2009-06-05 Thread Graham Dumpleton
Have a look at: http://www.openfusion.com.au/labs/mod_auth_tkt/ Graham On Jun 6, 6:26 am, Adam Stein wrote: > I'm trying to figure out a way to use Django authentication to control > access to web pages (on the same web server) that are NOT under Django. > > I have found some information reg

Re: Permission Denied: /tmp/python.cache_root

2009-06-09 Thread Graham Dumpleton
Do you run more than one instance of Django on the same machine, whether they be production or development systems? If you run multiple Django instances and they run as different users, as would often be case where running development Django on same box and production runs as Django, it is bad pr

Re: Problem with deployment in apache

2009-06-10 Thread Graham Dumpleton
On Jun 10, 10:12 pm, newbie wrote: >  Hi, >          I deployed my django project in apache. But its working, If i > keep it in /var/www/html. Its not working if  I keep my project in the > Home directory. Its giving the error permission denied. ny idea?? Read: http://code.google.com/p/modwsg

Re: How can I get consistent url mappings on both apache+mod_wsgi and the development server.

2009-06-11 Thread Graham Dumpleton
On Jun 12, 4:23 am, peta wrote: > I have django running under apache+mod-wsgi with... > >       WSGIScriptAlias /tools     /blah/blah/blah/tools.wsgi > > so http:server/tools/thingy cranks up the thingy tool.  Because > mod_wsgi strips off the /tools part the urlpatterns just have to match > th

Re: Permission Denied: /tmp/python.cache_root

2009-06-11 Thread Graham Dumpleton
which is getting this error > has none of that in its settings files, so it is defaulting to > whatever django 1.0 defaults to.  Is there a way to force the instance > of django to not share this cache? > > On Jun 9, 4:42 pm, Graham Dumpleton > wrote: > > > > > Do y

Re: Memory usage

2009-06-11 Thread Graham Dumpleton
On Jun 12, 11:51 am, Miles wrote: > Or rather - how to keep the server from blowing up. I've searched the > web before, but nothing I've found solves the problem. > > Some background info - I'm running worldoflogs.com, a site that gets > around 100 concurrent requests during rush hour and still

Re: How do you handle scheduled downtime?

2009-06-14 Thread Graham Dumpleton
On Jun 15, 3:32 am, soniiic wrote: > Hello, > > I've been wondering how django devs handle scheduled downtime? Do you > use a different urls.py to always redirect someone to a 'service > unavailable' page? > > Or is there something fancy that you do? If using Apache/mod_wsgi and its daemon mod

Re: Developing on Apache w/ mod_python

2009-06-16 Thread Graham Dumpleton
On Jun 17, 4:09 am, "sstein...@gmail.com" wrote: > On Jun 16, 2009, at 2:00 PM, gte351s wrote: > > > > > Gabriel - thanks for the quick response. > > Sorry for the delay in answering, I was away for a bit :) > > > I had some issues with the setup, but I think I'll > > put it on hold for a bit a

Re: subdomain vs. prefix

2009-06-16 Thread Graham Dumpleton
On Jun 17, 12:55 am, "eric.frederich" wrote: > Someone on freenode's  #django mentioned using djblets to accomplish > this.http://www.chipx86.com/blog/2008/04/03/django-development-with-djblet... > > It did not work. > > With "WSGIScriptAlias /apps /path/to/django_application/apache/ > django.w

Re: Is Django multithread safe in Apache or isn't it?

2009-06-18 Thread Graham Dumpleton
On Jun 18, 4:49 pm, "I.S." wrote: > http://code.djangoproject.com/wiki/DjangoSpecifications/Core/Threading > states that "as of 1.0.2, Django has no known threading bugs," and > then promptly goes on to list a lot of annoying things you have to do > in a multithreaded system. Do you or don't yo

Re: Developing on Apache w/ mod_python

2009-06-18 Thread Graham Dumpleton
On Jun 19, 2:49 pm, gte351s wrote: > Graham - Great post, I'll give mod_wsgi a try. Thanks. > > And thanks for all the replies. Here's the configuration file I ended > up > using, which worked (kinda): > > # > FILE-- > > LoadModule

<    1   2   3   4   5   6   7   8   9   10   >