Commit 6ca196dc authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

Using django-crispy-forms to render form easily

parent 9b33517d
{% extends "account/base.html" %}
{% load crispy_forms_tags %}
{% load i18n %}
{% load account socialaccount %}
......@@ -40,7 +41,7 @@
<form class="login" method="POST" action="{% url 'account_login' %}">
{% csrf_token %}
{{ form.as_p }}
{{ form|crispy }}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
......
......@@ -44,6 +44,7 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
'crispy_forms',
'ippidb',
'formtools',
'debug_toolbar',
......@@ -174,3 +175,11 @@ LOGOUT_REDIRECT_URL = '/'
# fingerprints used to compute Drugbank similarity using openbabel
# default value is FP2
DRUGBANK_FINGERPRINTS = "FP2"
################################################################################
# django-crispy-forms
################################################################################
CRISPY_TEMPLATE_PACK = 'bootstrap4'
################################################################################
\ No newline at end of file
......@@ -20,4 +20,5 @@ matplotlib==2.2.3 #Matplotlib 3.0+ does not support Python 2.x, 3.0, 3.1, 3.2, 3
psycopg2
git+https://gitlab.pasteur.fr/hmenager/django-diu.git#egg=django_diu
# openbabel is not installed from pip for now
#openbabel
\ No newline at end of file
#openbabel
django-crispy-forms
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment