|
Hi. I just configured my django project. And face a problem: Actually:
Looks like it cant import my app 'player'. In i added it in setings.py Than I Already trued change my urls.py sa follow: (r'^player/','myproject.player.views.player') - does not work (r'^player/','player.views.player') -does not work I local machine it work very well. |
|
Hi, Here's what you need to do:
The reason this works on your local computer is probably because you are running the django dev server which plays magic with your paths and isn't the same as running as a production stack. So fast reply. I really appreciate it. Thanks. You're very welcome! Did you get the problem fixed? I'm trying. Now i get apache syntax error. I added lines as you wrote. Shoul i change thish lines: WSGIDaemonProcess django processes=5 python-path=/home/polinom/webapps/django:/home/polinom/webapps/django/lib/python2.6 threads=1 WSGIPythonPath /home/polinom/webapps/django:/home/polinom/webapps/django/lib/python2.6 Hi, Yes, you should just edit the lines already there to add the additional paths instead of adding new lines to the file. Now it looks like this: WSGIDaemonProcess django processes=5 python-path=/home/polinom/webapps/django:/home/polinom/webapps/django/lib/python2.6:/home/polinom/webapps/django/myprojecutt:/system/python: threads=1 WSGIPythonPath /home/polinom/webapps/django:/home/polinom/webapps/django/lib/python2.6:/home/username/webapps/djangoapp/myproject:/home/polinom/webapps/django/myproject/polinom:/system/python But it dont work. What directive should i exactly edit? Hi, It looks like I wasn't very clear in my post. The /system/python was just referencing the full path to the install path of python rather than what you should put there, here's what you should put here: WSGIDaemonProcess django processes=5 python-path=/home/polinom/webapps/django:/home/polinom/webapps/django/myproject/polinom:/home/polinom/webapps/django/lib/python2.6 threads=1 WSGIPythonPath /home/polinom/webapps/django:/home/polinom/webapps/django/myproject/polinom:/home/polinom/webapps/django/lib/python2.6 then restart your apache. I did it. Same result - nothing. But when i'm importing it through django.py shell it's importing normal. I stuck. Maybe can be something else? Hi, The error was: [Fri Mar 11 22:41:23 2011] [error] [client 127.0.0.1] raise TemplateDoesNotExist(name) [Fri Mar 11 22:41:23 2011] [error] [client 127.0.0.1] TemplateDoesNotExist: 500.html I've created that file and it is working now, meaning you're not getting any more 500 errors. Sorry for confusing you. But you saw that error because I turn off my app named player. But when i turn it on - the same error what i gave you on the top. I've fixed the problem. The fix was that your app needed to be named 'myproject.player' in settings.py and you were only calling player.view instead of myproject.player.view which I've fixed and your site is now working correctly. Thanks a lot. You're very welcome!
showing 5 of 12
show all
|