Hello everybody!
I'm using django 1.0-1 version and Apache as a server web. In the dev
server everything works fine but in the production server I get the
following error when I ask for a url:
If it works in one environment, but not another, then it might have
something to do with your settings files. When you create your links,
are you having the href be "/enter" or "/enter/"? I think the
middleware class you're reading about is for trailing slashes, not
preceeding ones.
On Nov 4, 9:35 am, Javi <JavierPe...@gmail.com> wrote:
> Hello everybody!
> I'm using django 1.0-1 version and Apache as a server web. In the dev
> server everything works fine but in the production server I get the
> following error when I ask for a url:
Thanks but I'd already tried it. I don't understand why in the
production server is not added the preceeding slash to the url. My
urls.py is as follows:
urlpatterns = patterns('candidateTool.assessmentSystem.views',
(r'^$', 'index'),
(r'^enter/$', 'enter'),
(r'^main/$', 'main'),
(r'^exam/(?P<exam_id>\d+)/$', 'exam'),
(r'^myexam/(?P<exam_id>\d+)/$', 'my_exam'),
(r'^solved/(?P<exam_id>\d+)/$', 'solved_exam'),
(r'^report/$', 'report'),
(r'^exams/$', 'exams'),
(r'^admin/(.*)', admin.site.root),
)
In the index page is called /enter and I've also tried /enter/ but
neither work :(
On Nov 4, 7:07 pm, Xiong Chiamiov <xiong.chiam...@gmail.com> wrote:
> If it works in one environment, but not another, then it might have
> something to do with your settings files. When you create your links,
> are you having the href be "/enter" or "/enter/"? I think the
> middleware class you're reading about is for trailing slashes, not
> preceeding ones.
> On Nov 4, 9:35 am, Javi <JavierPe...@gmail.com> wrote:
> > Hello everybody!
> > I'm using django 1.0-1 version and Apache as a server web. In the dev
> > server everything works fine but in the production server I get the
> > following error when I ask for a url:
> Thanks but I'd already tried it. I don't understand why in the
> production server is not added the preceeding slash to the url. My
> urls.py is as follows:
> urlpatterns = patterns('candidateTool.assessmentSystem.views',
> (r'^$', 'index'),
> (r'^enter/$', 'enter'),
> (r'^main/$', 'main'),
> (r'^exam/(?P<exam_id>\d+)/$', 'exam'),
> (r'^myexam/(?P<exam_id>\d+)/$', 'my_exam'),
> (r'^solved/(?P<exam_id>\d+)/$', 'solved_exam'),
> (r'^report/$', 'report'),
> (r'^exams/$', 'exams'),
> (r'^admin/(.*)', admin.site.root),
> )
> In the index page is called /enter and I've also tried /enter/ but
> neither work :(
Try, putting FORCE_SCRIPT_NAME='' in your settings file.
Also, how are you running the application in your production server
(Apache/mod_python, lighttpd/flup, nginx/proxy, etc.)?
I've tried putting FORCE_SCRIPT_NAME="" but everything continues at
the same state. I'm running the app in Apache2/mod_python. I've pasted
the htttp.conf file at http://rafb.net/p/Ya1VKT55.html
I'm going to continue trying to solve it.
On Nov 5, 7:11 pm, Rajesh Dhawan <rajesh.dha...@gmail.com> wrote:
> I've tried putting FORCE_SCRIPT_NAME="" but everything continues at
> the same state. I'm running the app in Apache2/mod_python. I've pasted
> the htttp.conf file athttp://rafb.net/p/Ya1VKT55.html
> I'm going to continue trying to solve it.
> On Nov 5, 7:11 pm, Rajesh Dhawan <rajesh.dha...@gmail.com> wrote:
> > Hi Javi,
> > > Thanks but I'd already tried it. I don't understand why in the
> > > production server is not added the preceeding slash to the url. My
> > > urls.py is as follows:
> > > urlpatterns = patterns('candidateTool.assessmentSystem.views',
> > > (r'^$', 'index'),
> > > (r'^enter/$', 'enter'),
> > > (r'^main/$', 'main'),
> > > (r'^exam/(?P<exam_id>\d+)/$', 'exam'),
> > > (r'^myexam/(?P<exam_id>\d+)/$', 'my_exam'),
> > > (r'^solved/(?P<exam_id>\d+)/$', 'solved_exam'),
> > > (r'^report/$', 'report'),
> > > (r'^exams/$', 'exams'),
> > > (r'^admin/(.*)', admin.site.root),
> > > )
> > > In the index page is called /enter and I've also tried /enter/ but
> > > neither work :(
> > Try, putting FORCE_SCRIPT_NAME='' in your settings file.
> > Also, how are you running the application in your production server
> > (Apache/mod_python, lighttpd/flup, nginx/proxy, etc.)?
> I've tried putting FORCE_SCRIPT_NAME="" but everything continues at
> the same state. I'm running the app in Apache2/mod_python. I've pasted
> the htttp.conf file athttp://rafb.net/p/Ya1VKT55.html
I can't see your conf file there. Perhaps you want to paste again at
http://dpaste.com/ ?
Take a look at the django.root PythonOption described here:
> > I've tried putting FORCE_SCRIPT_NAME="" but everything continues at
> > the same state. I'm running the app in Apache2/mod_python. I've pasted
> > the htttp.conf file athttp://rafb.net/p/Ya1VKT55.html
> I can't see your conf file there. Perhaps you want to paste again athttp://dpaste.com/?
> Take a look at the django.root PythonOption described here: