# django.template.exceptions.TemplateDoesNotExist: bootstrap4/field.html

**URL:** <https://forum.djangoproject.com/t/django-template-exceptions-templatedoesnotexist-bootstrap4-field-html/21207>\
**Category:** Templates & Frontend\
**Created:** [May 27, 2023, 6:03pm UTC](https://forum.djangoproject.com/t/django-template-exceptions-templatedoesnotexist-bootstrap4-field-html/21207 "2023-05-27T18:03:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wilfred1213](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/wilfred1213/32/7438_2.png) [@Wilfred1213](https://forum.djangoproject.com/u/Wilfred1213)\
**Post date:** [May 27, 2023, 6:03pm UTC](https://forum.djangoproject.com/t/django-template-exceptions-templatedoesnotexist-bootstrap4-field-html/21207/1 "2023-05-27T18:03:55Z")

</div>

Am trying to upload my first project on pythonanywhere and i have this problem i dont know exactly what is the issue.

```
CRISPY_TEMPLATE_PACK = 'bootstrap4'

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'jijiapp',
    'jijistore',
    'crispy_forms',
    
]

```

this is my login form because it has to redirect user to login page first

```
{% extends 'jijiapp/base/base.html' %}
{% load static %}
{% load crispy_forms_tags %}
{% block title %} Upload Item {% endblock %}

{% block content %}

<div class="container">
    <div class="row">
        <div class="col-md-8 mx-auto">
            <h2>Sign in</h2>
            <hr>
            
            <form method="POST" action="{% url 'login' %}">
                
                {% csrf_token %}
                <div class="form-group col-md-10 mx-auto">
                    <div class="text-success mx-auto">
                        {% for msgs in messages %}
                        <span>
                            {{ msgs }}
                        </span>
                        {% endfor %}
                    </div>
                    <label class="col-md-5 col-form-label">{{ form.label }}</label>
                    <div class="col-sm-5 form-control ">
                        {{ form.username|as_crispy_field }}
                    </div>  
    
                </div>
                
                <div class="form-group col-md-10 mx-auto mb-3">
                    
                    <label class="col-md-5 col-form-label">{{ form.label }}</label>
                    <div class="col-sm-5 form-control ">
                        {{ form.password|as_crispy_field }}
                    </div>  
                  
                    {% if form.errors %}
                        <div class="alert alert-danger">
                            <strong>Error:</strong> {{ form.non_field_errors.0 }}
                        </div>
                    {% endif %}
                    
                    <button type="submit" class="btn btn-primary pt-3 px-5">Sign in</button>
                    <p class="">Don't have an account?<a href="{% url 'signup' %}">Signup</a> </p>
                    <p class="">Forget Password<a href="{% url 'password_reset' %}">Reset</a> </p>
                </div>
                
                
            </form>
        </div>
    </div>
    
</div>

{% endblock %}

```

this is the error from pythonanywhere

```
  Traceback (most recent call last):
    File "/home/Wilfred7/.virtualenvs/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
      response = get_response(request)
    File "/home/Wilfred7/.virtualenvs/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 220, in _get_response
      response = response.render()
    File "/home/Wilfred7/.virtualenvs/venv/lib/python3.8/site-packages/django/template/response.py", line 114, in render
      self.content = self.rendered_content
    File "/home/Wilfred7/.virtualenvs/venv/lib/python3.8/site-packages/django/template/response.py", line 92, in rendered_content
      return template.render(context, self._request)
    File "/home/Wilfred7/.virtualenvs/venv/lib/python3.8/site-packages/django/template/backends/django.py", line 63, in render
      reraise(exc, self.backend)
    File "/home/Wilfred7/.virtualenvs/venv/lib/python3.8/site-packages/django/template/backends/django.py", line 84, in reraise
      raise new from exc
  django.template.exceptions.TemplateDoesNotExist: bootstrap4/field.html

```

thank you in advance

---

<div class="post-metadata">

**Author:** ![cehceh](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/cehceh/32/3415_2.png) [@cehceh](https://forum.djangoproject.com/u/cehceh)\
**Post date:** [May 27, 2023, 6:53pm UTC](https://forum.djangoproject.com/t/django-template-exceptions-templatedoesnotexist-bootstrap4-field-html/21207/2 "2023-05-27T18:53:05Z")

</div>

> [@Wilfred1213](#):
>
> `django.template.exceptions.TemplateDoesNotExist: bootstrap4/field.html`

The error message is very clear (This template ““bootstrap4/field.html”” doesn’t not exist `TemplateDoesNotExist` ) you have to search in this way  
And due to low information, I think you miss installing bootstrap4 or if it installed you forgot to put it in INSTALLEDAPP .  
Try to feed us by more info in order to help you

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [May 27, 2023, 7:10pm UTC](https://forum.djangoproject.com/t/django-template-exceptions-templatedoesnotexist-bootstrap4-field-html/21207/3 "2023-05-27T19:10:38Z")

</div>

It’s documented here - [Installation — django-crispy-forms 2.0 documentation](https://django-crispy-forms.readthedocs.io/en/latest/install.html#template-packs)

You need to install the package crispy-bootstrap4.

---

<div class="post-metadata">

**Author:** ![Wilfred1213](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/wilfred1213/32/7438_2.png) [@Wilfred1213](https://forum.djangoproject.com/u/Wilfred1213)\
**Post date:** [May 30, 2023, 8:44pm UTC](https://forum.djangoproject.com/t/django-template-exceptions-templatedoesnotexist-bootstrap4-field-html/21207/4 "2023-05-30T20:44:12Z")

</div>

Thank you so much. It realy worked
