Re: Django on Apache
MAMP can be a bit of a pain I think sometimes to modify, though I haven't used it much in the past few years. You can use the Mac's built-in apache server though with mod_python. Check out http://www.google.com/search?q=mod_python+mac+os+x&ie=UTF-8&oe=UTF-8&hl=en&client=safari Sent from my iPhone On Sep 25, 2010, at 11:07 AM, Derek wrote: > I am about a week into learning Django, having developed with PHP and > the CodeIgniter framework for the past 3 years. That said, I'm used > to making a change to a file, refreshing my browser and seeing the > results. > > Django's "syncdb" aside, it's been pretty weird having to restart the > Django webserver manually on certain occasions. Is this also the case > when running Django on Apache? If not, can I set up Django to run > with MAMP locally? > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@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. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
Re: Django on Apache
On 25/09/10 16:07, Derek wrote: I am about a week into learning Django, having developed with PHP and the CodeIgniter framework for the past 3 years. That said, I'm used to making a change to a file, refreshing my browser and seeing the results. Django's "syncdb" aside, it's been pretty weird having to restart the Django webserver manually on certain occasions. Is this also the case when running Django on Apache? If not, can I set up Django to run with MAMP locally? If you're developing, you can use the built in test server and that will pick up changes without refreshing. If you're deploying on apache using mod_wsgi, you can set that up to automatically pick up your changes when the code updates. Details at: http://drumcoder.co.uk/blog/2009/nov/21/apache-mod_wsgi-config/ Hope that helps, Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
Re: Django on Apache
Thanks for the quick response, guys. I guess what confuses me is the need to EVER restart the server to pick up changes (excluding db syncs). It's been stated in many places (including Tim's response) that the test server will automatically pickup code changes, but on several occasions I've made changes to a view, and got a "cannot load page/no response" (from the browser, not a Django error). Once I quit the server (Control-C), start it up again and refresh the page, it works fine. Can someone briefly explain the difference between PHP apps -- which run your code "as is" without need for refreshing the server -- and Django? Again, much appreciated. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
Re: Django on Apache
On 25/09/10 19:36, Derek wrote: on several occasions I've made changes to a view, and got a "cannot load page/no response" (from the browser, not a Django error). Once I quit the server (Control-C), start it up again and refresh the page, it works fine. I get that sometimes too - I think it's just reloading the server as it has noticed a code change. Refresh again in the browser and it's usually working again. I find that if you're developing a template tag it's sometimes required to restart the server to pick up the new code. What I tend to do is try not to restart, and if something isn't working I'll restart the test server as my first test. If it still doesn't work then it's more than likely my fault rather than the server's... Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
Re: Django on Apache
On Saturday 25 of September 2010 20:36:52 Derek wrote: > Can someone briefly explain the difference between PHP apps -- which > run your code "as is" without need for refreshing the server -- and > Django? The difference is that Django starts once, loads all modules it needs and then starts handling requests with the code it has in memory, PHP on the other hand, each time it handles a request loads each script and then throws away the loaded script after it has run (altough it can cache scripts somewhere I believe). -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
Re: django on apache server
Not being able to load CSS points to an Apache config issue. Did you setup apache so your static root configured to serve files from your static folder? Your apache config might be helpful here. Also, what you have pasted here seems like a warning, so while you should fix it, this is probably not the cause of your CSS loading error. On Thursday, August 18, 2016 at 3:44:14 PM UTC+4, hirok biswas wrote: > > while i have configuring django app on apchhe basically it works almost > well but shows this error log and css not work > what can i do now??? > i am using > #apache2 > #django 1.9.6 > ` > [Wed Aug 17 14:54:12.747345 2016] [wsgi:error] [pid 17910:tid > 139970848413440] > /home/hirok/apachetest/venv/lib/python2.7/site-packages/django/template/utils.py:37: > > RemovedInDjango110Warning: You haven't defined a TEMPLATES setting. You > must do so before upgrading to Django 1.10. Otherwise Django will be unable > to load templates. > [Wed Aug 17 14:54:12.747414 2016] [wsgi:error] [pid 17910:tid > 139970848413440] "unable to load templates.", RemovedInDjango110Warning) > [Wed Aug 17 14:54:12.747423 2016] [wsgi:error] [pid 17910:tid > 139970848413440] > ` > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/13c18a07-aedb-4560-b10b-bc21ac54de0e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: django on apache looses all styling
I see that django documentation says to copy the admin media files so that they live within your Apache document root. I have put the media files from the django/contrib in the Apache document root. How does django/apache see them? On Thu, Oct 16, 2008 at 2:42 PM, William Purcell <[EMAIL PROTECTED]>wrote: > I am new to django, and web development in general for that matter, so > please bear with me. I have done the introductory tutorial at the django web > site. Everything works fine. I have now installed apache and I'm trying to > serve django with mod_python installed in apache. I can now browse to > localhost/myapp/admin but the admin page has lost all styling. Any comments > or suggestions are very much appreciated. Sorry for such an elementary > question, but I am stuck and can't find anything on google. > Thanks, > Bill > > Windows XP > Apache 2.0.63 > mod_python 3.3.1 > Python 2.5 > django 1.1 > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django on apache looses all styling
In your settings.py file there is a MEDIA_URL setting and an ADMIN_MEDIA_PREFIX setting In my case I have MEDIA_URL = 'http://media.digitalxero.net/' + SITE_NAME + '/' ADMIN_MEDIA_PREFIX = 'http://media.digitalxero.net/admin/' That way all of my static files are server off my CDN (Separate server just for static files), but more common setups would be MEDIA_URL = 'http://my.site.com/media/' ADMIN_MEDIA_PREFIX = MEDIA_URL + 'admin/' Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com On Thu, Oct 16, 2008 at 2:20 PM, William Purcell <[EMAIL PROTECTED]> wrote: > I see that django documentation says to copy the admin media files so that > they live within your Apache document root. I have put the media files from > the django/contrib in the Apache document root. How does django/apache see > them? > > On Thu, Oct 16, 2008 at 2:42 PM, William Purcell <[EMAIL PROTECTED]> > wrote: >> >> I am new to django, and web development in general for that matter, so >> please bear with me. I have done the introductory tutorial at the django web >> site. Everything works fine. I have now installed apache and I'm trying to >> serve django with mod_python installed in apache. I can now browse to >> localhost/myapp/admin but the admin page has lost all styling. Any comments >> or suggestions are very much appreciated. Sorry for such an elementary >> question, but I am stuck and can't find anything on google. >> Thanks, >> Bill >> >> Windows XP >> Apache 2.0.63 >> mod_python 3.3.1 >> Python 2.5 >> django 1.1 >> > > > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on Apache (mod_python) administration cookie problem
Daniel bodom_lx Graziotin wrote: > Hi everybody! I'm a new Django developer and for learning the > framework I decided to create (another) pastebin clone that I > published on http://incollo.com > The application works very well and I'm very proud of it because I > started learning Django six days ago :-) > Anyway.. > I'm having problems in accessing the Django administration panel, > which works perfectly with the development built-in webserver. > This is what I receive when I try to login: > --- > Looks like your browser isn't configured to accept cookies. Please > enable cookies, reload this page, and try again. > --- > It makes me think that this is a Apache + mod_python related > problem..The Django application works..The media directory for admin > is correctly served (I created a media-admin directory and copied in > it the content django/contrib/admin/media > > Any help? Thank you very much Hello, I was with the same error and romke in [EMAIL PROTECTED] helped me to solve this problem. The solution is to disable mhash in PHP (or other mod_* that uses this). To do this, comment the line that enable mhash extension in your php.ini - in my caseI edited /etc/php5/conf.d/mhash.ini (I use Debian). I found this information in: http://blog.foozia.com/blog/2007/may/20/cookie-problem-django-admin/ -- Cheers, Álvaro Justen Debian GNU/Linux user --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on Apache (mod_python) administration cookie problem
Ah, some details: -> Admin interface runs OK with python manage.py runserver - as of it is an Apache error, Django's web server isn't affected by this bug. -> I'm using Debian etch as server: I've installed Apache, PHP and mod_php with Debian packages, but Django installed manually. -> Versions: * Apache: Server version: Apache/2.2.3 Server built: Mar 22 2008 09:29:10 * PHP: PHP 5.2.0-8+etch11 (cli) (built: May 10 2008 10:46:24) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies * Django: 1.0-final-SVN-unknown -- Cheers, Álvaro Justen Debian GNU/Linux user --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on Apache (mod_python) administration cookie problem
On Oct 1, 10:56 am, Álvaro Justen <[EMAIL PROTECTED]> wrote: > Daniel bodom_lx Graziotin wrote: > > Hi everybody! I'm a new Django developer and for learning the > > framework I decided to create (another) pastebin clone that I > > published onhttp://incollo.com > > The application works very well and I'm very proud of it because I > > started learning Django six days ago :-) > > Anyway.. > > I'm having problems in accessing the Django administration panel, > > which works perfectly with the development built-in webserver. > > This is what I receive when I try to login: > > --- > > Looks like your browser isn't configured to accept cookies. Please > > enable cookies, reload this page, and try again. > > --- > > It makes me think that this is a Apache + mod_python related > > problem..The Django application works..The media directory for admin > > is correctly served (I created a media-admin directory and copied in > > it the content django/contrib/admin/media > > > Any help? Thank you very much > > Hello, > I was with the same error and romke in [EMAIL PROTECTED] helped > me to solve this problem. > The solution is to disable mhash in PHP (or other mod_* that uses > this). To do this, comment the line that enable mhash extension in > your php.ini - in my caseI edited /etc/php5/conf.d/mhash.ini (I use > Debian). > > I found this information > in:http://blog.foozia.com/blog/2007/may/20/cookie-problem-django-admin/ If it is that problem, the proper fix is to update your Python installation to one that Debian hasn't broken. See: http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_MD5_Hash_Module_Conflict http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440272 Graham --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on Apache (mod_python) administration cookie problem
Thank you very much for your replies, Alvaro and Graham! Removing php5-mhash solved the problem --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on Apache (mod_python) administration cookie problem
Hi Daniel, I am also facing the same problem. I really can't understand the technicalities of the solution offered in this thread. Since you seemed to have solved the problem, can you please give a little more details on how to do it Thanks in advance Regards Ganesh Daniel bodom_lx Graziotin wrote: > Thank you very much for your replies, Alvaro and Graham! > Removing php5-mhash solved the problem > > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on Apache (mod_python) administration cookie problem
On Oct 22, 10:52 am, "M.Ganesh" <[EMAIL PROTECTED]> wrote: > Hi Daniel, > > I am also facing the same problem. I really can't understand the > technicalities of the solution offered in this thread. Since you seemed > to have solved the problem, can you please give a little more details on > how to do it Disabling the PHP mhash module is only a workaround even if it does work. The proper fix if it is this issue is to refresh your Python 2.4 installation to get fixed version from Debian repository, or even perhaps upgrade to Python 2.5 and newer mod_python version which uses Python 2.5. Alternatively, disable PHP from Apache completely if you do not need it. Which of the three options don't you understand and are wanting more detail for? Graham > Thanks in advance > > Regards Ganesh > > Daniel bodom_lx Graziotin wrote: > > Thank you very much for your replies, Alvaro and Graham! > > Removing php5-mhash solved the problem --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on Apache (mod_python) administration cookie problem
Graham, Option 3: I use other utilities like wordpress and phpMyAdmin, so I cannot afford to disable php completely Option 2: I use Linux Mint (Ubuntu variant) for developement and Debian Etch for production. So for option 2, I will require two sets of instructions, which means more trouble for you. So let me skip that. Option 1: If this work around works for me, I'll get going and think of better permanent solutions later Kindly help me on option one (disabling PHP mhash) Thanks in advance Regards Ganesh Graham Dumpleton wrote: Disabling the PHP mhash module is only a workaround even if it does work. The proper fix if it is this issue is to refresh your Python 2.4 installation to get fixed version from Debian repository, or even perhaps upgrade to Python 2.5 and newer mod_python version which uses Python 2.5. Alternatively, disable PHP from Apache completely if you do not need it. Which of the three options don't you understand and are wanting more detail for? Graham Thanks in advance Regards Ganesh Daniel bodom_lx Graziotin wrote: Thank you very much for your replies, Alvaro and Graham! Removing php5-mhash solved the problem --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on Apache (mod_python) administration cookie problem
On Oct 25, 11:59 am, "M.Ganesh" <[EMAIL PROTECTED]> wrote: > Graham, > Option 3: I use other utilities like wordpress and phpMyAdmin, so I cannot > afford to disable php completely > Option 2: I use Linux Mint (Ubuntu variant) for developement and Debian Etch > for production. So for option 2, I will require two sets of instructions, > which means more trouble for you. So let me skip that. > Option 1: If this work around works for me, I'll get going and think of > better permanent solutions later > Kindly help me on option one (disabling PHP mhash) That one I can't help you with as know nothing about PHP. I presume there is a configuration file for PHP somewhere you need to edit and comment out load line for PHP mhash module. Graham > Thanks in advance > Regards Ganesh > Graham Dumpleton wrote:Disabling the PHP mhash module is only a workaround > even if it does work. The proper fix if it is this issue is to refresh your > Python 2.4 installation to get fixed version from Debian repository, or even > perhaps upgrade to Python 2.5 and newer mod_python version which uses Python > 2.5. Alternatively, disable PHP from Apache completely if you do not need it. > Which of the three options don't you understand and are wanting more detail > for? GrahamThanks in advance Regards Ganesh Daniel bodom_lx Graziotin > wrote:Thank you very much for your replies, Alvaro and Graham! Removing > php5-mhash solved the problem --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on Apache (mod_python) administration cookie problem
I am witnessing this issue using manage.py runserver. The only useful information I can give is this was working when I was running .97 (or whatever was the trunk a few months back), I recently upgraded to the latest trunk (~1.1) and now continually get this message. I suspect something has changed in the last few months and I missed whatever it was. I'm going to attempt to setup a dummy project and try this again. If anybody has some clue, please let me know, Cheers, Dave Dash On Sep 30, 5:05 pm, Álvaro Justen <[EMAIL PROTECTED]> wrote: > Ah, some details: > -> Admin interface runs OK with python manage.py runserver - as of it > is an Apache error, Django's web server isn't affected by this bug. > -> I'm using Debian etch as server: I've installed Apache, PHP and > mod_php with Debian packages, but Django installed manually. > -> Versions: > * Apache: Server version: Apache/2.2.3 > Server built: Mar 22 2008 09:29:10 > * PHP: PHP 5.2.0-8+etch11 (cli) (built: May 10 2008 10:46:24) > Copyright (c) 1997-2006 The PHP Group > Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies > * Django: 1.0-final-SVN-unknown > > -- > Cheers, > Álvaro Justen > Debian GNU/Linux user --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on Apache (mod_python) administration cookie problem
On Nov 4, 5:08 pm, Dave Dash <[EMAIL PROTECTED]> wrote: > I am witnessing this issue using manage.py runserver. > > The only useful information I can give is this was working when I was > running .97 (or whatever was the trunk a few months back), I recently > upgraded to the latest trunk (~1.1) and now continually get this > message. > > I suspect something has changed in the last few months and I missed > whatever it was. I'm going to attempt to setup a dummy project and > try this again. > > If anybody has some clue, please let me know, Clear the cookie for the application from your browser cache. Graham > Cheers, > > Dave Dash > > On Sep 30, 5:05 pm, Álvaro Justen <[EMAIL PROTECTED]> wrote: > > > Ah, some details: > > -> Admin interface runs OK with python manage.py runserver - as of it > > is an Apache error, Django's web server isn't affected by this bug. > > -> I'm using Debian etch as server: I've installed Apache, PHP and > > mod_php with Debian packages, but Django installed manually. > > -> Versions: > > * Apache: Server version: Apache/2.2.3 > > Server built: Mar 22 2008 09:29:10 > > * PHP: PHP 5.2.0-8+etch11 (cli) (built: May 10 2008 10:46:24) > > Copyright (c) 1997-2006 The PHP Group > > Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies > > * Django: 1.0-final-SVN-unknown > > > -- > > Cheers, > > Álvaro Justen > > Debian GNU/Linux user --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on Apache (mod_python) administration cookie problem
I had cleared the cookies, I also tried in another browser as well - same result. On Nov 3, 10:50 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Nov 4, 5:08 pm, Dave Dash <[EMAIL PROTECTED]> wrote: > > > I am witnessing this issue using manage.py runserver. > > > The only useful information I can give is this was working when I was > > running .97 (or whatever was the trunk a few months back), I recently > > upgraded to the latest trunk (~1.1) and now continually get this > > message. > > > I suspect something has changed in the last few months and I missed > > whatever it was. I'm going to attempt to setup a dummy project and > > try this again. > > > If anybody has some clue, please let me know, > > Clear the cookie for the application from your browser cache. > > Graham > > > Cheers, > > > Dave Dash > > > On Sep 30, 5:05 pm, Álvaro Justen <[EMAIL PROTECTED]> wrote: > > > > Ah, some details: > > > -> Admin interface runs OK with python manage.py runserver - as of it > > > is an Apache error, Django's web server isn't affected by this bug. > > > -> I'm using Debian etch as server: I've installed Apache, PHP and > > > mod_php with Debian packages, but Django installed manually. > > > -> Versions: > > > * Apache: Server version: Apache/2.2.3 > > > Server built: Mar 22 2008 09:29:10 > > > * PHP: PHP 5.2.0-8+etch11 (cli) (built: May 10 2008 10:46:24) > > > Copyright (c) 1997-2006 The PHP Group > > > Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies > > > * Django: 1.0-final-SVN-unknown > > > > -- > > > Cheers, > > > Álvaro Justen > > > Debian GNU/Linux user --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on apache and mod_python.... and problems
On Sat, Jun 21, 2008 at 9:02 PM, foxbunny <[EMAIL PROTECTED]> wrote: > > Hi, list, > > I'm trying to deploy a very simple Django app, and it's driving me > crazy. I've followed the docs and set up Apache with mod_python. Then > I uploaded the app, did syncdb, and everything works when I ./ > manage.py runserver on the remote host, but httpd won't serve it. I'm > using Django trunk rev 7722, and python 2.5.2 on Arch Linux, > mod_python is 3.3.1, and Apache is 2.2.8. > > You can see the error messages if you go to: > > http://blog.papa-studio.com/ > > > The summary of error messages is this: > > > AttributeError: 'module' object has no attribute 'blog' > > I've made sure that /papastudio/blog has __init.py__, and that it's > listed in INSTALLED_APPS (which is logical since the site actually > works if I ./manage.py runserver). > > I've left the site in debug mode, so that I can see what's going on, > but the errors are the same if I set debug to False. > > > Any ideas? > I'm assuming you have papastudio.blog listed in INSTALLED_APPS? Does apache have read access to the whole tree under /papastudio, including blog? It seems apache can read /papastudio, otherwise you'd get an 'ImportError: No module named papastudio'. Instead it can't find blog underneath it, which might mean it doesn't have read access to the blog subdirectory. Or else it's looking in the wrong place, in which case it'll help if you post where the code resides in the file system and the specifics of how you have configured Apache. Karen --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on apache and mod_python.... and problems
Hi, > The summary of error messages is this: > >> AttributeError: 'module' object has no attribute 'blog' > > I've made sure that /papastudio/blog has __init.py__, and that it's > listed in INSTALLED_APPS (which is logical since the site actually > works if I ./manage.py runserver). Did you follow the mod_python deploy instructions? There are a few things that may be happening. 1. The file needs to be '__init__.py', not '__init.py__', but I think that is probably just a typo in this email. 2. Make sure you have __init__.py in both `/papastudio/` and `/ papastudio/blog/`. 3. Is the base import (depending on what the entry in your INSTALLED_APPS looks like, if its `papastudio.blog` then it would be `papastudio`) in the Python path for your mod_python deploy? You will probably need to explicitly add it like in the instructions linked above. Your deploy will look something like this: SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE papastudio.settings PythonDebug Off PythonPath "['/path/to/papastudio'] + sys.path" > > I've left the site in debug mode, so that I can see what's going on, > but the errors are the same if I set debug to False. > Thats because they are being caught by mod_python, and not by Django. To turn it off change `PythonDebug On` to `PythonDebug Off` in your mod_python config file. Best of luck, Will --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django on apache and mod_python.... and problems
On Jun 22, 5:59 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > I'm assuming you have papastudio.blog listed in INSTALLED_APPS? > > Does apache have read access to the whole tree under /papastudio, including > blog? It seems apache can read /papastudio, otherwise you'd get an > 'ImportError: No module named papastudio'. Instead it can't find blog > underneath it, which might mean it doesn't have read access to the blog > subdirectory. Or else it's looking in the wrong place, in which case it'll > help if you post where the code resides in the file system and the specifics > of how you have configured Apache. > > Karen Karen, thanks a bunch! It was the exec permission, not read, but your e-mail gave me the hint. ;) I don't know how it happened that it lost the exec perms, but I got it 'fixed' now. Branko --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---