How did you write the link as a relative link un your template?
Hi Everyone!
I use Python 2.7 and Django 1.6 on Xubuntu 14.04.
I'm a beginner. My problem is:
The root URLConf:
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^', include('spweb.urls')),
)
The URLConf of spweb app:
from django.conf.urls import patterns, url
from spweb import views
urlpatterns = patterns('',
url(r'^$', views.index, name='index'),
url(r'^index/$', views.index, name='index'),
url(r'^contact/$', views.contact, name='contact'),
)
In a browser the first click on a link link points to http://127.0.0.1:8000/index (OK, that's correct. This is what I expect to happen.)
But the second click on the same link points to http://127.0.0.1:8000/index/index (That's wrong. Why did the url change???)
Thans for your answers!
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9df70c1b-a7c9-4f86-8d1a-9421bd014e4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BWjgXPXYbTBNWgpX5Ofe%2B1zMA4JMZVt-c3udCmmhF94YtDf_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment