I was able to get Django 1.0.2 running on Python Twisted WSGI web server (8.2)
I can get a simple application (todo list) to to work (I am using postgresql database). However there are some problems 1) when I click localhost:8000/admin I am presented with login screen (but without any background/etc) once I type my id/password, the webbrowser gets redirected to http://admin which is obviously an invalid address 2) when logged in, I cannot use the Admin pannel to add new rows to my Registered models. I always get an error saying that I did not enter any value into the name field -- while I did. In short I think all of this is happening because of some URL related naming. I would like to debug this furthure, but need some pointers where to start. Here is the wsgi_web.py which starts a twisted webserver (notice mytestproj is my test project in the directory below the wsgi_web.py and under mytestproj I have my todo application) --------wsgi_web.py----------------- import logging, os # Force Django to reload its settings. from django.conf import settings settings._target = None # Must set this env var before importing any part of Django os.environ['DJANGO_SETTINGS_MODULE'] = 'mytestproj.settings_tw' from twisted.web import server from twisted.web.wsgi import WSGIResource from twisted.python.threadpool import ThreadPool from twisted.internet import reactor import django.core.handlers.wsgi import django.core.signals import django.db import django.dispatch.dispatcher def log_exception(*args, **kwds): logging.exception('Exception in request:') def main(): # Create a Django application for WSGI. application = django.core.handlers.wsgi.WSGIHandler() # A toy WSGI application for this example def basic_wsgi_app(environ, start_response): start_response('200 OK', [('Content-type','text/plain')]) return ['Hello World!'] # Create and start a thread pool, # ensuring that it will be stopped when the reactor shuts down thread_pool = ThreadPool() thread_pool.start() reactor.addSystemEventTrigger('after', 'shutdown', thread_pool.stop) # Create the WSGI resource #wsgi_app_as_resource = WSGIResource(reactor, thread_pool, basic_wsgi_app) wsgi_app_as_resource = WSGIResource(reactor, thread_pool, django.core.handlers.wsgi.WSGIHandler()) site = server.Site(wsgi_app_as_resource) reactor.listenTCP(8000, site) reactor.run() ------- wsgi_web.py end ------------ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---