All Questions
40
questions
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='...
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 ...
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 ...
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, ...
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....
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 ...
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 ...
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 ...
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, ...
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 ...
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
│ ...
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>
&...
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 ...
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'...
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 =...