Re: mod_wsgi sometimes gives error on first reload but not thereafter

2010-06-15 Thread Graham Dumpleton
On Jun 16, 9:16 am, Chris Seberino wrote: > I found the Apache error for this mod_wsgi error that only appears the > first time I reload an app after restarting Apache > > [Tue Jun 15 18:12:39 2010] [error] [client ] request > failed: error reading the headers, referer: http:// That error f

Re: Cannot import a module when deployed in Apache WSGI

2010-06-17 Thread Graham Dumpleton
On Jun 17, 6:28 pm, Dmitry Dulepov wrote: > Hi! > > Radhakrishna wrote: > > I have deployed my django project to Apache using mod_wsgi. In urls.py > > I am mapping "gateway/" to gateway.py which imports 'pyamf' module. > > The problem is, even though pyamf module is in python path, its not > > a

Re: Serving media files

2010-06-17 Thread Graham Dumpleton
On Jun 17, 9:17 pm, Jagdeep Singh Malhi wrote: > i am using this > linkhttp://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#howto-... > > In this link i am unable to under stand topic  SERVING MEDIA FILES > the lines(given below) which is used in this tutorial ,  i am able > understan

Re: Serving media files

2010-06-17 Thread Graham Dumpleton
y email told you where to find the files. You need to use Alias directives as documented to map to that directory or copy media files into project area and map to that directory instead. Graham > On Jun 17, 5:03 pm, Graham Dumpleton > wrote: > > > > > On Jun 17, 9:17 pm, Jagde

Re: Serving media files

2010-06-19 Thread Graham Dumpleton
On Jun 19, 3:18 pm, Jagdeep Singh Malhi wrote: > On Jun 17, 5:03 pm, Graham Dumpleton > wrote: > >  i copy the media  directory in  my  "/home/yourname/mysite" > directory. > > > Thus, run Python and go: > > > >>> import django >

Re: Serving media files

2010-06-19 Thread Graham Dumpleton
On Jun 20, 3:06 am, Jagdeep Singh Malhi wrote: > now my httpd.conf   file is :- > > Alias /media/ /usr/local/lib/python2.6/dist-packages/django/contrib/ > admin/media/ > > media/> > Order deny,allow > Allow from all > Change this to: Options Indexes Order deny,allow Allow from all

Re: Deploying Django with mod_wsgi

2010-06-19 Thread Graham Dumpleton
On Jun 20, 11:19 am, commonzenpython wrote: > im sorry, its causing an error 500, but i know its because of an error > in the httpd.conf file, but i dont know what, i have written the sript > WSGIScriptAlias / "/apache/ > dj_survey.wsgi" exactly how its supposed to be written but its still > cau

Re: Deploying Django with mod_wsgi

2010-06-19 Thread Graham Dumpleton
e wrong as have to assume hidden information. Graham On Jun 20, 11:39 am, Graham Dumpleton wrote: > On Jun 20, 11:19 am, commonzenpython > wrote: > > > im sorry, its causing an error 500, but i know its because of an error > > in the httpd.conf file, but i dont

Re: Deploying Django with mod_wsgi

2010-06-19 Thread Graham Dumpleton
On Jun 20, 12:48 pm, commonzenpython wrote: > thanks, i have seen the error logs and it says "could not import > settings "ash.settings" ( is it on sys path ?)"  ash is the name of my > project, also i didnt get a 500 error this time, my website just didnt > load, i added the following configura

Re: Deploying Django with mod_wsgi

2010-06-19 Thread Graham Dumpleton
On Jun 20, 1:08 pm, lzantal wrote: > Hi, > > If you add your project due to the sys.path then don't add the project   > name to  os.environ['DJANGO_SETTINGS_MODULE'] = 'ash.settings' > just add settings. Which can cause other problems if you have used site name as package prefix in module impor

Re: Deploying Django with mod_wsgi

2010-06-19 Thread Graham Dumpleton
On Jun 20, 1:42 pm, lzantal wrote: > Hi > > On Jun 19, 2010, at 20:20, Graham Dumpleton   > > wrote: > > > On Jun 20, 1:08 pm, lzantal wrote: > >> Hi, > > >> If you add your project due to the sys.path then don't add the   > >&g

Re: Serving media files

2010-06-20 Thread Graham Dumpleton
On Jun 20, 7:34 pm, Jagdeep Singh Malhi wrote: > in  which  file  i see  these lines . > >   > On Jun 20, 5:25 am, Graham Dumpleton > wrote: > > > > > On Jun 20, 3:06 am, Jagdeep Singh Malhi > > wrote: > > > > now my httpd.conf   file is :- >

Re: Serving media files

