diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 841e48f9c..a53ec010a 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -6,7 +6,6 @@ dj-database-url==0.5.0 django-braces==1.14.0 django-crispy-forms==1.7.2 django-contrib-postgres==0.0.1 -django-floppyforms==1.8.0 django-extra-views==0.12.0 django-model-utils==3.1.2 django-extensions==2.1.4 diff --git a/sapl/parlamentares/forms.py b/sapl/parlamentares/forms.py index 8621eb360..89ab424f5 100755 --- a/sapl/parlamentares/forms.py +++ b/sapl/parlamentares/forms.py @@ -13,7 +13,6 @@ from django.forms import ModelForm from django.utils import timezone from django.utils.translation import ugettext_lazy as _ import django_filters -from floppyforms.widgets import ClearableFileInput from image_cropping.widgets import CropWidget, ImageCropWidget from sapl.base.models import Autor, TipoAutor @@ -26,10 +25,6 @@ from .models import (Coligacao, ComposicaoColigacao, Filiacao, Frente, Legislatu Mandato, Parlamentar, Partido, Votante, Bloco, FrenteParlamentar, BlocoMembro) -class ImageThumbnailFileInput(ClearableFileInput): - template_name = 'floppyforms/image_thumbnail.html' - - class CustomImageCropWidget(ImageCropWidget): """ Custom ImageCropWidget that doesn't show the initial value of the field. diff --git a/sapl/settings.py b/sapl/settings.py index e811efdd6..42299dd52 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -75,10 +75,11 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'django.forms', + 'django_extensions', 'crispy_forms', - 'floppyforms', 'waffle', @@ -197,6 +198,8 @@ CACHES = { ROOT_URLCONF = 'sapl.urls' +FORM_RENDERER = 'django.forms.renderers.TemplatesSetting' + TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', @@ -333,9 +336,6 @@ DAB_FIELD_RENDERER = \ CRISPY_TEMPLATE_PACK = 'bootstrap4' CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap4' CRISPY_FAIL_SILENTLY = not DEBUG -FLOPPY_FORMS_USE_GIS = False - -FORM_RENDERER = 'django.forms.renderers.DjangoTemplates' # suprime texto de ajuda default do django-filter FILTERS_HELP_TEXT_FILTER = False diff --git a/sapl/templates/floppyforms/image_thumbnail.html b/sapl/templates/floppyforms/image_thumbnail.html deleted file mode 100644 index 79d0f40db..000000000 --- a/sapl/templates/floppyforms/image_thumbnail.html +++ /dev/null @@ -1,65 +0,0 @@ -{% load i18n staticfiles thumbnail %} -{% load webpack_static from webpack_loader %} -