Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

286
Vistas
How to pass slug value to a template?

I am able to access username1/editin the URL but not able to do so by clicking a link in the template.

urls.py

url(r'^(?P<slug>[-\w\d]+)/edit/$', ProfileEdit.as_view(), name='profile_edit'),

template.html

<a href="{% url 'profile:profile_edit' %}">edit</a>

i get the following error

Reverse for 'profile_edit' with arguments '()' and keyword arguments '{}' not found. 1 pattern(s) tried: ['(?P[-\w\d]+)/edit/$']

i get the problem is not sending the slug value to the url. but how to send the slug value from a template?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Answer for the question:

<a href="{% url 'profile:profile_edit' slug=profile.slug %}">Edit</a>

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda