DJANGO forms: Improve the presentation of the elements

78 views
Skip to first unread message

Walter Randazzo

unread,
Oct 25, 2020, 1:46:54 PM10/25/20
to Django users
Hi guys,

Is there any way to improve the distribution of the elements of the django form, from this (img1) to (img2)?

How so?

Thanks in Advance

Code:
<body class="text-center">
  <div class="container mb-4">
    <form type="search" method="GET" actopm="." >
        {{filter.form|bootstrap}}
      <button type="submit" class="btn btn-primary">Buscar</button>
    </form>
    <div class="input-group mb-3">
      <div class="input-group-prepend">
        <span class="input-group-text">%</span>
      </div>
      <input type="text" class="form-control" name="porcentaje" id="precioinp" aria-label="Porcentaje">
      <div class="input-group-append">
        <span class="input-group-text">.00</span>
      </div>
      <button type="button" id="btnAplicar" class="btn btn-primary">Aplicar</button>
    </div>
  </div>
</body>  
1.png
2.png

Derek

unread,
Oct 26, 2020, 9:52:24 AM10/26/20
to Django users
What you want to achieve (labels to the side) is the same example shown in the Django-crispy-forms README:

sarva nithin

unread,
Oct 26, 2020, 11:18:18 AM10/26/20
to Django users
hey,guys I'm new for all these present I have been learning python through python bootcamp course in udemy so, I want to crack GSOC  so, I started to learn stuff like contribute organisations so, I don't understand where to start so, please if anybody can help me please reply and I have also started read many articles how to enter like this stuff but anything is not working so, you people are my hope to atleast  find some solution .thank you for reading this message,and present I'm studying in engineering 1st year 

Walter Randazzo

unread,
Oct 26, 2020, 11:27:59 AM10/26/20
to Django users
Hi Derek, Thanks for sharing. im gonna try with crispy forms.

Walter Randazzo

unread,
Oct 26, 2020, 11:31:26 AM10/26/20
to Django users
Hi Sarva, Hope u can aply gsoc!!! 

sarva nithin

unread,
Oct 26, 2020, 3:48:09 PM10/26/20
to django...@googlegroups.com
guys,can I know that what work you people so,that  I can also prepare for that stuff so,please 

 wwran...@gmail.com   reply me bro...waiting for your reply



--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/4_2uAzPybNw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/24ff148c-3583-492d-aa1f-c79703ae960dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages