PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, July 15, 2022

[FIXED] How to link one page to another by hyperlink in Django?

 July 15, 2022     html, web-deployment     No comments   

Issue

I want to create a Home page through which I could go to the other pages that I have created. Suppose I have a home page in which I have two options:

Now, from this home page by click onto the My work option I want to go to another page where I have the information related to my work, how can I do so?

My home page HTML is:

{% extends 'base.html' %}
{% block content %} <h1>Home Page</h1>
 <ul>
     <li>My Achievements</li>
     <li> My Work</li> </ul>
{% endblock %}

The base.html:

<!DOCTYPE html> <html>
<head> </head>
 <body>
 {% block content %}
 {% endblock %}
 </body> </html>

Solution

I'd suggest taking a look at one of a number of tutorials for getting started with web development using Django.

https://docs.djangoproject.com/en/2.2/intro/tutorial01/ or https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/skeleton_website These should help you more deeply understand what you're asking as a question, and the technologies you're using. I'd also recommend browsing this link to learn a bit more about HTML itself and the various tags usable in it.

To more directly answer your question, the <a> tag mentioned by Abhijith is what's used to create a reference between pages.



Answered By - Bard117
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing