Django und Python + uWSGI
Mit Anleitung ich versuche zu verbinden Python + uWSGI.
Ich aus Standard-Projekt in einem Ordner /home/sanya/django/pasteurl.
Aber, Sie öffnen in einem browser bekomme ich
uWSGI Error
wsgi application not found
Protokolle enthalten die folgenden:
binding on TCP port: 9001
your server socket listen backlog is limited to 64 connections
added /home/sanya/django/pasteurl to pythonpath.
initializing hooks...done.
...getting the applications list from the 'django' module...
uwsgi.applications dictionary is not defined, trying with the "applications" one...
applications dictionary is not defined, trying with the "application" callable.
static applications not defined, you have to use the dynamic one...
spawned uWSGI master process (pid: 7637)
spawned uWSGI worker 1 (pid: 7646)
spawned uWSGI worker 2 (pid: 7647)
spawned uWSGI worker 3 (pid: 7648)
spawned uWSGI worker 4 (pid: 7649)
Datei /home/sanya/django/pasteurl/django.wsgi
import os
import django.core.handlers.wsgi
# init django settings
os.environ['DJANGO_SETTINGS_MODULE'] = 'pasteurl.settings'
# define wsgi app
application = django.core.handlers.wsgi.WSGIHandler()
# mount this application at the webroot
# applications = { '/': 'application' }
Als ich merkte, es ist etwas falsch mit diesem Anwendung Wörterbuch
InformationsquelleAutor San4ez | 2010-09-23
Du musst angemeldet sein, um einen Kommentar abzugeben.
FWIW, Blick auf die source code, beginnend bei Zeile 1997, sehen wir, dass uWSGI emittiert, die genaue Abfolge von Fehlermeldungen, die Sie erhalten, wenn Sie es nicht finden können, ein
applications
Wörterbuch.Blick auf Ihre
django.wsgi
Datei, sehen wir, dass die Linie,auskommentiert ist. Ich Frage mich, was wir tun könnten 😉
BTW, ich fand den source-code unter Verwendung google. Googeln für Fehlermeldungen in Anführungszeichen ist oft eine gute Sache zu tun. Nachdem ich auf diesen link geklickt und festgestellt, dass ich das Glück hatte, gefunden zu haben, den source-code direkt von google (findet), drückte ich Strg-F für die "auf Seite suchen" und neu eingegeben, die Fehlermeldung in meinem browser auf der Seite die Suche führte mich direkt zu den entsprechenden Zeilen.
InformationsquelleAutor aaronasterling
gleiche Problem, es hier zu bemerken:
überprüfen nginx conf:
stellen Sie sicher, dass:
1.sompath/somefile.py muss vorhanden sein
2.es muss ".py" als Ausmaß Dateiname
3.verwenden Sie nicht die volle name wie "somefile.py" oder gleiche Fehler passiert ocer, und hat Fehlerprotokoll im uwsgi log-Datei:
InformationsquelleAutor raidsan