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

Truncated backpropagation in PyTorch (code check)

1  Asked on December 7, 2021 by rampatowl


Blurred places in TextField

1  Asked on December 7, 2021


Masonry style menu columns in mega-menu

2  Asked on December 7, 2021 by joe-rr


How to call useState from another Page?

3  Asked on December 7, 2021 by grizzly-bear


Get Base64 encode file-data from Input Form

7  Asked on December 7, 2021 by jordan-baucke


Restart TeamCity server via web interface

2  Asked on December 7, 2021 by krlmlr


SliverOverlapAbsorber being able to accept multiple slivers

1  Asked on December 7, 2021 by basic-coder


Pandas plot – Range

1  Asked on December 7, 2021 by user13770492


Alternate row colours from 2nd row of the table using CSS

5  Asked on December 7, 2021 by raj-kumar-boddu


MsSql Grammar quoteString don’t auto add ‘N’

0  Asked on December 7, 2021 by jay-chu


Why loading a library dynamically makes my app crash?

0  Asked on December 7, 2021 by jpo38


Ask a Question

Get help from others!

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