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+unsubscr...@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.

Reply via email to