Jump to content

ren

Members
  • Posts

    8
  • Joined

  • Last visited

ren's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. ren

    Django problem

    So has anybody made progress on getting the admin working for Django? Or is this thread totally dead?
  2. My admin page is not working yet, I will have a look at it a bit later today
  3. Here is my dispatch.wsgi import os, sys sys.path.append("/home/renier/public_html/mysite"); os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' os.environ['PYTHON_EGG_CACHE'] = '/home/renier/.python_egg_cache' import django.core.handlers.wsgi _application = django.core.handlers.wsgi.WSGIHandler() def application(environ, start_response): environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO'] return _application(environ, start_response) and the .htacess RewriteEngine On RewriteBase / RewriteRule ^(media/.*)$ - [L] RewriteRule ^(admin_media/.*)$ - [L] RewriteRule ^(dispatch\.wsgi/.*)$ - [L] RewriteRule ^(.*)$ mysite/dispatch.wsgi/$1 [QSA,PT,L] What I have deduced from setting up the mysite application is that if you get internal server errors then, there is probably something wrong with the way your Django application is being called. What I can suggest though I am sure you would have covered this as well is the following: Check the file permissions are correct as specified in the tutorial Check that your ROOT_URLCONF = 'urls', the default would be ROOT_URLCONF = 'mysite.urls' You could try checking your error log, though this is not always that helpful, djbob said he would look into it
  4. Well I have made quite a lot of progress. I put on another test application (mysite), only much more basic. Got it to display the basic "It works" Django page. Then I proceeded to add the admin app and added a sqlite3 db file, and sorted out the urls required for this. I am now getting another internal server error, when I attempt to go to the admin section of the test site. The db file was created on my local machine. The error log in cPanel is not really giving me anything useful. Could you maybe check if there is anything relevant in the Apache log? I think the error could be because the permissions of my database file are incorrect. I am running it as 777 for now.
  5. The only reason I asked if you needed my password was because of something I read in that other thread that I referred to in my first post. When accessing my site I no longer get the dispatch.wsgi displayed, instead I get a 500 internal server error. So based on that I assume something in the system changed. There are probably some other problems in the site, this is the first Django site I am trying to deploy. I checked the error log in cPanel and I don't get any logs referring to DjangoSite1. So I am not sure how that error log correlates with the Apache error_log. Here is the error log for the site: [Mon Jul 20 01:17:12 2009] [error] [client 41.145.144.48] File does not exist: /home/renier/public_html/500.shtml, referer: http://www.fficourses.heliohost.org/ [Mon Jul 20 01:17:12 2009] [error] [client 41.145.144.48] File "/home/renier/public_html/DjangoSite1/dispatch.wsgi", line 9, in application, referer: http://www.fficourses.heliohost.org/ [Mon Jul 20 01:17:12 2009] [error] [client 41.145.144.48] mod_wsgi (pid=13024): Exception occurred processing WSGI script '/home/renier/public_html/DjangoSite1/dispatch.wsgi'., referer: http://www.fficourses.heliohost.org/ [sun Jul 19 23:17:11 2009] [error] [client 41.145.144.48] File does not exist: /home/renier/public_html/404.shtml [sun Jul 19 23:17:11 2009] [error] [client 41.145.144.48] File does not exist: /home/renier/public_html/favicon.ico How do I access the apache log?
  6. My username is renier. Do you need my password?
  7. I have been unable to get Django working correctly. I have a small project that works on my local PC, with the Django. In addition I have followed the tutorial on www.helihost.org to the tee http://www.heliohost.org/home/features-mai...tingmenu/python When I try to access the folder with the django project in the content of dispatch.wsgi is displayed. I have checked and rechecked the permissions for my .htaccess and dispatch.wsgi files, and they are correct. To me it seems like mod_wsgi is not loading the project correctly. If it loading correctly and I had errors in my Django project I except I would at least get some Django debugging output. I have found this thread which is pretty much the same problem as I seem to be having: http://www.helionet.org/index/index.php?sh...aded&start= But I am still unable to resolve the problem The things I am unsure about are: The permissions for the .py files in the project folder I am using SQlite3, what should the permissions be of the SQLite file? Do I need to specify the python path anywhere (#!/usr/bin/python)? Thanks for the awesome hosting by the way!!!!
×
×
  • Create New...