Question:
Fix webapp stops working issue in Django

To Fix web app stops working issue in Django- Python webapp you will need to supply a name attribute for your URLs and then use that in your link tags. 


Edit your code as below:


urlpatterns = [


    path('', views.home, name='home'),

    path('work', views.work, name='work'),

    path('resume', views.Resume, name='resume'),

    path('education', views.education, name='education'),

    path('contact',views.contact, name='contact'),

    path('experience',views.experience, name='experience'),

]



<div class="topbar">

    <header>

        <li><a id="TOP_name" href="home"><img src="{%static 'prasant1.png' %}" height="50"></a></li>

    </header>

    <ul>

        <li><a id="right" href="{% url 'contact' %}">CONTACT</a></li>

        <li><a id="right" href="{% url 'resume' %}">RESUME</a></li>

        <li><a id="right" href="{% url 'work' %}">WORK</a></li>

        <li><a id="right" href="{% url 'experience' %}">EXPERIENCE</a></li>

        <li><a id="right" href="{% url 'education' %}">EDUCATION</a></li>

    </ul>

</div>


Suggested blogs:

>Step by Step guide to Deploy Terraform in Azure using GitHub Actions

>Testing react components using Hooks and Mocks

>Use Firebase Realtime Database with ASP.NET MVC App

>Use of Singletons in .NET Core in AWS Lambda

>What are common syntax errors and exceptions in Python

>What are the steps to fix error while downloading PDF file- Python

>What is data binding in Angular?


Ritu Singh

Ritu Singh

Submit
0 Answers