I am having an issues connecting my html
css
javascript
front-end with django
. I have html
templates that look and work exactly as I want them too. I can display data without issue with I make a call to a django
field that is part of my current view using:
<a>{{ thing.attribute }}</a>
That works great.
My issue is when trying to connect a form to the django
view I created for updating and creating records using a POST
action. For example, when using an mdbootstrap
themed template, I have implemented an html
<select>
object like this:
<select type="select" class="mdb-select" id="fieldOne">
<option value="0">Something</option>
<option value="1">Something</option>
<option value="2">Something</option>
</select>
This works and looks exactly like I want it too as it is correctly utilizing the proper css
and javascript
.
When I want to place a django
form object in place of the same field, I have to call it like this:
<div class="mdb-select">{{ thing.attribute }}</div>
I have to call it as a <div>
in django
, and it's breaking my css
and javascript
, thus not displaying correctly and not usable. I can see the data being returned when I look at the rendered html
in dev tools, so I know my django
views and forms are working.
Is there any way to call a django
object while still utilizing the <select>
tags in my html
template?