Re: {% url admin:index %} generating wrong urls

2010-01-12 Thread Chris Withers
davathar wrote: Unfortunately adding the rewrite rule mentioned as a work around hasn't worked for me. Please post the relevant section of your Apache config (including your wsgi *and* rewrite lines), there's no reason the rewrite rule workaround shouldn't work for you... Chris -- Simplist

Re: {% url admin:index %} generating wrong urls

2010-01-03 Thread davathar
This one has bitten me too. It also manifests when using the 'reverse' function like so: return HttpResponseRedirect(reverse('admin_url')) Instead of redirecting to /studio/admin/ it redirects to /admin/ So, while /studio/admin/ resolves well, reversing the path doesn't yield the reverse. I'm

Re: {% url admin:index %} generating wrong urls

2009-12-29 Thread Chris Withers
Karen Tracey wrote: > There is at least one bug open on empty PATH_INFO handling: > > http://code.djangoproject.com/ticket/9435 > > though it doesn't sound like it's focused on exactly the same issue, No, I had as thorough a look as I could and could find no issue which directly covered this i

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Karen Tracey
On Sat, Dec 26, 2009 at 6:54 PM, Chris Withers wrote: > Karen Tracey wrote: > > In my case, environ.get('SCRIPT_URL', u'') and > > environ.get('REDIRECT_URL', u'') both return empty. > > I wonder what SCRIPT_URL is and why it's empty for you but not for me? > > It's set by mod_rewrite: http://htt

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Karen Tracey wrote: > In my case, environ.get('SCRIPT_URL', u'') and > environ.get('REDIRECT_URL', u'') both return empty. I wonder what SCRIPT_URL is and why it's empty for you but not for me? I wonder if SCRIPT_URL having a value is something that came along with a later version of mod_wsgi?

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Karen Tracey
On Sat, Dec 26, 2009 at 6:07 PM, Chris Withers wrote: > Graham Dumpleton wrote: > > > >> I also added a {{request}} to the base.html of the django > >> app. Here's the output of the request's SCRIPT_NAME for various urls: > >> > >> /studio - u'' > >> /studio/ - u'/studio' > >> /test - '/tes

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Karen Tracey
On Sat, Dec 26, 2009 at 5:59 PM, Chris Withers wrote: > Karen Tracey wrote: > > On Sat, Dec 26, 2009 at 5:32 PM, Chris Withers > > wrote: > > > > > > If anyone can tell me how to do "httpd -X" on a debian or ubuntu host > > I'd be very grateful... > > > > >

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Graham Dumpleton wrote: > >> I also added a {{request}} to the base.html of the django >> app. Here's the output of the request's SCRIPT_NAME for various urls: >> >> /studio - u'' >> /studio/ - u'/studio' >> /test - '/test' >> /test/- '/test/' > > Hmmm, that would suggest that it is Dj

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Karen Tracey wrote: > On Sat, Dec 26, 2009 at 5:32 PM, Chris Withers > wrote: > > > If anyone can tell me how to do "httpd -X" on a debian or ubuntu host > I'd be very grateful... > > > /usr/sbin/apache2 -X For me that gave: # /usr/sbin/apache2 -X apach

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Karen Tracey
On Sat, Dec 26, 2009 at 5:32 PM, Chris Withers wrote: > > If anyone can tell me how to do "httpd -X" on a debian or ubuntu host > I'd be very grateful... > > /usr/sbin/apache2 -X Karen -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Graham Dumpleton wrote: > >> How can I step through execution from the django.wsgi file and see where >> I get to? I'm guessing putting an "import pdb; pdb.set_trace()" in the >> django.wsgi file won't do what I want? > > Sort of, but you have to run Apache in single process mode. See > further d

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Graham Dumpleton
On Dec 26, 11:18 pm, Chris Withers wrote: > Graham Dumpleton wrote: > > > As I told you when you tried to use private email to get me to help on > > this, > > Apologies for that, I was actually trying to use Google's web UI to > reply to that thread in context. Their UI obvious sucks more than I

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Graham Dumpleton wrote: > > As I told you when you tried to use private email to get me to help on > this, Apologies for that, I was actually trying to use Google's web UI to reply to that thread in context. Their UI obvious sucks more than I realised as it just sent a private mail to you :-(

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Karen Tracey wrote: > Can anyone tell me what I'm doing wrong? > > > No idea. I can't recreate by copy & pasting you urlpatterns. Tried on > Django 1.1.1 and current trunk. I've got mod_wsgi 2.3 instead of 2.5 > but I doubt that makes a difference for this -- everything else the same >

Re: {% url admin:index %} generating wrong urls

2009-12-25 Thread Karen Tracey
On Thu, Dec 24, 2009 at 2:56 PM, Chris Withers wrote: > Hi All, > > My django site is served up with the following in Apache's config: > > WSGIScriptAlias /studio /django/studio/bin/django.wsgi > > My urls.py looks like: > > urlpatterns += patterns( > 'django.contrib', > (r'^admin/', inclu

Re: {% url admin:index %} generating wrong urls

2009-12-25 Thread rebus_
2009/12/24 Chris Withers : > Hi All, > > My django site is served up with the following in Apache's config: > > WSGIScriptAlias /studio /django/studio/bin/django.wsgi > > My urls.py looks like: > > urlpatterns += patterns( >     'django.contrib', >     (r'^admin/', include(admin.site.urls)), >    

{% url admin:index %} generating wrong urls

2009-12-24 Thread Chris Withers
Hi All, My django site is served up with the following in Apache's config: WSGIScriptAlias /studio /django/studio/bin/django.wsgi My urls.py looks like: urlpatterns += patterns( 'django.contrib', (r'^admin/', include(admin.site.urls)), (r'^accounts/login/$', 'auth.views.login'),