Closed juzen2003 closed 2 years ago
Override the widget templates for RadioSelect and CheckboxSelectMultiple by doing the followings:
'django.forms'
to INSTALLED_APPS in settings.pyFORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
in settings.py.self.fields.keyOrder
to self.field_order
application/templates/django/forms/widgets
) to store Django 3.2 templates. This is to override the Django 4.0 RadioSelect
and CheckboxSelectMultiple widgets.Pending item:
3.10.2
python manage.py test
, we have to make test_api
and test_db_data
to be modules by adding __init__.py
. python manage.py test -b
to run test, this is to suppress the sys.stdout, and if there is an error or a failure, the detailed logs will still show up.
Related to https://github.com/SETI/pds-opus/issues/1084
Changes done to work with Django 4:
from django.conf.urls import url
tofrom django.urls import re_path
url
call tore_path
callfrom django.shortcuts import render_to_response
tofrom django.shortcuts import render
render_to_response
call torender
call and make sure to pass inrequest
'django.template.context_processors.request'
in context processors in settings.pyINSTALLED_APPS
and removeTEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
in settings.py.runner.py
from:flush_statements = connection.ops.sql_flush( style, tables, connection.introspection.sequence_list())
toflush_statements = connection.ops.sql_flush( style, tables)
Pending items:
<div>
instead of<li>
Modify tests with no request passed in. Now never cache will raise a type error when no request is passed in. Here is the code differece between 2.2.6 & 4.0.3: 2.2.6:
4.0.3
We can do something like this: (use
test__api_notifications_no_request
as an example)