Skip to main content

All Questions

1 vote
1 answer
230 views

How to highlight the current section

When navigating in the menu bar, some of the options are not selected. I have tried to do it with JQuery but my attempts are in vain. Briefly what I am looking for is that if the user clicks Home Page ...
Martin Vargas's user avatar
0 votes
0 answers
52 views

Django: Bootstrap 3 modal darkens when being clicked

This is a quiz app where several quiz can be added to a particular topic. However, when I click on the button to start the quiz, the modal asking for confirmation pops up but in a darkened way. It ...
Alpha's user avatar
  • 217
0 votes
1 answer
165 views

Django modal bootstrap not displaying

I have been blocked on this problem for several days. I have bootstrap 3.3.7 in the project root folder. I am rendering some buttons in the django template that should open modal windows when clicked. ...
psolomon's user avatar
  • 173
0 votes
2 answers
515 views

Django + Bootstrap modal form still shows Djangos default errors, not bootstrapped errors?

I am struggling with displaying bootstraps form errors in a popup form modal. When I submit the form, with some missing required fields, I am still getting Django's built in basic form error messages, ...
master_j02's user avatar
0 votes
1 answer
274 views

Django + Bootstrap collapsed table front-end issue?

I have been trying to figure out a front-end issue I've been on for a few days. I am using Django + Bootstrap collapsed accordion. What I am trying to do is completely hide a div, and all spacing ...
master_j02's user avatar
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
0 votes
0 answers
69 views

Djnago: Bootstrap3 form dropdown options display issue

I am using bootstrap3 in django template to display dropdown menu so that user can select the option they chooses. After selecting the option, selected option is not displaying clearly. See below ...
sreekanthkura7's user avatar
2 votes
1 answer
346 views

Python Django multiple attributes in search

So I have this search form: [Doctor][Specialty][City] This is the form in HTML: <form data-provide="validation" data-disable="true" class="input-glass mt-7" method='POST' action='...
Kaiss B.'s user avatar
  • 317
0 votes
1 answer
110 views

Django dropdown menu not working with tag 'load bootstrap3'

I am creating a website with django and I have a dropdown menu like this: <li class="dropdown"> <a data-toggle="dropdown" href="#">{{ user.username }}</a> <ul class="dropdown-...
Yacine Rouizi's user avatar
0 votes
1 answer
547 views

How to show popup "Success" or "Error" after I clicked the update button in which it is a modal

I am working on this employee registration project and Im not exactly sure how to implement this one on django. How could I show popupbox or like a small modal box "Success" or "Error" after I ...
Asmodeus Glaive's user avatar
0 votes
1 answer
180 views

Adding dropdown to bootstrap3 nav bar

I'm working with bootstrap3 and django. I want to update my navbar to add a dropdown list of links in my navbar on the right . My bootstrap code: <!-- Navigation --> <nav class="navbar ...
user1592380's user avatar
  • 35.5k
0 votes
1 answer
477 views

Create a Bootstrap accordian for items in a python for loop

I am trying to create a Bootstrap accordian for a list of items in a Django database. When rendered, currently my code will only collapse and expand on the first item in the for loop. For other items, ...
Jon's user avatar
  • 25
0 votes
1 answer
946 views

How fix to upload image from bootstrap modal form in django

I can not find the information how to load image through django modal form. How to upload a file through a django modal form? my file models.py class Meal(models.Model): restaurant = models....
Nick Seniytitch's user avatar
1 vote
1 answer
200 views

Django in template using if tag compare one variable with a number always give false

I first use widthratio tag to calculate a ratio percentage number and assgign it to a variable named Ratio Then when I try to compare it with an integer in if and elif tag, the if and elif tag seems ...
Whilding Tso's user avatar
1 vote
1 answer
945 views

Bootstrap 3 display 3 blog posts in each row using in Django templates

I'm working on a project using Django(2.1.7) and Bootstrap (3.1), I need to display 3 blog posts in each row: Note: I have taken a look at various related questions but couldn't find any solution ...
Abdul Rehman's user avatar
  • 5,546
0 votes
0 answers
58 views

How to trigger jquery on bootstrap 3 modal close

I have a django project with the following hidden modal embedded in the page, which is displayed on form submit: <div class="modal fade" id="thanksModal" tabindex="-1" role="dialog" aria-...
user1592380's user avatar
  • 35.5k
1 vote
1 answer
64 views

Set if error condition for value attribute

