开发者

No module named registro.forms in my own local django server [edited]

im setting Django Server in my Ubuntu machine, apache/wsgi, but im getting a error in my view: was No module named registro.forms now after some code in my wsgi is No module name forms

#registro.views

from registro.forms import ComercioForm

In my laptop is running but not in my server machine django is running all database table are syncd

WSGI

#path /srv/www/project/apache/django.wsgi

import is, sys

sys.path.insert(0,'/srv/www')
sys.path.insert(0,'/srv/www/project')
sys.path.insert(0,'/srv/www/') #testing
sys.path.insert(0,'/srv/www/project/'开发者_运维百科) #testing

os.environ['DJANGO_SETTINGS_MODULE']='project.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

httpd.conf

#path /srv/www/project/apache/

Alias /media/ "/srv/www/project/public/admin_tools"

<Directory "/srv/www/project/public/admin_tools">
Allow from all
</Directory>

WSGIScriptAlias "/srv/www/project/apache/django.wsgi"

<Directory "/srv/www/project/apache">
Allow from all
</Directory>

project

#path /etc/apache2/sites-available

<VirtualHost *:80>
    ServerName project
    DocumentRoot /srv/www/project

    <Directory /srv/www/project>
       Order allow,deny
       Allow from all
    </Directory>

    WSGIDeamonProcess project processes=2 threads=15 display-name=%{GROUP}
    WSGIProcessGroup project

    WSGIScriptAlias / /srv/www/project/apache/django.wsgi

</VirtualHost>

Any idea? thanks


You probably don't have the "registro"-application in your Django-Path. For an example how to fix it, see here .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