2010-06-20 Thread Graham Dumpleton
On Jun 20, 9:17 pm, Jagdeep Singh Malhi wrote: > On Jun 20, 3:08 pm, Graham Dumpleton > wrote: > > > On Jun 20, 7:34 pm, Jagdeep Singh Malhi > > wrote: > > > > in  which  file  i see  these lines . > > > >   > > > > yes  these links

Re: A Django project life cycle

2010-06-20 Thread Graham Dumpleton
On Jun 20, 10:07 pm, Sam Lai wrote: > If you want to run a piece of code on receiving a view HTTP request, > and a piece of code just before the response is sent to the user, look > into Django middleware > (http://docs.djangoproject.com/en/dev/topics/http/middleware/). That > is what it is spec

Re: Deploying Django with mod_wsgi

2010-06-20 Thread Graham Dumpleton
On Jun 21, 10:51 am, commonzenpython wrote: > Graham thanks for all your help, and patience,  i will read the the > information in the link you provided, this is the exact configuration > i added to the httpd.conf file : > > LoadModule wsgi_module modules/mod_wsgi.so > WSGIScriptAlias / /home/as

Re: djapian not working with apach2

2010-06-21 Thread Graham Dumpleton
On Jun 22, 12:03 am, watad wrote: > hi all, > > im using djapian for my search , it seems to work fine when i run it > in django development server > but when i configure my sites to use apach2 im always getting this > error when i try to search : > > "Caught OSError while rendering: [Errno 13]

Re: Deploying Django with mod_wsgi

2010-06-22 Thread Graham Dumpleton
On Jun 23, 2:35 am, commonzenpython wrote: > it turns out i have the __init__.py , so i changed the path as you > suggested but now i get this error : > > MOD_PYTHON ERROR > > ProcessId:      12182 > Interpreter:    'ashtangayogavideo.com' > > ServerName:     'ashtangayogavideo.com' > DocumentRo

Re: Deploying Django with mod_wsgi

2010-06-24 Thread Graham Dumpleton
On Jun 25, 6:00 am, commonzenpython wrote: > it would give me the same error, but with a different directory, Which as I already mentioned on mod_wsgi list, and referred you to the documentation about, this is because Apache runs as special user and needs to be able to write to the parent direc

Re: Serving django admin files using mod_python

2010-06-24 Thread Graham Dumpleton
On Jun 25, 8:32 am, Xavier Ordoquy wrote: > Le 25 juin 2010 à 00:23, commonzenpython a écrit : > > > im new to mod_python, so could you please tell me how to set ash/media > > to serve statically with apache > > Hi, > > The documentation about Django seems pretty clear about static media to me.

Re: Problem with static files (MEDIA_URL and MEDIA_ROOT)

2010-06-27 Thread Graham Dumpleton
On Jun 27, 10:53 pm, Denis Ricardo wrote: > Hello people! I am having any problems with static files (images, CSS) > in Django. I configured the MEDIA_URL and MEDIA_ROOT in settings.py > and when I execute the server and I go see the webpage, the static > files doesn't are encountered (the page

Slides for mod_wsgi talk available.

2010-06-27 Thread Graham Dumpleton
At PyCon Sydney this past weekend I did a talk about getting started with Apache/mod_wsgi. For some of that I used Django as an example. More importantly, the talk didn't cover how mod_wsgi worked but configuring it. This included coverage of all the common errors that come up when people do this,

Re: manage.py ignores DJANGO_SETTINGS_MODULE

2010-07-04 Thread Graham Dumpleton
Also read: http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html where I explain a bit about startup steps. Graham On Jul 5, 4:25 pm, "euan.godd...@googlemail.com" wrote: > If you read the source for django.core.management.__init__ you'll find > a function called "setup_envir

Re: WSGI documentation

2010-07-06 Thread Graham Dumpleton
On Jul 7, 3:56 am, Richard Shebora wrote: > This blog post by Graham Dumpleton could be listed > as additional reading for mod_wsgi implementations... > > http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html > > It clears up what look like real problems o

Re: Redirection to login screen goes to Apache root in non-root mod_wsgi based Django app

2010-07-06 Thread Graham Dumpleton
On Jul 7, 11:47 am, Oleg Lomaka wrote: > Exactly for your case, you may set LOGIN_URL point to > '/myapp/accounts/login/', but 'next' parameter still left > inaccurate.http://docs.djangoproject.com/en/dev/ref/settings/#login-url As far as I am concerned, Django should be inserting SCRIPT_NAME

Re: Redirection to login screen goes to Apache root in non-root mod_wsgi based Django app

2010-07-06 Thread Graham Dumpleton
On Jul 7, 12:01 pm, Graham Dumpleton wrote: > On Jul 7, 11:47 am, Oleg Lomaka wrote: > > > Exactly for your case, you may set LOGIN_URL point to > > '/myapp/accounts/login/', but 'next' parameter still left > > inaccurate.http://docs.djangoproje

Re: WSGI trouble

2010-07-06 Thread Graham Dumpleton
On Jul 7, 1:25 pm, John Griessen wrote: > John Griessen wrote: > > What causes the wsgi version of a buildout to have a problem with > > TIME_ZONE? > > I found that my libapache2-mod-wsgi package was too old. > > Perhaps a buildout for django needs to build specific versions of apache2 and > ws

Re: Redirection to login screen goes to Apache root in non-root mod_wsgi based Django app

2010-07-07 Thread Graham Dumpleton
t; > Jacob > > On Tue, Jul 6, 2010 at 10:13 PM, Graham Dumpleton < > > > > graham.dumple...@gmail.com> wrote: > > > On Jul 7, 12:01 pm, Graham Dumpleton > > wrote: > > > On Jul 7, 11:47 am, Oleg Lomaka wrote: > > > > > Exactly for yo

Re: mod_wsgi problem with installation

2010-07-10 Thread Graham Dumpleton
You have not supplied all the output, but likely that you don't have either python-dev or httpd-dev packages installed and so cant find header files for one of the other. Read the README in the mod_wsgi source code for requirements as to what must be installed on your system. Graham On Jul 10, 9:

Re: Admin site not formatted

2010-07-10 Thread Graham Dumpleton
Read: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/?from=olddocs#id1 It tells you about serving static files with mod_python. Graham On Jul 11, 3:50 am, octopusgrabbus wrote: > Using Apache and not the built-in Django web server, I can reach the > admin site, but it's not

Re: Mass Hosting on mod_wsgi?

2010-07-12 Thread Graham Dumpleton
On Jul 13, 1:04 am, ringemup wrote: > Hi folks -- > > I'm planning on mass hosting a SaaS project built on Django, using > Apache and mod_wsgi.  There will be hundreds of domains running off a > single copy of the project code; each domain has a different Site ID > and settings file, and can hav

Re: python logging and multiple process issue?

2010-07-12 Thread Graham Dumpleton
What is wrong with letting it log to stderr and thus the Apache error log files? Graham On Jul 13, 11:52 am, ydjango wrote: > Just checking, if anyone can point me to a good solution to it. Or > logging to sockets as in official doc is the best solution. > > On Jul 11, 9:35 am, ydjango wrote: >

Re: python logging and multiple process issue?

2010-07-12 Thread Graham Dumpleton
sys.stderr though and instead could just configure Python logging module to use sys.stderr and then you would use the logging module, allowing you configure what is and isn't logged. Graham > thanks > > On Jul 12, 8:18 pm, Graham Dumpleton > wrote: > > > > > What i

Re: Mass Hosting on mod_wsgi?

2010-07-13 Thread Graham Dumpleton
groups, is that you will need to restart Apache each time you add a new site. If that isn't very often, then quite acceptable. Graham > Thanks for your help! > Nan > > On Jul 12, 7:13 pm, Graham Dumpleton > wrote: > > > > > > > How much of the documentation o

Re: Mass Hosting on mod_wsgi?

2010-07-13 Thread Graham Dumpleton
igure out which of the options you presented we > should use.  I'm feeling confident about at least getting this running > now. Ensure you watch the video as well as that will explain slides better. Graham > On Jul 13, 7:11 pm, Graham Dumpleton > wrote: > > > > > On

Re: broken default view of the django admin site

2010-07-15 Thread Graham Dumpleton
On Jul 16, 12:51 pm, Brian Neal wrote: > On Jul 15, 2:05 pm, Colleen A Josephson wrote: > > > Hello, > > > I'm very new to django. I just set up my first site using apache and > > mod_wsgi. > > > The admin area does not seem to have the nice, neat blue default > > theme...its horrifically ugl

Re: Django memory requirements

2010-07-19 Thread Graham Dumpleton
On Jul 19, 11:41 pm, Tereno wrote: > Hi there, > > I have a few questions about Django deployment on production so > hopefully you can help me sort it out. > > Firstly, what's the minimum memory requirements for a Django + Apache > + mod_wsgi setup? It seems like my server ran out of memory when

Re: Error with Apache and mod_wsgi

2010-08-05 Thread Graham Dumpleton
On Aug 5, 12:27 pm, Vikas Mahajan wrote: > Hello to all. > I am new baby to python and django. I have installed the django-1.21 > in my pc. I am able to create mysite as mentioned in tutorial and > mysite also works fine using django web server (on port 8000), but now > I am trying to run mysite

Re: Apache and mod_wsgi memory help

2010-08-05 Thread Graham Dumpleton
On Aug 5, 10:14 pm, Albert Hopkins wrote: > ... Or perhaps mod_wsgi is not the way to go. > > Basically I have this situation.  I have a Django app that also has an > xmlrpc interface via the wiki recipe[1].  All works fine until I enabled > the ability to upload files.  Since they're binary fil

Re: Python Segfaults with Django 1.1

2010-08-05 Thread Graham Dumpleton
On Aug 5, 10:06 pm, Sven Broeckling wrote: > > > i have a problem on a debian lenny machine which is not easy to > > > track down. It started with Apache2 mod_wsgi crashes (segfault in > > > libapr) after the migration from mod_python. The server crashes > > > sporadic and everytime with another

Re: Python Segfaults with Django 1.1

2010-08-05 Thread Graham Dumpleton
On Aug 5, 10:06 pm, Sven Broeckling wrote: > > > i have a problem on a debian lenny machine which is not easy to > > > track down. It started with Apache2 mod_wsgi crashes (segfault in > > > libapr) after the migration from mod_python. The server crashes > > > sporadic and everytime with another

Re: SSL with Django, Apache, mod_wsgi and nginx

2010-08-10 Thread Graham Dumpleton
On Aug 11, 7:43 am, Colleen A Josephson wrote: > That does exactly what I need, thank-you! > > From: django-users@googlegroups.com [django-us...@googlegroups.com] On Behalf > Of Michael [newmani...@gmail.com] > Sent: Tuesday, August 10, 2010 5:25 PM > To

Re: mod_wsgi+Apache+Postregsql on Windows

2010-08-13 Thread Graham Dumpleton
On Aug 14, 11:26 am, John Yeukhon Wong wrote: > Hi, I know most of you work on Linux, but I do need this to be done on > Windows for a very personal reason. > > I mainly followed this tutorial here, except that I use mod_wsgi over > mod_python.http://wiki.thinkhole.org/howto:django_on_windows >

Re: mod_wsgi+Apache+Postregsql on Windows

2010-08-13 Thread Graham Dumpleton
jango default page Well, if you have blue Django default page then you must have something working, but can't say I know what or how cause you never responded with the details for why the 403 error occurred from the logs. You must have just lucked onto the right thing. Graham > Thank you f

Re: mod_wsgi+Apache+Postregsql on Windows

2010-08-14 Thread Graham Dumpleton
On Aug 14, 3:39 pm, John Yeukhon Wong wrote: > Hi, Graham > > I looked at the error log and I fully understood the problem. > > I spent an hour trying different ways to understand the whole thing. > Here is the result. > > f:/public/testproject/apache/django.wsgi > > //code begins here > import

Re: How to execute some user defined codes (functions) when Django boot?

2010-08-18 Thread Graham Dumpleton
On Aug 18, 6:31 pm, Mathieu Leduc-Hamel wrote: > Richard, > > it's not the good way to do this, in the settings.py cause as i said before, > the code in the settings.py is executed every time somebody initiate a > session for the first time. The point there is a way to have a part of code > comm

Re: Touch-ing django.wsgi doesn't reliably reload source code

2010-08-21 Thread Graham Dumpleton
On Aug 22, 12:07 am, Jim wrote: > Hello, > > I have Django running under apache2 (the worker version, I believe, > with MaxRequestsPerChild set to the default, which is 0).  I am using > mod_wsgi in daemon mode.  I have checked that it is daemon mode using > the method described on mod_wsgi's Re

Re: permissions and ownership

2010-08-26 Thread Graham Dumpleton
And for those who could't work out what the solution was from the 'Got It!' response, you will find these errors covered in my mod_wsgi talk. See: http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations :-) Graham On Aug 27, 2:40 am, Bradley Hintze wrote: > I got

Re: mod_wsgi setup issue

2010-08-27 Thread Graham Dumpleton
On Aug 28, 2:48 pm, Joel Klabo wrote: > All the files are shown here:http://gist.github.com/554724 > > I don't know what I'm doing wrong but I'm still getting 500 Go look in the Apache error log for the reason for the error and post that here. Better still, go watch the mod_wsgi presentation l

Re: mod_python, apache and django

2010-08-28 Thread Graham Dumpleton
On Aug 28, 5:21 am, Jesse wrote: > I'm loading django onto Windows XP professional with Apache. > Unfortunately, I need mod_python which only works with python 2.3. > Django needs python 2.4 and above.  Is there a way around this? The mod_python download page at www.modpython.org links to binar

Re: What replaced mod_python

2010-08-28 Thread Graham Dumpleton
On Aug 28, 9:56 am, Reinout van Rees wrote: > On 08/28/2010 01:35 AM, Jesse wrote: > > > I'm trying to load django/python 27/apache onto Windows XP.  I'm > > following the instructions that recommends mod_python.  Mod_python is > > no longer available.  What is it's replacement?  Will apache wor

Re: potential issue re in memory django file uploading.

2010-08-28 Thread Graham Dumpleton
On Aug 28, 7:58 pm, "david b." wrote: > Ok so I was looking through the code and I saw this (in > django/core/files/uploadhandler.py) : > > FileUploadHandler > ... > >    def new_file(self, field_name, file_name, content_type, > content_length, charset=None): >        """ >        Signal that a

Re: potential issue re in memory django file uploading.

2010-08-28 Thread Graham Dumpleton
On Aug 28, 11:21 pm, dave b wrote: > >>> So obviously my proposed attack is to simply say "content length is > >>> tiny" and "this file is actually HUGE". > >>> I hope I missed something :) I don't really want this to occur ... > > >> A decent web server such as Apache (under mod_wsgi) will stop

Re: potential issue re in memory django file uploading.

2010-08-28 Thread Graham Dumpleton
On Aug 29, 1:17 pm, dave b wrote: > On 29 August 2010 08:28, Steve Holden wrote: > > > On 8/28/2010 6:10 PM, Graham Dumpleton wrote: > >> On Aug 28, 11:21 pm, dave b wrote: > >>>>>> So obviously my proposed attack is to simply say "content leng

Re: potential issue re in memory django file uploading.

2010-08-29 Thread Graham Dumpleton
On Aug 29, 9:43 pm, dave b wrote: > > OK, so you don't believe the advice you are getting, which is that of > > the many issues a Django sit will face this is a relatively low > > probability attack. That's fair enough - a vulnerability is a > > vulnerability, after all, no matter how improbable

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Graham Dumpleton
On Aug 30, 1:54 pm, dave b wrote: > On 30 August 2010 11:04, Russell Keith-Magee wrote: > > > > > > > On Sun, Aug 29, 2010 at 8:26 PM, dave b wrote: > >  1) An actual problem where you can clearly describe the circumstances > > or sequence of events that would allow an attack to occur, and > >

Re: deployment problem gotcha

2010-08-30 Thread Graham Dumpleton
On Aug 30, 5:36 pm, Mike Dewhirst wrote: > I had an admin media problem finding base.css in deploying an app from > the Django (svn head) dev server on Windows to Apache 2.2 on Linux > > Because I had prepared this email ready to ask for help, I'm posting it > anyway with the hope that it helps

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Graham Dumpleton
On Aug 31, 1:09 am, dave b wrote: > /me rolls eyes. > You have a valid point re /tmp, sorry I am used to mounting /tmp as > /tmpfs - my mistake :) > Ok lets be *really* clear the security problem still exists. > An attack can in the limits set on the maximum post by the httpd / > module in use u

Re: mod_wsgi, apache, windows XP

2010-09-01 Thread Graham Dumpleton
On Sep 2, 4:46 am, Jesse wrote: > created project using startproject testproject > > Problems with apache_django_wsgi.conf > 1.  Added following line to Apache: > LoadModule wsgi_module modules/mod_wsgi.so > > 2. Created folder c:/django/testproject/apache > > 3.  Created file c:/django/testproj

Re: mod_wsgi, apache, windows XP

2010-09-01 Thread Graham Dumpleton
no errors, but the localhost is still the original > apache page and not hello world. What URL are you using? Sounds like you are using: http://localhost and not: http://localhost/myapp Your WSGIScriptAlias has it mounted at sub URL not root of site which is where standard

Re: Very slow page load in production with mod_wsgi

2010-09-03 Thread Graham Dumpleton
On Sep 3, 7:45 pm, Dirk Eschler wrote: > Hello, > > i experience slow page loads in production using mod_wsgi. The django > debugging toolbar reveals a very high CPU use with lots of voluntary context > switches: > > Production (Apache mod_wsgi-3.2, daemon mode, 10 threads): > User CPU time    3

Re: mod_wsgi, apache, windows XP

2010-09-03 Thread Graham Dumpleton
> > The apache_django_wsgi.conf file has the following: > > //start code > > Alias /media/ "c:/public/media/" > > > > > Order allow, deny > > Option Indexes > > Allow from all > > IndexOptions FancyIndexing > > > > > WSGI

Re: Question/Suggestion on using mod_wsgi with Django

2010-09-05 Thread Graham Dumpleton
On Sep 6, 5:01 am, DaveP wrote: > Let me first state, I'm fairly new to Python and even newer to Django, > so if what I'm mentioning is already an ongoing effort, I apologize. > > I was reviewing the following > documentation:http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/. > > I

Re: Question/Suggestion on using mod_wsgi with Django

2010-09-05 Thread Graham Dumpleton
this > information. > > Thanks for taking the time to comment on this. As I've been learning > more about Python and Django, I am liking it, but it needs some work > on the "getting it out of development and into production front" > > Thanks Again. > > On S

Re: mod_wsgi, apache, windows XP

2010-09-06 Thread Graham Dumpleton
You can do that with mod_wsgi as well. Go to the mod_wsgi site and read the ConfigurationGuidelines page on the wiki. Sorry, can't paste link right now. Graham On Sep 6, 4:27 pm, Elim Qiu wrote: > I followed a installation instruction and got > Apache/2.2.15 (Win32) SVN/1.6.12 mod_wsgi/3.3 Pyth

Re: virtualenv used with mod_wsgi

2010-09-15 Thread Graham Dumpleton
You need to add it to sys.path in WSGI script file. The PYTHONPATH in .bashrc of your personal account isn't used by Apache/mod_wsgi. Graham On Sep 15, 10:46 pm, Jagdeep Singh Malhi wrote: > On Sep 15, 11:15 am, Colin Bean wrote:> Have you tried the > steps described > here:http://code.google

Re: virtualenv used with mod_wsgi

2010-09-16 Thread Graham Dumpleton
On Sep 16, 5:28 pm, Jagdeep Singh Malhi wrote: > On Sep 16, 2:25 am, Graham Dumpleton > wrote:> You need to add it to sys.path in WSGI script file. The PYTHONPATH > > in .bashrc of your personal account isn't used by Apache/mod_wsgi. > > > Graham > > i already

Re: Using Django's auth for Trac too

2010-11-09 Thread Graham Dumpleton
On Nov 9, 7:54 pm, Torsten Bronger wrote: > Hall chen! > > Knut Ivar Nesheim writes: > > See the following link to the docs. This should be exactly what > > you want. > > >http://docs.djangoproject.com/en/dev/howto/apache-auth/ > > We use WSGI.  But if all else fails, switching to mod_python may

Re: Django mod_python under apache

2010-11-12 Thread Graham Dumpleton
For mod_python the result of using print will only show in Apache error log when you do an explicit flush of stdout. If using mod_wsgi, it autoflushes on newline so you don't have this problem. Graham On Nov 13, 7:29 am, vivek_12315 wrote: > I have configured Django with mod_python under apache

Re: Error Starting Django App using Apache+Mod_Wsgi

2010-11-22 Thread Graham Dumpleton
Have a read of: http://code.google.com/p/modwsgi/wiki/InstallationIssues It is likely that you have a conflicting mod_python module installed or that mod_wsgi is no finding the correct Python installation shared library at run time. Graham On Nov 22, 11:58 pm, Guddu wrote: > All, > > I have

Re: Hosting multiple projects

2010-11-23 Thread Graham Dumpleton
On Nov 23, 8:18 pm, Daniel Roseman wrote: > On Nov 22, 9:42 pm, Todd Wilson wrote: > > > > > > > I teach a course in which I have students developing unrelated Django > > projects on servers of their own choice.  As we near the end of the > > semester, I would like to set up a single server whe

Re: mod_wsgi and _imaging C module

2010-11-24 Thread Graham Dumpleton
On Nov 25, 11:41 am, Stranger wrote: > Hi all, > I've got problem when trying to run my first django project through > apache/mod_wsgi. > After proper vhost configuration has been done and I ran my app and > got this: > > Caught ImportError while rendering: The _imaging C module is not > install

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Graham Dumpleton
On Dec 26, 11:18 pm, Chris Withers wrote: > Graham Dumpleton wrote: > > > As I told you when you tried to use private email to get me to help on > > this, > > Apologies for that, I was actually trying to use Google's web UI to > reply to that thread in context.

Re: reverse drops the project from the url returned

2010-01-03 Thread Graham Dumpleton
On Jan 4, 12:45 pm, davathar wrote: > Here's more information I've been able to find.  Evidently there's a > problem in some configurations wheremod_wsgieither isn't receiving > or isn't passing SCRIPT_NAME. > > When I use this test script in the wsgi file I get an empty string as > the value fo

Re: reverse drops the project from the url returned

2010-01-04 Thread Graham Dumpleton
configuration you are using is in fact correct. Normally WebFaction recipes should create it correctly, but if you have hand crafted it and followed one of the incorrect blog posts out there about it, you could have problems. Graham On Jan 4, 6:23 pm, Graham Dumpleton wrote: > On Jan 4, 12:45

Re: mod_wsgi and stderr

2010-01-11 Thread Graham Dumpleton
On Jan 6, 6:29 am, Karen Tracey wrote: > On Tue, Jan 5, 2010 at 2:22 PM, Patrick May wrote: > > > > > > > On Jan 5, 2:18 pm, Karen Tracey wrote: > > > On Tue, Jan 5, 2010 at 1:55 PM, Patrick May > >wrote: > > > > >                  I’m running Django using mod_wsgi under Apache.  I’m > > > > t

Re: mod_wsgi and stderr

2010-01-11 Thread Graham Dumpleton
On Jan 12, 3:13 am, Patrick May wrote: > On Jan 5, 1:55 pm, Patrick May wrote: > > >                 I'm running Django using mod_wsgi under Apache.  I'm trying > > to write messages to the Apache error log with: > > >                 sys.stderr.write('Message...') > > > but for some reason th

Re: Django site behind an Apache reverse proxy

2010-01-17 Thread Graham Dumpleton
On Jan 17, 3:44 am, AlK wrote: > Hi ! > > I developed a small Website querying some other sites in background > like a "cron". The queries are handled in a separate thread that I can > start and stop when I want from a simple web-interface. It works great > on my development environment, when I

Re: HTTP 500 error in apache but not in test server

2010-01-24 Thread Graham Dumpleton
On Jan 25, 12:54 pm, Mark Underwood wrote: > Hi all, > > Ive already posted a lot of information > herehttp://serverfault.com/questions/103480/http-500-error-from-post-reuq... > all the logs etc. so i figure i wont post it all again. But its come > down to ive got a view that takes a POST reque

Re: HTTP 500 error in apache but not in test server

2010-01-24 Thread Graham Dumpleton
n tireless > and very helpful with somebody who, in the end it turns out made some > silly mistakes. > > Cheers > > Mark > > On Jan 25, 10:43 am, Graham Dumpleton > wrote: > > > > > On Jan 25, 12:54 pm, Mark Underwood wrote: > > > > Hi all, &g

Re: URL design - why the trailing slash?

2010-01-27 Thread Graham Dumpleton
On Jan 28, 11:54 am, Brett Thomas wrote: > Most of the URLConf examples I run across use a trailing slash on all > URLs:www.example.com/profile/ > > I'm not sure why, but I don't like this. I think it looks nicer > without:www.example.com/profile > > Are there any performance or security reaso

Re: Reg. Improving Django response time (i.e throughput)

2010-01-28 Thread Graham Dumpleton
On Jan 29, 3:57 pm, chefsmart wrote: > When you say "It is taking plenty of time to load Django initially", > what exactly do you mean? Good question, because depending on what hosting mechanism you are using and how you configure it, Django itself can be lazily loaded on first request, albeit

Re: Newbie Django Mac OS X suggestions.

2010-01-31 Thread Graham Dumpleton
hon in homebrew appears not to even supply a dynamic Python library or framework that can be linked in an embedded system. Graham > On Sat, Jan 30, 2010 at 22:55, Graham Dumpleton > wrote: > > > > > > > On Jan 31, 4:11 pm, Dave Murphy wrote: > > > On 30 January 2010

Re: How to setup multiple django domains under Apache and Ubuntu server???

2010-02-08 Thread Graham Dumpleton
Do you have appropriate NameVirtualHost directive anywhere in your Apache configuration? This must match pattern used by VirtualHost definitions. You would also normally use '*:80' and not just '*'. Thus: NameVirtualHost *:80 .. .. Graham On Feb 9, 11:57 am, WeissBlitz wrote

Re: choose database manually per-request

2010-02-13 Thread Graham Dumpleton
On Feb 13, 7:43 am, PDani wrote: > Hi! > > I would like to set up some database servers in Django 1.2, and then > use them in this way: when a new request comes, i choose a server > manually, and then use this ONLY ONE server in that request. I don't > want to pass around parameters, which serve

Re: Session errors with mod_wsgi

2010-02-14 Thread Graham Dumpleton
You are somehow trying to pickle the WSGI environ dictionary, possibly due to trying to pickle the Django request object. You cannot do that. Graham On Feb 14, 2:04 pm, DavidMck wrote: > I've given up. There seems to be an issue with pickling some objects > when you're using mod_wsgi - rather th

Re: Best practices for restricting media?

2010-02-22 Thread Graham Dumpleton
On Feb 23, 5:00 am, David De La Harpe Golden wrote: > On 22/02/10 16:48, Brice Leroy wrote: > > > Hello Brett, > > If you use nginx you can use the X-Accel-Redirect function. > > Minor: if you _don't_ use nginx but rather apache or lighttpd, > similar feature is called "X-Sendfile". If you are

Re: django vs tornado

2010-03-03 Thread Graham Dumpleton
On Mar 4, 9:08 am, gvkalra wrote: > hi i have a presentation to make on django, wherein I have > decided to include a section on Tornado I wish to show > performance comparisons between django and tornado . how do I set > up the scenario ?? . what I intend to achieve is this >

Re: segfault with mod_wsgi / mod_python after Python upgrade on Gentoo

2010-03-04 Thread Graham Dumpleton
Start by reading: http://code.google.com/p/modwsgi/wiki/InstallationIssues http://code.google.com/p/modwsgi/wiki/ApplicationIssues http://code.google.com/p/modwsgi/wiki/DebuggingTechniques Various reasons for crashes are documented and also pointers to how to configure Apache/mod_wsgi to ge

Re: import errors when starting django on staging server, no errors on local dev server

2010-03-07 Thread Graham Dumpleton
You don't say anything about what hosting mechanisms you are using for each. The Django runserver does extra automagic setup steps which aren't by default going to be done by other hosting mechanisms. Part of this is solved by manual setup of sys.path, but not necessarily all that is necessary. H

Re: import errors when starting django on staging server, no errors on local dev server

2010-03-08 Thread Graham Dumpleton
ode http://blog.dscpl.com.au/2008/12/using-modwsgi-when-developing-django.html http://blog.dscpl.com.au/2009/02/source-code-reloading-with-modwsgi-on.html Graham On Mar 9, 12:30 am, felix wrote: > On Mar 8, 1:25 am, Graham Dumpleton > wrote: > > > You don't say anything about what ho

Re: import errors when starting django on staging server, no errors on local dev server

2010-03-08 Thread Graham Dumpleton
differences that have to be dealt with. Graham > On Mar 8, 10:39 pm, Graham Dumpleton > wrote: > > > > > It is almost impossible to suggest anything about your problem as you > > don't post the complete details of the actual errors you are getting. > > If

Re: How to make django use a different python interpreter located at some random location.

2010-03-11 Thread Graham Dumpleton
On Mar 11, 3:41 pm, Abhinov wrote: > Hi All, > > How to make my django use a different python interpreter located at > some random location ? > Any help will be of great help. How are you hosting it? Are you talking about Django runserver or some other hosting mechanism such as mod_python, mod

Re: site management - maintanance mode

2010-03-13 Thread Graham Dumpleton
On Mar 13, 11:21 pm, "Henrik Genssen" wrote: > Hi, > > I have a site that runs on more many hosts. > now hast someone an idea, how to put the whole site (on all hosts) in > "maintanance mode" (keep normal users outside with a nice hint) - > without reloading all webservers and not changing the

Re: Dynamic multi-site - running many sites from one Django instance

2010-03-23 Thread Graham Dumpleton
On Mar 24, 12:53 pm, Tim Shaffer wrote: > No, it would just be one instance of the project with 20 different > configuration files. There is the single instance of the code files on disk, but there would be multiple instances of the loaded application in memory where each instance in memory is

Re: High, ongoing CPU consumption

2010-03-24 Thread Graham Dumpleton
On Mar 25, 3:39 am, David Christiansen wrote: > Dear fellow Django users, > > We're beginning to be at wits end with a particular problem that we're > having that I suspect has to do with server configuration issues, but > might be something else. > > Our Django processes (whether it be Apache w

Re: mod_wsgi broken in rev #12866

2010-03-28 Thread Graham Dumpleton
On Mar 29, 10:48 am, Russell Keith-Magee wrote: > On Mon, Mar 29, 2010 at 12:40 AM, nih wrote: > > oops sorry, typo in the last paragraph :( > > > It only crashes for me with apache, mod_wsgi, new project (no views/ > > models/etc), finished project, and rev # 12866+. > > > They all work normal

Re: Django and Tornado web server

2010-03-28 Thread Graham Dumpleton
On Mar 29, 7:12 am, nameless wrote: > Hi at all, > I need to create a high performance comet chat for my college project. > I have found Tornado that is a non-blocking webserver used by > FriendFeed for real-time features:http://www.tornadoweb.org/ > > Maybe this is a stupid question but I am ve

Possible improved WSGI script file for Django when using Apache/mod_wsgi.

2010-03-28 Thread Graham Dumpleton
FWIW, have posted: http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html This delves into issues as to why Django development server behaves differently to Apache/mod_wsgi and describes an alternate WSGI script file which should hopefully narrow the gap and get rid of some of th

Re: apache memory requirement ballparks?

2007-06-04 Thread Graham Dumpleton
On Jun 5, 9:04 am, Andrew <[EMAIL PROTECTED]> wrote: > Maybe a better way of asking this question would be this: > > What's a reasonable memory footprint for each apache child process? The bulk of memory consumption used by the Apache child processes will be from your own application. Thus, run y

Re: Problems with running Django on a remote machine

2007-06-13 Thread Graham Dumpleton
On Jun 14, 9:30 am, "Dirk van Oosterbosch, IR labs" <[EMAIL PROTECTED]> wrote: > 3. The docs say I should have Apache+mod_python as preform MPM as > oposed to worker MPM. How do I find out which of those two I've got > running here? > [Thu Jun 14 00:36:33 2007] [notice] mod_python: Creating 8 sess

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