Skip to main content

All Questions

0 votes
1 answer
110 views

DJANGO initial values in form not shown in template (some do some don't)

I have these Models, Tipos, Prioridad and Estado, related to Tarea as defined below: class Tipos(models.Model): tipo = models.CharField(max_length=16, verbose_name='...
carolvs's user avatar
  • 13
5 votes
1 answer
9k views

Different css margins for mobile & desktop without multiple {% block content %} in Django template

I need to change the margin-left that is applied to my main {% block content %} in my base.html template (that contains my navbar and other common elements) based on if the viewer is using mobile or ...
TimJ's user avatar
  • 399
2 votes
3 answers
3k views

How to load css as static in Django

Hi I have the following structure in my project: myapp ├── app │   ├── app | | ├── settings.py │ │ ├── [...] │   ├── templates │   │   ├── base.html │   │   ├── my_test.html │   ��── app2 │   ...
nicksheen's user avatar
  • 582
0 votes
1 answer
281 views

django-bootstrap3: changed theme_url but Bootswatch theme not loading?

I'm trying to use the bootswatch flatly theme. I followed the instructions given on the documentation regarding updating the settings. I've added the following to my project's settings.py: ...
jenkhai's user avatar
  • 59
0 votes
1 answer
240 views

Django - Cant align html tabs properly

I am trying to show a list of data based on tabs. So far I was able of take the data and show it. The problem is the html part. Some parts of the html should not repeat but they have to be at least ...
Rafael Rodrigo De Souza's user avatar
1 vote
1 answer
45 views

django+bootstrap: concatentating bootstrap_alert

I have the following code: {% if errmsg %} {% bootstrap_alert errmsg alert_type='danger' %} {% endif %} errmsg is supplied from the previous page I would like to extend the errmsg with some ...
ealeon's user avatar
  • 12.3k
0 votes
1 answer
152 views

No content visible in django-bootstrap3

I am using Django 1.9 and demo template structure to display home.html. I have included the following in the base.html file: {% block bootstrap3_content %} <nav class="navbar navbar-inverse ...
aeroaks's user avatar
  • 25
0 votes
1 answer
541 views

Designing my own list in django and bootstrap

Hi I'm pretty new to django and bootstrap. I would like to know if there is a way to create a custom list items. For example, I have my User class in models, I would like to show all users in a list ...
Gal Fridman's user avatar
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): ...
Marcus Dash's user avatar
2 votes
1 answer
383 views

Prevent django widthratio calculating more than 100 %

Im trying to put together a bootstrap 3 progress bar with multiple percentage values (see docs example). The combined value of all the values can not be more than 100%, but django is rounding up, and ...
Tomas Jacobsen's user avatar
1 vote
0 answers
534 views

django-bootstrap3 how to fix the large gap between form field and submit button?

Here is how my form looks: As you can the form and Go button are too far separated, I want it to be right next to the dropdown menu. Here is my template code that uses django-bootstrap3 {% ...
brain storm's user avatar
  • 30.9k
0 votes
1 answer
4k views

django-bootstrap3 how to get required and error classes working in template

In my registration form I have: class RegistrationForm(forms.Form): required_css_class = 'required' error_css_class='error' username = forms.RegexField(regex=r'^[\w.@+-]+$...
brain storm's user avatar
  • 30.9k
1 vote
1 answer
1k views

django-bootstrap3 - what is the purpose of bootstrap_css?

I am reading through the docs for using bootstrap3-django for templates. I do not understand the purpose of {% bootstrap_css %}. I looked at the source code of this tag, but I cannot understand what ...
eagertoLearn's user avatar
  • 10.1k
1 vote
1 answer
478 views

Django spaceless template tag breaks Bootstrap rendered content

Django templating language comes with a nice {% spaceless %}...{% endspaceless %} tag which allow to remove every whitespace, tab, newline... between html tags. The problem is that Bootstrap seems to ...
user650108's user avatar
  • 1,029
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="#"&...
E.Z.'s user avatar
  • 6,571

15 30 50 per page