tag:blogger.com,1999:blog-2363643920942057324.post5322237241401383060..comments2023-08-09T23:00:54.857+10:00Comments on Graham Dumpleton: An improved WSGI script for use with Django.Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.comBlogger43125tag:blogger.com,1999:blog-2363643920942057324.post-8357613867979768652016-12-15T12:08:31.588+11:002016-12-15T12:08:31.588+11:00If it is related to Django, possibly better to ask...If it is related to Django, possibly better to ask on StackOverflow or the Django users mailing list. If it is a mod_wsgi issue, use the mod_wsgi mailing list.Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-45918079648391906692016-12-15T11:57:28.365+11:002016-12-15T11:57:28.365+11:00@Graham Dumpleton I'm grateful too for you and...@Graham Dumpleton I'm grateful too for you and this posting. (In)fortunately, like you mention much has changed since, but I'm still having problems with getting my application URLs included by Django and served by mod_wsgi. I cannot find help. Could you point me to a newer posting or solution? It runs great witn runserver.<br /><br />Thanks!Da Tijuca pra Albuquerquehttps://www.blogger.com/profile/18178398090986864757noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-77546170032611172092016-04-08T09:40:21.587+10:002016-04-08T09:40:21.587+10:00@Jason Wolfe: If you are still having issues which...@Jason Wolfe: If you are still having issues which even necessitate needing to know this I would be surprised. My understanding is that Django versions since this was posted have been changed and so a lot of the information here is not really relevant now. I certainly wouldn't be copy and pasting any code snippets from here to use and expect them to work with newer Django versions.Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-21538963059810553652016-04-08T09:17:30.926+10:002016-04-08T09:17:30.926+10:00I must say that I am incredibly grateful that ther...I must say that I am incredibly grateful that there are those as yourself out there who take the time to share what they know on a subject.... I thank you profusely for going through this... now I just have to say... Oh my god. Please get to the point! haha. For those of us who just want an enumeration of the differences and how to solve the problem (because we don't care about being Django Anonymoushttps://www.blogger.com/profile/14537960218786178681noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-1368351315856692712013-12-19T14:25:40.407+11:002013-12-19T14:25:40.407+11:00This post related to an old version of Django and ...This post related to an old version of Django and may not be completely accurate for newer versions of Django. It may not even be appropriate for newer Django versions, so why specifically are you trying it.<br /><br />The code would also possibly be dependent on both the project directory and its parent being on sys.path for module imports to work, something which is discouraged in recent DjangoGraham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-69585168280075494312013-12-19T02:41:22.737+11:002013-12-19T02:41:22.737+11:00the alternate file you provided isn't working ...the alternate file you provided isn't working for me on windows with apache configured as "Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o mod_wsgi/3.3 Python/2.7.6 PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1", I get an error on the "import settings" line, stating "ImportError: No module named settings"Marcphttps://www.blogger.com/profile/02572884823929945682noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-163876821441015292012-03-29T13:25:34.116+11:002012-03-29T13:25:34.116+11:00Erik. They have done some cleanup of WSGI applicat...Erik. They have done some cleanup of WSGI application entry point in latest version. They now generate a wsgi.py file and have eliminated I think the double import. They still don't preload by way of triggering management commands.Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-75601493293169836752012-03-29T13:21:00.256+11:002012-03-29T13:21:00.256+11:00Graham,
From your presentation at:
http://blip.t...Graham,<br /><br />From your presentation at:<br /><br />http://blip.tv/pycon-australia/getting-started-with-apache-mod_wsgi-3859481<br /><br />you seemed to hope that future Django releases might make this preloading work unnecessary. Is this true for Django 1.3.1 with mod_wsgi 3.3.1?<br /><br />Thanks for all your work!<br /><br />ErikErikhttps://www.blogger.com/profile/01146766980742337635noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-84014438323150314062011-07-29T17:29:54.455+10:002011-07-29T17:29:54.455+10:00"What would be nice though is if Django simpl..."What would be nice though is if Django simply supplied a WSGI application entry point that could be supplied the site directory and which would internally simply ensure that everything is done correctly so that it behaves the same as the Django development server."<br /><br />YES!!! The best is if we don't have to do any configuration at all. At least minimal configuration.ruffyleafhttps://www.blogger.com/profile/00922058885729547123noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-82880214622622671372011-04-16T05:33:36.338+10:002011-04-16T05:33:36.338+10:00I'm unable to completely remove the project na...I'm unable to completely remove the project name from app models imports under apache/wsgi. The projects are named differently in my development and production environments (probably my first mistake), so I need to be able to get the project name entirely out of the codebase.<br /><br />I can take it out completely in my development environment, but not with my apache/wsgi production Unknownhttps://www.blogger.com/profile/13593167762436347096noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-25858537263406246012011-03-29T21:14:23.431+11:002011-03-29T21:14:23.431+11:00If you have any further issues/comments with this ...If you have any further issues/comments with this blog post, please use the mod_wsgi mailing list. Thanks.Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-91370626399238529632011-03-29T20:54:29.000+11:002011-03-29T20:54:29.000+11:00Dear Graham,
Thanks for the excellent blog. I jus...Dear Graham,<br /><br />Thanks for the excellent blog. I just needed to add the path line of the parent directory of the directory that contains settings.py and everything worked like a charm.<br /><br />Do media files automatically get served by apache once everything is setup? I did not expect this to be the case. Kindly do let me know.<br /><br />Thanks once again.<br /><br />Yours sincerely,<Unknownhttps://www.blogger.com/profile/02418259698216326058noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-51275624437609186932011-02-07T16:40:29.522+11:002011-02-07T16:40:29.522+11:00This comment has been removed by a blog administrator.danolshttps://www.blogger.com/profile/17262933369663372020noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-89887210540400527282011-02-07T11:27:43.555+11:002011-02-07T11:27:43.555+11:00This comment has been removed by a blog administrator.danolshttps://www.blogger.com/profile/17262933369663372020noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-9691725426046497642011-01-26T14:48:25.385+11:002011-01-26T14:48:25.385+11:00Touche! I hope this issue gets some attention from...Touche! I hope this issue gets some attention from Django core developers. The docstring of get_script_name() actually makes mention of a DJANGO_USE_POST_REWRITE setting which isn't even used in the function -- there's no reference to it anywhere in the code base, nor on the users or developers lists.Anonymoushttps://www.blogger.com/profile/03412253648404859888noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-7771869469679403242011-01-26T12:59:55.911+11:002011-01-26T12:59:55.911+11:00David, I hope you are following my updates on that...David, I hope you are following my updates on that Django ticket you pointed out. It is frightfully more complicated than you think it is. ;-)Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-15278517958073310742011-01-26T08:50:29.496+11:002011-01-26T08:50:29.496+11:00David, highlighting things like that is what the m...David, highlighting things like that is what the mod_wsgi mailing list is for. Details of mailing list on mod_wsgi site wiki.Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-19255248014367072862011-01-26T03:49:20.642+11:002011-01-26T03:49:20.642+11:00Graham, sorry, you're right -- my comment was ...Graham, sorry, you're right -- my comment was really meant for the Django Integration page on the mod_wsgi wiki, but I could not comment there, and I got to this blog post from a link in that article. After I tried the solution here and it didn't solve my problem, I did some more searching and found the Django bug report. Your blog post has obviously helped a number of people, but I Anonymoushttps://www.blogger.com/profile/03412253648404859888noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-30098731931373034622011-01-25T14:01:14.504+11:002011-01-25T14:01:14.504+11:00David, that bug as I can see though has got nothin...David, that bug as I can see though has got nothing to do with what the blog post is about, so not sure why you are mentioning it here.Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-57238040490799620752011-01-25T10:46:32.906+11:002011-01-25T10:46:32.906+11:00Please note that there is also an outstanding Djan...Please note that there is also an outstanding Django bug (<a href="http://code.djangoproject.com/ticket/12464" rel="nofollow">#12464</a>) which causes URL problems when the WSGI alias is "/path" (i.e., not /) and the URL request path is "/path" (i.e., no trailing slash). The only solution in that case seems to be to add a redirect in Apache from "/path" to "/Anonymoushttps://www.blogger.com/profile/03412253648404859888noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-34590318743610296612011-01-18T00:33:48.935+11:002011-01-18T00:33:48.935+11:00It has saved my day =] Thanks so much, it really w...It has saved my day =] Thanks so much, it really works fine.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-24729717474979614172011-01-07T14:16:42.452+11:002011-01-07T14:16:42.452+11:00@primeq A lot of this could be sorted if someone c...@primeq A lot of this could be sorted if someone could just supply me with a relatively small Django site example which exhibits the sort of problem, reasonably reliably, that this alternate way of doing things is fixing. If had that, then could identify the cause and potentially what, if anything, that people are doing wrong and then ensure the Django folks document it as bad practice and prone Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-78184663702261302832011-01-07T14:13:13.403+11:002011-01-07T14:13:13.403+11:00Django is great. Python is great. But when you nee...Django is great. Python is great. But when you need to give your life to something to make it work a lot of people will just walk.<br /><br />You may be right with "Django devs think it should not be needed ...then users are using Django wrongly", but there's a sure way to fix it - said Django devs should post a guaranteed-to-work, self-contained example (not there, too many primeqhttps://www.blogger.com/profile/10821112074359016243noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-52497176208156360752010-12-14T22:45:41.955+11:002010-12-14T22:45:41.955+11:00@bvcelari
Problem is that this alternate script i...@bvcelari<br /><br />Problem is that this alternate script is really a workaround. Django devs think it should not be needed and that if it is then users are using Django wrongly.<br /><br />Thus, using the script could be masking a problem in your code which might come back and bight you in other ways.Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-43346438953298346562010-12-14T22:30:11.286+11:002010-12-14T22:30:11.286+11:00Graham,
Thank you very much for this post. Trying ...Graham,<br />Thank you very much for this post. Trying to make configuration for wsgi with apcahe was hardly imposible.... with your help, fixed in minutes.<br />Thanks for your time and effort.<br />bvcelaribvcehttps://www.blogger.com/profile/02090509364532760353noreply@blogger.com