I'm using mod_wsgi. which contains this to point to settings:
os.environ['DJANGO_SETTINGS_MODULE'] = 'helpdesk.settings'
application = WSGIHandler()

My settings.py has:
#
ROOT_URLCONF = 'helpdesk.urls'
#
INSTALLED_APPS = (
#
    'helpdesk.support',
#
)


If I manually key in example.com/helpdesk/support/case/1/ it renders
the correct view. It's only on the redirect that I'm having trouble.

I've got django installed as an app at example.com/helpdesk/ so it's
not on the root.  And I suspect this is related to the cause.  But I
can't find where.

What I can't wrap my head around is that the url works when keyed in,
but won't reverse to the same thing.

On Dec 29, 12:35 am, Raja <rajas...@gmail.com> wrote:
> Are you running it through a mod-python handler? From your urls.py, it
> looks like it would handle ^support as the first level match and then
> continue for "/case", so the reverse URL seems to be correct, i.e. /
> support/case/1.
>
> How are you tacking the "/helpdesk" to your request initially?
>
> On Dec 29, 6:22 am, davathar <davat...@gmail.com> wrote:
>
> > I'm stuck on a "reverse" problem.  The 'case' view is supposed to
> > record posted info, then reload the same page.  But it's dropping the
> > first part of the URL on the redirect and I've not been able to figure
> > out why.
>
> > It should be going to .com/helpdesk/support/case/1/  But it's going
> > to .com/support/case/1/
>
> > I'm sure it's something simple as I've had the problem in the past and
> > fumbled my way through it.  But I can't find it this time.  Hopefully
> > the below pasted lines show all the necessary detail.
>
> > Anyone see my error?
>
> > helpdesk.urls:
> > urlpatterns = patterns('',
> >     (r'^support/', include('helpdesk.support.urls')),
> > )
>
> > helpdesk.support.urls:
> > urlpatterns = patterns('helpdesk.support.views',
> >     (r'^case/(?P<case>\d+)/$', 'case',{},'case_url' ),
> > )
>
> > helpdesk.support.views:
> > def case(request, case):
> >     return HttpResponseRedirect(reverse('case_url', args=(case.id,)))
> > # Redirect back here after POST
>
> > -Shane

--

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.


Reply via email to