All Questions
Tagged with twitter-bootstrap-3 django
18
questions
17
votes
7
answers
21k
views
crispy-forms: add css class for one of the inputs
In my forms.py I have
[...]
self.helper.layout = Layout(
Field('name'),
Field('description'),
)
self.helper.form_class = 'form-horizontal'
self.helper.label_class = 'col-md-2 col-xs-3'
self....
6
votes
1
answer
6k
views
BooleanField checkbox not render correctly with crispy_forms using bootstrap
I am using crispy_forms and FormHelper. I have a model field declared as:
active = models.BooleanField(default=True)
And in my ModelForm, I have tried both the following in my Layout:
self....
8
votes
1
answer
3k
views
Rendering separate MultiWidget fields using Django Crispy Forms
My specific case is that I need this field rendered in one line (using Bootstrap 3):
So something like:
<div class="form-group">
<label>Amount:</label>
<div class="row"&...
10
votes
2
answers
13k
views
Bootstrap 3 Responsive Panel Layout with Varying Heights
We are trying to use the bootstrap 3 panels to create a responsive grid layout, however we are unable to work out how to get them to display in the way that we want them. Below shows an example of ...
8
votes
4
answers
6k
views
Django: how to get the name of the template being rendered
I'm implementing a bootstrap navbar as show in this example here
Items in a navbar are <li>'s , the "selected" item has the attribute class="active":
<li class="active"> <a href="#"&...
6
votes
2
answers
8k
views
django-crispy-forms input size
According with django-crispy-form documentation, I will be able to change input width with class input-small. But my form always looks with width at 100%:
Also, If I add css_class to Field the size ...
4
votes
2
answers
5k
views
Django: Bootstrap CDN or loading Bootstrap files from local server?
I am trying to make my first website. I am using Django for it. I have a question related to the inclusion of css/js from Bootstrap.
What is the difference between installing it and linking it using ...
4
votes
1
answer
2k
views
crispy-form's Helper doesn't take effect
It seems the FormHelper simply doesn't anything. Here's my Form:
class PerguntarForm(forms.Form):
title = forms.CharField(label='Título', max_length=200)
categoria = forms.ModelChoiceField(...
3
votes
0
answers
2k
views
Change width for an input on Bootstrap3 horizontal forms
Reading django-crispy-forms I noticed than:
The way you do horizontal forms in Bootstrap version 3 is setting some
col-lg-X classes in labels and divs wrapping fields. This would mean a
lot of ...
3
votes
2
answers
8k
views
django modelform with bootstrap
I want to format my modelforms with bootstrap, and without any additional packages (just using the bootstrap source files). A particular form that I want configured:
class FoodForm(forms.ModelForm):
...
3
votes
1
answer
810
views
django-crispy-forms: form_class appears but label_class and field_class does not
This is my first time using crispy-forms and I am trying to make a horizontal crispy-form based on a ModelForm using bootstrap 3. In the output to the template "horizontal-form" shows up but "...
2
votes
2
answers
5k
views
ImportError: No module named bootstrap3 even while using virtualenv
After installing bootstrap3 by
$ pip install django-bootstrap3
while my virtualenv was active. i.e.
(venv)deathstroke@Batcomputer:~/Documents/DjangoProjects/venv/bin$ pip install django-bootstrap3
...
1
vote
2
answers
7k
views
Bootstrap3 tabs in Django
I want to implement Bootstrap3 tabs in my app, which displays school data by state. So if you go to example.com/ma/ you will see information for the state of Massachusetts and tabs to sort by grade ...
1
vote
2
answers
476
views
which library is overriding the $? [duplicate]
I'm trying to use jquery/bootstrap/ and requirejs
Loading js files works perfectly and I checked that bootstrap sets $.fn.tab = someFunction;
but then, inside requirejs's callback function, calling $...
1
vote
2
answers
4k
views
Bootstrap files 404 Django
On FireBug I get these errors
GET http://localhost:8000/static/bootstrap/css/bootstrap.min.css 404 (NOT FOUND) localhost/:7
GET http://localhost:8000/static/bootstrap/js/bootstrap.min.js 404 ...