How to resolve Django crispy-forms Template Syntax Error

Stack Overflow Asked by user12514433 on January 5, 2022

Hey I am trying to learn the Django crispy forms, so when I try putting/injecting the {load crispy_forms_tags %} I get the error below

Error Message

TemplateSyntaxError at /login/

'crispy_form_tags' is not a registered tag library. Must be one of:

Code Below: HTML

{% load crispy_form_tags %}
<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="   /css/bootstrap.min.css"  integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"  crossorigin="anonymous">

    {% crispy form  %}


from django.db import models
from phonenumber_field.modelfields import PhoneNumberField

class Accounts(models.Model):

    name = models.CharField(max_length=100, null=False, blank=False)
    last_name = models.CharField(max_length=100,null=False, blank=False)
    phone = PhoneNumberField(null=False, blank=False, unique=True)
    email = models.EmailField(null=False, blank=False, unique=True)
    password = models.CharField(null=False, blank=False, max_length=100)
    verify_password = models.CharField(null=False, blank=False, max_length=100)

    def __str__(self):

class UserAccount(forms.Form):

class Meta:
    terms = (

        ('agree', 'Agree'),
        ('disagree', 'Disagree')
    model = Accounts
    password = forms.CharField(widget=forms.PasswordInput())
    verify_password = forms.CharField(widget=forms.PasswordInput())
    terms_and_conditions = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple, choices=terms) 
    fields = (


def __init__(self, *args, **kwargs):
    super().__init__(self, *args, **kwargs)

    self.helper = FormHelper
    self.helper.form_method = 'POST'

    self.helper.layout = (

        Submit('submit', 'Submit', css_class='btn-success')

How can I resolve this error?

2 Answers

I've had this problem too, the server was running fine, then when I modified the app_tags, I get this same exact issue.

Django-crispy-forms was installed using pip install django-crispy-forms. crispy_forms was added to the INSTALLED_APPS, but the problem persists.

So, apply all savings, restart your server, if the problem persists, restart your DB, and the IDE. That resolved it for me.

Answered by Oreximena on January 5, 2022

That's because you haven't added the Crispy Form tag in INSTALLED_APPS in your settings. Add this 'crispy_forms' in there and should solve the problem, e.g.


add these crisp tag in your templates.html should work just fine.

{% load crispy_forms_tags %}
  {% csrf_token %}
{% crispy form %}

You can see more from here

Answered by AzyCrw4282 on January 5, 2022

Add your own answers!

Related Questions

Update employee manager using employeeid

1  Asked on December 19, 2020 by user8624315


Skipping the first step in a loop for the first iteration

2  Asked on December 19, 2020 by qua


Make a circular button programatically

3  Asked on December 19, 2020 by user14469311


How to delete enclosing braces in Vim?

4  Asked on December 19, 2020 by robottinosino


How to swap my list element’s name and value in R?

3  Asked on December 19, 2020 by achai


How can we sum the values group by from file using shell script

2  Asked on December 18, 2020 by kashif


How to correlate scalar values of two pandas dataframes

2  Asked on December 18, 2020 by kaleb-coberly


Handling arrays of hours

1  Asked on December 18, 2020 by matheus-alves


How can I have a C++ set with more than 1 data type?

1  Asked on December 18, 2020 by blakcy88


Laravel Auth Guard Users From Array

0  Asked on December 18, 2020 by gstar


How can if/elif/else be replaced with min() and max()?

3  Asked on December 18, 2020 by nsmedira


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP