Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

121
Visualizações
Cómo mostrar el valor actual del campo de entrada de rango (control deslizante)

lo que quieres lograr

イメージ説明

Quiero ingresar números en la forma django de esta manera.

Código actual

 class Comment_movie_CreateForm (ModelForm): class Meta: model = Comment_movie fields = ('comment','stars') comment = forms.CharField (required = False, label ='comment', max_length = 1000) stars = forms.FloatField (required = False, label ='stars', widget = forms.TextInput ( attrs = {'type':'range','id':'form_homework', "class": "no_resize",'min': '0','max': '10','step': '0.1' }))) def clean (self): cleaned_data = super (). clean () return cleaned_data def clean_stars (self): stars = self.cleaned_data ['stars'] if stars! = None: if stars <0 or stars> 10: raise forms.ValidationError ("The rating input is incorrect.") return stars else: else: raise forms.ValidationError ("The rating input is incorrect.") def clean_comment (self): comment = self.cleaned_data ['comment'] if len (comment)> 1000: raise forms.ValidationError ("There are too many characters.") elif len (comment) == 0: raise forms.ValidationError ("Please enter the characters.") return comment def __init__ (self, * args, ** kwargs): super () .__ init__ (* args, ** kwargs) self.label_suffix = ""
 <form method="POST" enctype="multipart/form-data"> {% csrf_token %} {{ form }} {% if comment_tv %} <button type="submit">Edit Comment</button> <button type="submit" name="action" value="delete">Delete Comment</button> {% else %} <button type="submit">Post Comment</button> {% endif %} </form>

Que quieres preguntar

Quiero hacer una barra deslizante como se muestra en la imagen. ¿Cómo configuro CSS y javascript?

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda