Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67527

How can I connect my buttons with two URLs in django?

$
0
0

I'm trying to connect a template that has two buttons with other two templates. The first button sends you to a login form and the second to a register one. I want to know how to modify my HTML template for it to do this.

paginaPrincipal.html

{% extends "base.html" %}
{% block titulo %} PAGINA PRINCIPAL {% endblock %}

{%block contenido %}

<p>Tengo una cuenta</p><p><button>Iniciar Sesion</button></p><p>No tengo una cuenta</p><p><button>Registrarse</button></p>

{% endblock %}

urls.py

path('principal/', views.intro, name='pagina_principal'),
path('registro/', views.registro_usuario, name='registro_usuario'),
path('login/', views.login_view, name="login"),

I want to connect those two button tags with login and registro urls, I guess I have to use the a tags but I don't know how to do this.

Help is much appreciated


Viewing all articles
Browse latest Browse all 67527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>