On Jan 18, 8:46 pm, Adam Yee <adamj...@gmail.com> wrote:
> On Jan 17, 8:36 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
> wrote:
>
>
>
> > On Jan 18, 2:53 pm, Adam Yee <adamj...@gmail.com> wrote:
>
> > > It was a slam dunk for completing the tutorial in the development
> > > server, but I can't figure out this issue I'm having with the generic
> > > views while using my apache server. I'm unable to get the vote view
> > > to redirect correctly.
>
> > > My apache error seen here with both urls.py and views.py. The apache
> > > config is at the bottom.
>
> > >http://dpaste.com/110275/
>
> > I'm in the middle of something else at the moment and my internet
> > connection is dodgy, so I can't reliably look this up, however, one
> > wild guess: Since the error you're seeing suggests that the '/mysite'
> > portion is being stripped, this is possibly one of the cases where the
> > Alias (or WSGIAlias in this case) has to end with a trailing slash.
> > You've written the WSGIAlias as "/mysite", try "/mysite/" instead.
>
> > Again, this may be complete rubbish, but it's a common enough error
> > with Alias commands, although I can't remember how it works with
> > trailing script specifications (like ..../django.wsgi). Still, it will
> > only take 30 seconds to test and if I'm wrong, you're no worse off.
>
> > Regards,
> > Malcolm
>
> Adding the trailing slash to /mysite/ resulted in getting 404s on all
> views. Read over Apache's docs
>
> http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias
>
> and it says something about the URL not being aliased if you add the
> trailing /. I don't quite fully understand it.
>
> However, removing 'mysite' and leaving just the / has fixed the
> response/redirect problem. The index generic view is now
> athttp://127.0.0.1/polls/and all the rest follows as instructed in the
> tutorial.
>
> I'm still very puzzled by not being able to use '/mysite'. I agree
> with you that somewhere '/mysite' is being stripped or just not being
> accessed at all. My guess is somewhere in the generic views and/or
> how they are set up in the urlconfs. It seems because the vote view
> isn't a generic view, it's unable to redirect to a generic view.
> Feels like something is missing. Does that make any sense?
What version of Django are you using?
What is in your WSGI script file?
You aren't using Django 1.0 by chance, but have used the workaround
described in mod_wsgi wiki documentation related to mounting at sub
URL which should only be used for Django prior to 1.0. Using that
workaround would cause strange problems with Django 1.0.
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
django-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---