In the following template code, I set value="{{ form.title.value }}" and it displays as I intended, <div class="form-group"> <label for="title" class="col-sm-1 control-label">Title&...
Wizard's user avatar
  • 21.3k
0 votes
2 answers
47 views

Both `name="button"` and `name="submit" work properly in the form

When working in Django, Both name="button" and name="submit" work properly when I submit the form {% buttons %} <button name="button" class='btn btn-primary'>Save</button> ...
Wizard's user avatar
  • 21.3k
0 votes
1 answer
195 views

Bootstrap alert closing on page load

I have a view in which I send some messages, like this: messages.warning(request, 'Nothing found") In my settings.py I have edited the message tags like: MESSAGE_TAGS = { messages.DEBUG: 'alert-...
Onilol's user avatar
  • 1,333
1 vote
0 answers
710 views

ugettext_lazy/pgettext_lazy not working in Django sub-application

I am translating a Django site with a sub-application. Let's say the top level site is called 'main_site' and the sub application is called 'sub_app'. In main_site, I am using only trans and ...
buzzdriving's user avatar
0 votes
0 answers
150 views

Enable markdown to render text submitted from a form

When employ the bootstrap in Django to format the form, it display nicely. {% for entry in entries %} <div class="panel panel-default"> <div class="panel-heading"> ...
Wizard's user avatar
  • 21.3k
0 votes
1 answer
359 views

Wrap button in `{% buttons %}`

I learns the button from bootstrap with Django template {% buttons %} <button name="button" class="btn btn-primary">log in</button> {% endbuttons %} I test it make no difference when ...
Wizard's user avatar
  • 21.3k
0 votes
2 answers
2k views

bootstrap collapse span is breaking lines when it shouldn't be

I am having a difficulties with a bootstrap collapse button, I am trying to stop a line from breaking after the collapse button. I saw this thread at stackoverflow answer which gives the answer that ...
user3655574's user avatar
0 votes
0 answers
450 views

Bootstrap javascript not working in Django

I downloaded bootstrap and configured it in my Django application and everything was good after sometime the JavaScript stopped working but the CSS is working. I don't know what is wrong with it. The ...
ade desmond's user avatar
1 vote
1 answer
81 views

My repeated HTML Bootstrap collapse function only works for the first set

So I'm creating a page that is a directory where each issue has a set of articles and authors. I'm implementing a function that cuts a list of articles after its fourth element and collapses the ...
Marie Konopacki's user avatar
0 votes
1 answer
729 views

Which bootstrap column is the mouse hovering over?

I'm making a `django` website, where I have to change the color of text and make a box appears when hovering over their bootstrap column. The problem I'm having is trying to individually refer to the ...
timtti's user avatar
  • 25
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 ...
Hamid Khan's user avatar
0 votes
1 answer
542 views

Loading form from URL in Bootstrap 3 (Django)

I have a form in a url. I want to load it in an existing page. I'm following this tutorial https://www.abidibo.net/blog/2014/05/26/how-implement-modal-popup-django-forms-bootstrap/ This is the form ...
Kotlinboy's user avatar
  • 3,885
-2 votes
1 answer
1k views

jquery not working on django

jquery does not work on django project I used with bootstrap. please help me .html <div class="domains-slider marquee"> <ul> <li><a href="#">BTC/USD</a&...
Ömer's user avatar
  • 131
0 votes
1 answer
69 views

JQuery: div class-specific hover not working with bootstrap css

Context: Developing a "google-calendar-like" hardware booking tool at work using DJango. View reservations (their time slot and reserving user). Click empty space to create another reservation (...
Patrick Dallaire's user avatar
0 votes
2 answers
107 views

Bootstrap grid content position

I have the following code for django-oscar <ul class="row"> {% for product in products %} <li class="col-xs-6 col-sm-4 col-md-3 col-lg-3">{% render_product product %}</li&...
Hyun Kyu Han's user avatar
0 votes
0 answers
132 views

Django/Bootstrap RadioButton Rendered appears to be disabled

I am using Django1.8.6 along with django-bootstrap3. This is my model for companies to set there program status and privacy class CompanyInformationSetting(models.Model): PROGRAM_PRIVACY = ( ('...
Aman Raparia's user avatar
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
0 votes
0 answers
426 views

crispy forms + Bootstrap3: bad position of error field with input-group-addon

When using a input-group-addon, when there's an error, the span element of the error is wrapped by the input-group-addon: the html: <div class="controls col-md-6 input-group"> <input name=...
ThePhi's user avatar
  • 2,523
1 vote
1 answer
55 views

Ajax issue of Django user login using bootstrap 3.x modal

My purpose is once modal form submitted, ajax pass the username and password to a view and get back the json info to update the modal form, I trace the djanog code ,and 100% sure the JsonResponse(...
wu peter's user avatar
0 votes
1 answer
374 views

Post action not working in form inside bootstrap popover

I am trying to save a url from an input field(form is inside bootstrap popover)but nothing happens when I click save button. This is my html code: <div id="popover-content" class="hide"> <...
Rashi Goel's user avatar
1 vote
1 answer
2k views

Django CreateView messes up bootstrap-modal

Rather a curious problem: My modal works perfectly until I associate the template containing it with a CreateView! So for example if I change template_name in BrandCreateView to new_brand_form1.html, ...
zerohedge's user avatar
  • 3,555
-1 votes
1 answer
103 views

bootstrap3, django: pull-right didn't work

I am facing a problem building a django project: the pull-right class in bootstrap 3 didn't work in django template pull-right here is my code {% block content %} <div class="row"> <...
Mosaab Ehab's user avatar
1 vote
0 answers
228 views

difficulty with bootstrap container - django-bootstrap3

How can I fix this problem without removing the bootstrap template tags? Context: I have the following template schema: layout.html is my base template And I have another templates which inherit ...
bgarcial's user avatar
  • 3,153
0 votes
1 answer
51 views

Overflow after inserting image in column

I know this is a one setting issue but I'm quite new and don't know what the exact terminology to get the answer i'm looking for. I'm using Bootstrap-3.3.7 on Django 1.11 When I insert an image the ...
Mr Panda's user avatar
  • 101
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
2 votes
0 answers
244 views

Styling an Accordion Table

I made this accordion table using bootstrap accordion. It works well, but it looks terrible. The way I have it set up is a nested accordion. the code can be seen as follows: <!DOCTYPE html> &...
Big_VAA's user avatar
  • 774
0 votes
0 answers
414 views

Bootstrap Form Control - Django Form HTML

I've been having trouble adding HTML for Form Control to my Django form. I know (from other features) that I have Bootstrap properly integrated into the project. No fields are showing when I try to ...
user7518095's user avatar
0 votes
2 answers
2k views

How to override bootstrap cdn in Django?

I'm new to Django, and even more so to CSS. In the base.html of my site I included a bootstrap cdn as follows: <meta charset="UTF-8"> <link rel="shortcut icon" href="{% static '...
Shoval Sadde's user avatar
  • 1,182
0 votes
1 answer
584 views

Django with Bootstrap 2nd Modal (or subsequent modals) not working

Using the Django for loop It am generating a paginated list from the database. This works. The generated list has a delete button to the right of each entry. At the same page load I an using the the ...
Tony Sherman's user avatar
0 votes
1 answer
1k views

Django base template (using bootstrap3) overwrites index.html completely

I've created a base.html file where I want my bootstrap3 navbar and footer to live. These will be used on every page of my site. However, the base.html & corresponding css file that goes with it ...
PolishZeus's user avatar
2 votes
1 answer
2k views

Django form-fields: Styling for Bootstrap without losing functionality?

So form.as_p in django gives a plain, yet very catered form, with field inputs matching the entity attribute type, like so: Notice how vintage is a dropdown item, and so is brand. But then again, it'...
zerohedge's user avatar
  • 3,555
2 votes
5 answers
4k views

add an icon to django crispy form submit button

I am struggling with the Button on a crispy form. Instead of just the default button I would like to have an icon inside The form I am currently using is like class MyForm(forms.ModelForm): helper =...
mbieren's user avatar
  • 1,084
0 votes
1 answer
56 views

Passing values to default Django authentication form

I have very silly question: How can I get value and assign it correctly to django variables {{form.username}} and {{form.password}}? I have a bootstrap sign-in page and default django ...
Kabun's user avatar
  • 35
0 votes
0 answers
1k views

Why does a checkbox input designed this way on a horizontal Django crispy form?

My project uses Twitter bootstrap on the front-end, the backend is Django, we also use crispy forms. fifth_year is a simple boolean model field class MyModel(models.Model): first_name = models....
Csaba Toth's user avatar
  • 10.5k

15 30 50 per page