The link is in the base.html of spweb app:

<a class="mainmenuitemlink" href="index">NEWS</a>

2014. augusztus 24., vasárnap 16:59:53 UTC+2 időpontban Tundebabzy a 
következőt írta:
>
> How did you write the link as a relative link un your template? 
> On 24 Aug 2014 12:30, "Jagger" <zun...@gmail.com <javascript:>> wrote:
>
>>  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...@googlegroups.com <javascript:>.
>> To post to this group, send email to django...@googlegroups.com 
>> <javascript:>.
>> 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
>>  
>> <https://groups.google.com/d/msgid/django-users/9df70c1b-a7c9-4f86-8d1a-9421bd014e4b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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+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/2b05d502-1c97-459d-bd0b-bec9745089b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to