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

278
Vistas
Django range input instead of text

I am using django forms as you can see in the view.py file and the result is to have a text box.I can submit values numbers and then use this numbers to run script.py etc. I want to do the same with a range input instead of text so that every time the value on the slider change.

My views.py

def get_name(request):
form = NameForm()
if request.method == 'POST': 
    a = request.POST['your_name'] # do somethink with the value entered in the form
    print(a)
    a = int(a) 
    while a>0:
        print(a)
        a = a -1

return render(request, 'personal/code2.html', {'form': form})

My code2.html

{% extends "personal/header.html" %}
{% block content %}

<form action="" method="POST">
{% csrf_token %}
{{form}}
</form>

{% endblock %}

And my forms.py

from django import forms

class NameForm(forms.Form):
  your_name = forms.DurationField(label='% Brightness ')
over 4 years ago · Santiago Trujillo
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