I'm trying to add a category field to my blog posts model in Django. When I make a post with the admin panel it shows the choices in a drop down list, however I wish to display choices in html.
Here is the form in my HTML file:
<div class="container">
<div class="row">
<div class="col-lg-7 offset-lg-1">
<form class="create-form" method="POST" enctype="multipart/form-data">{% csrf_token %}
<!-- title -->
<div class="form-group">
<label for="id_title">Title</label>
<input class="form-control" type="text" name="title" id="id_title" placeholder="Title" required autofocus>
</div>
<!-- Body -->
<div class="form-group">
<label for="id_body">Content</label>
<textarea class="form-control" rows="10" type="text" name="body" id="id_body" placeholder="Put the description of your post here..." required></textarea>
</div>
<div class="form-group">
<label for="id_category">Category</label>
<select class="form-control" name="category" id="id_category" required></select>
</div>
<!-- Image -->
<div class="form-group">
<label for="id_image">Image</label>
<input type="file" name="image" id="id_image" accept="image/*" required>
</div>