Re: cicking to menu in navebar leads another subpage /subpage

2019-07-10 Thread Surya Adhikari
 Products 


On Mon, 8 Jul 2019 at 22:25, Jani Tiainen  wrote:

> Hi.
>
> There are two things wrong.
>
> First and most important is that you should always use {%url %} template
> tag to form urls to other django urls and preferably by using named url
> patterns.
>
> Secondly your hardcoded urls are relative. So each time you click link it
> is appended to current url. If you would have been using url-tag you even
> wouldn't have this problem.
>
> ma 8. heinäk. 2019 klo 18.51 Surya Adhikari 
> kirjoitti:
>
>> i have a menu bar as, HOME   GALLERY
>> When i click Home its the index page which is being display after when i
>> click Gallary dropdown menu as  house it redirects to  search.html . BUT
>> when i  again click hotel it redirects to  127.0.0.1/search/ search1
>> insted of 127.0.0.1/search1.
>>
>>
>>
>> i have 3 web pages as:  search.html, search1.html, search2.html. i am
>> inheriting search.html to all of those HTML file.
>>
>> My code:
>>
>>
>>
>> 
>>
>>   Home
>>
>>   
>> Gallary
>>   
>> 
>> 
>>house
>>   hotel
>>   hospital
>>
>> 
>>
>> --
>> 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 https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/b9c81c3c-30e0-4b3c-84cc-5316ac408089%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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHn91ocs4%2BSPnYpAA0w29d8rXv8-OVuw%3DLxAs-D_o-ErP%3DxAFw%40mail.gmail.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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM8afuJH7Yfhn3WfT-e4b%2BxCnLWkeDiWB2HUmEwYorkZe1MypA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: cicking to menu in navebar leads another subpage /subpage

2019-07-09 Thread Jani Tiainen
It is explained at least in official tutorial part 3 in very detail.

https://docs.djangoproject.com/en/2.2/intro/tutorial03/


ti 9. heinäk. 2019 klo 16.34 Surya Adhikari 
kirjoitti:

>  Home 
>
> like this also it is not working can you please exaplin me where and how 
> should i use {% url %}
>
>
> On Monday, 8 July 2019 22:26:07 UTC+5:45, Jani Tiainen wrote:
>>
>> Hi.
>>
>> There are two things wrong.
>>
>> First and most important is that you should always use {%url %} template
>> tag to form urls to other django urls and preferably by using named url
>> patterns.
>>
>> Secondly your hardcoded urls are relative. So each time you click link it
>> is appended to current url. If you would have been using url-tag you even
>> wouldn't have this problem.
>>
>> ma 8. heinäk. 2019 klo 18.51 Surya Adhikari 
>> kirjoitti:
>>
>>> i have a menu bar as, HOME   GALLERY
>>> When i click Home its the index page which is being display after when i
>>> click Gallary dropdown menu as  house it redirects to  search.html . BUT
>>> when i  again click hotel it redirects to  127.0.0.1/search/ search1
>>> insted of 127.0.0.1/search1.
>>>
>>>
>>>
>>> i have 3 web pages as:  search.html, search1.html, search2.html. i am
>>> inheriting search.html to all of those HTML file.
>>>
>>> My code:
>>>
>>>
>>>
>>> 
>>>
>>>   Home
>>>
>>>   
>>> Gallary
>>>   
>>> 
>>> 
>>>house
>>>   hotel
>>>   hospital
>>>
>>> 
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/b9c81c3c-30e0-4b3c-84cc-5316ac408089%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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f1687106-1103-4de8-9e0f-8721054bedd6%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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91oeOQqw7EHFPhWYF2_OKFGEX-3ghAP-OoCFT0MSREvgJ4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: cicking to menu in navebar leads another subpage /subpage

2019-07-09 Thread Surya Adhikari


 Home 

like this also it is not working can you please exaplin me where and how should 
i use {% url %}


On Monday, 8 July 2019 22:26:07 UTC+5:45, Jani Tiainen wrote:
>
> Hi.
>
> There are two things wrong.
>
> First and most important is that you should always use {%url %} template 
> tag to form urls to other django urls and preferably by using named url 
> patterns.
>
> Secondly your hardcoded urls are relative. So each time you click link it 
> is appended to current url. If you would have been using url-tag you even 
> wouldn't have this problem.
>
> ma 8. heinäk. 2019 klo 18.51 Surya Adhikari  > kirjoitti:
>
>> i have a menu bar as, HOME   GALLERY   
>> When i click Home its the index page which is being display after when i 
>> click Gallary dropdown menu as  house it redirects to  search.html . BUT  
>> when i  again click hotel it redirects to  127.0.0.1/search/ search1 
>> insted of 127.0.0.1/search1. 
>>
>>
>>
>> i have 3 web pages as:  search.html, search1.html, search2.html. i am 
>> inheriting search.html to all of those HTML file.
>>
>> My code:
>>
>>
>>
>> 
>>
>>   Home
>>  
>>   
>> Gallary 
>>   
>> 
>> 
>>house
>>   hotel
>>   hospital
>>  
>> 
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/b9c81c3c-30e0-4b3c-84cc-5316ac408089%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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f1687106-1103-4de8-9e0f-8721054bedd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: cicking to menu in navebar leads another subpage /subpage

2019-07-08 Thread Jani Tiainen
Hi.

There are two things wrong.

First and most important is that you should always use {%url %} template
tag to form urls to other django urls and preferably by using named url
patterns.

Secondly your hardcoded urls are relative. So each time you click link it
is appended to current url. If you would have been using url-tag you even
wouldn't have this problem.

ma 8. heinäk. 2019 klo 18.51 Surya Adhikari 
kirjoitti:

> i have a menu bar as, HOME   GALLERY
> When i click Home its the index page which is being display after when i
> click Gallary dropdown menu as  house it redirects to  search.html . BUT
> when i  again click hotel it redirects to  127.0.0.1/search/ search1
> insted of 127.0.0.1/search1.
>
>
>
> i have 3 web pages as:  search.html, search1.html, search2.html. i am
> inheriting search.html to all of those HTML file.
>
> My code:
>
>
>
> 
>
>   Home
>
>   
> Gallary
>   
> 
> 
>house
>   hotel
>   hospital
>
> 
>
> --
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b9c81c3c-30e0-4b3c-84cc-5316ac408089%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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91ocs4%2BSPnYpAA0w29d8rXv8-OVuw%3DLxAs-D_o-ErP%3DxAFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


cicking to menu in navebar leads another subpage /subpage

2019-07-08 Thread Surya Adhikari
i have a menu bar as, HOME   GALLERY   
When i click Home its the index page which is being display after when i 
click Gallary dropdown menu as  house it redirects to  search.html . BUT  
when i  again click hotel it redirects to  127.0.0.1/search/ search1 insted 
of 127.0.0.1/search1. 



i have 3 web pages as:  search.html, search1.html, search2.html. i am 
inheriting search.html to all of those HTML file.

My code:




   
  Home
 
  
Gallary 
  


   house
  hotel
  hospital
 


-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b9c81c3c-30e0-4b3c-84cc-5316ac408089%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.