Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

276
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!