Browse Source

bump django-extra-views

pull/2446/head
Leandro Roberto 6 years ago
parent
commit
3564909a1b
  1. 2
      requirements/requirements.txt
  2. 25
      sapl/settings.py
  3. 22
      sapl/temp_suppress_crispy_form_warnings.py
  4. 2
      setup.py

2
requirements/requirements.txt

@ -8,9 +8,9 @@ django-bower==5.2.0
django-braces==1.9.0
django-crispy-forms==1.7.2
django-floppyforms==1.7.0
django-extra-views==0.12.0
django-extensions==1.9.8
django-extra-views==0.11.0
django-model-utils==3.1.1
django-sass-processor==0.5.8
easy-thumbnails==2.5

25
sapl/settings.py

@ -22,9 +22,6 @@ from dj_database_url import parse as db_url
from easy_thumbnails.conf import Settings as thumbnail_settings
from unipath import Path
from .temp_suppress_crispy_form_warnings import \
SUPRESS_CRISPY_FORM_WARNINGS_LOGGING
host = socket.gethostbyname_ex(socket.gethostname())[0]
@ -288,6 +285,7 @@ DAB_FIELD_RENDERER = \
CRISPY_TEMPLATE_PACK = 'bootstrap3'
CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap3'
CRISPY_FAIL_SILENTLY = not DEBUG
FLOPPY_FORMS_USE_GIS = False
BOWER_COMPONENTS_ROOT = PROJECT_DIR.child("bower")
BOWER_INSTALLED_APPS = (
@ -345,6 +343,22 @@ LOGGING = {
}
}
PASSWORD_HASHERS = [
'django.contrib.auth.hashers.PBKDF2PasswordHasher', # default
'sapl.hashers.ZopeSHA1PasswordHasher',
]
def remove_warnings():
import warnings
warnings.filterwarnings(
'ignore', module='floppyforms',
message='Unable to import floppyforms.gis'
)
remove_warnings()
def uncaught_exceptions(type, value, error_traceback):
import traceback
@ -356,8 +370,3 @@ def uncaught_exceptions(type, value, error_traceback):
# captura exceções que não foram tratadas
sys.excepthook = uncaught_exceptions
PASSWORD_HASHERS = [
'django.contrib.auth.hashers.PBKDF2PasswordHasher', # default
'sapl.hashers.ZopeSHA1PasswordHasher',
]

22
sapl/temp_suppress_crispy_form_warnings.py

@ -1,22 +0,0 @@
import copy
import logging
from django.utils.log import DEFAULT_LOGGING
# hack to suppress many annoying warnings from crispy_forms
# Do remove this file and corresponding import in settings
# when crispy_forms is corrected !!!
SUPRESS_CRISPY_FORM_WARNINGS_LOGGING = copy.deepcopy(DEFAULT_LOGGING)
SUPRESS_CRISPY_FORM_WARNINGS_LOGGING['filters']['suppress_deprecated'] = {
'()': 'sapl.temp_suppress_crispy_form_warnings.SuppressDeprecated'
}
SUPRESS_CRISPY_FORM_WARNINGS_LOGGING['handlers']['console']['filters'].append(
'suppress_deprecated')
class SuppressDeprecated(logging.Filter):
def filter(self, record):
msg = record.getMessage()
return not ('crispy_forms' in msg and
'RemovedInDjango19Warning' in msg)

2
setup.py

@ -19,8 +19,8 @@ install_requires = [
'django-braces==1.9.0',
'django-crispy-forms==1.7.2',
'django-floppyforms==1.7.0',
'django-extra-views==0.12.0',
'django-extra-views==0.11.0',
'django-extensions==1.9.8',
'django-model-utils==3.1.1',
'django-sass-processor==0.5.8',

Loading…
Cancel
Save