Talk:Django
From DreamHost
This article is a bit of a mess and not very useful anymore. Also Jeff Croft's website which contains the majority of the steps for setup seems to be down more than it's up. Would anybody mind if I start cleaning this up? Jdanks 20:46, 29 August 2007 (PDT)
As of October 18th there has been a change in the way that settings files are handled and the way that the admin app is specified. I adjusted the wiki accordingly. --Rockmh 06:37, 23 Oct 2005 (PDT)
Note that you can get django going in mydomain.com instead of django.mydomain.com if that is desirable and appropriate. Just make the substitution in the instructions. It worked for me. --Rockmh 06:47, 26 Oct 2005 (PDT)
I followed the instructions given, and everything seems to work until I try to load django.mydomain.com/django.fcgi/ in a browser. At that point, I get a traceback with this error:
EnvironmentError: Could not import DJANGO_SETTINGS_MODULE 'test.settings.admin' (is it on sys.path?): No module named settings.admin
If I start python manually, I can successfully import test.settings.main, so it is on sys.path, at least when I run python manually. Does anyone have any tips for me? --Will McCutchen Aug 3 2005, 10:45am CST
Don't name your project 'test'. This was mentioned in the comments for the 1st tutorial at djangoproject.com. Try it again with 'myproject' and see if that works. --Jdanks 11:43, 4 Aug 2005 (PDT)
D'oh! That was a dumb mistake... using 'myproject' instead of 'test' worked beautifully. Thanks for writing this up, I don't think I could have done it on my own. --Will McCutchen 8:45, 5 Aug 2005 (CST)
Contents |
mod_rewrite rules broken
Whoever last edited the mod_rewrite rules broke them. Apache just returns a 500 error and leaves " mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary." in the logs. I spent a few minutes tinkering with it but haven't had any luck fixing it. Malaprop 15:07, 21 Nov 2005 (PST)
I Updated the page and added a RewriteCond to the mod_rewrite rules. Without it i was getting the MaxRedirects 500 error page. After this it started working.
Michael--Mathwizard 12:57, 2 Dec 2005 (PST)
500 errors
I'm noticing a lot of discussion about receiving 500 errors while running Django under FCGI. I think that it may be related to a similar problem that the people who use Ruby_on_Rails tend to get. -> Go to the getting started section and look at point 5. If that's the case, then it looks like the fcgi dispatch script will have to be changed. --NathanClayton 13:55, 19 Feb 2006 (PST)
- I have changed “django.fcgi” name into “dispatch.fcgi”, a change which did help me with the 500 errors (and incomplete headers in the logs). --Automatthias 23:17, 7 Dec 2006 (PST)
- I've put a big bold warning saying to rename it at the top. I've filed a ticket in an attempt to try and get the official documentation to draw attention to this issue. It has been rejected. Apparently, just because I'm stupid doesn't mean everyone else is. Oh well, I think it is pretty obvious right at the top of the page in bold. --Grimboy 17:15, 19 Dec 2006 (PST)
I'm running into these too, and I am using “dispatch.fcgi” as the script name. Django has worked a couple of times, but more often it fails. I asked for a raised memory limit as described on Python_FastCGI, and they did that, but it didn't help. I'm pretty sure it's failing to start my script at all. Update: I got it working on my DOMAIN.org, but not on test.DOMAIN.org, despite identical configurations. I'm tired of playing with it, so I'm just going to stick with what I've got. Zarf 20:38, 16 May 2007 (PDT)
Protecting settings.pyc
Should settings.pyc be secured with 'chmod 600' too if it's a security worry?
Django version .96 - MySQLdb requirements
Looks like the current versions of Django require the MySQLdb python module to be at version 1.2.1g3. In order to use Django you have to set the DATABASE_ENGINE = 'mysql_old' and you loose some of the database options. --Nathanblack 16:29, 25 May 2007 (PDT)

