Jump to content

Carl A.

Members
  • Posts

    7
  • Joined

  • Last visited

Carl A.'s Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Greatness! It works, but I still have to have the Line X commented out. Otherwise it will give a "Page not found" (404) error. I'm happy enough though. Many thanks. (May be marked [solved])
  2. dispatch.wsgi: import os, sys sys.path.append("/home/agon/public_html/udb"); os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' os.environ['PYTHON_EGG_CACHE'] = '/home/agon/.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'] # Line X return _application(environ, start_response) If I have it like this, the urls from ROOT_URLCONF = 'udb.urls' cannot be found. If this value is changed to ROOT_URLCONF = 'urls' then the page can't be found (404). In this thread, kuloto points out that it was helpful to comment out the "Line X" (see above). If I do this using ROOT_URLCONF = 'udb.urls' then again the udb.urls cannot be found. When using ROOT_URLCONF = 'urls' I have to remove the "udb" package from the classes/functions inside urls.py and THEN it works. (otherwise I'll get a ViewDoesNotExist inside urls.py). But as I wrote in the previous post, I would like to keep the base/project package 'udb'. I hope this helps.
  3. I have finally been able to make my hello-world django-app run. But this is only running when the project package is removed everywhere: in settings.py: ROOT_URLCONF = 'urls' instead of 'PROJECT-NAME.urls', which I use in the development side. also in the urls.py, all the referred classes require to have the project package removed. I'm sure it must be possible to use the project package, too!?! Could anyone point me to where this might be changed?
  4. I'm not sure if the django problem with the same error is related. I'm going to make a new thread for it. this thread can be marked solved.
  5. Thank you so far. The django app is developed on Ubuntu, so I assume there it's unixy. The two scripts were actually windowsy, but they are both. I changed the utf8 one to Unix-line-endings, but the problem remains. ... after I changed the encoding of the UTF8-file to ansi, it works. ---------------- Later this evening ------ Ha, got it: I had to remove the BOM from the UTF8 file. Now, if this is also the problem with my django application (currently merely a hello-world) then it would be rather annoying to have the BOM removed from every file that is created from python/django. Well, I will look into this during the weekend.
  6. ANSI (actually saved as us-ascii), which prints the hello-world message: #!/usr/bin/python print "Content-Type: text/plain\n\n" print "Hello World: ANSI" and UTF-8 (which gives a 500 Error):  #!/usr/bin/python print "Content-Type: text/plain\n\n" print "Hello World: UTF-8" .. nothing too fancy. I rechecked just to be sure: The permission on for both files, which are in the same directory, is 755.
  7. I wanted to start using Helio using Python/Django. However, whatever I do I'll get a 500 error. So, I tried to make to simple cgi scripts with python, one using us-ascii and another in utf8. The former works, the latter gives me again a 500 error. Am I missing something? There is a high probability that I will use UTF-8 later in the project so I don't want to use ascii. (.. also: I don't know where the error log is located :-() agon.
×
×
  • Create New...