raise ImproperlyConfigured exception if basename is not unique by dgravitate · Pull Request #8438 · encode/django-rest-framework (original) (raw)

m-haines added a commit to cedadev/app_datamad that referenced this pull request

Oct 7, 2024

@m-haines

…mysqlclient. This resulted in the following changes having to be made

Django 3.2 -> 4.2 changes

./datamad2/models/users.py

from django.utils.translation import ugettext_lazy as _ --> from django.utils.translation import gettext_lazy as _

./datamad2/admin.py

admin.site.register(User, UserAdmin) etc at eof changed to @admin.register(User) decorator above class definition of the user type. eof registers all deleted Slightly concerned this does not give the same functionality, TODO check

./datamad2/utils.py

from django.utils.encoding import force_text --> from django.utils.encoding import force_str

./datamadsite/settings.py

USE_L10N = True --> line deleted crispy_bootstrap4 added to INSTALLED_APPS

./datamadsite/settings_local.py.tmpl

Added the Additional allowed template packs: CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap4" CRISPY_TEMPLATE_PACK = "bootstrap4"

bootstrap_datepicker_plus updates

grants.py and data_products.py

from bootstrap_datepicker_plus import DatePickerInput --> from bootstrap_datepicker_plus.widgets import DatePickerInput

Changed format='' for bootstrap_datepicker_plus.widgets.DatePickerInput from format='%d/%m/%Y' to options={'format':'%d/%m/%Y'} to fix the following error:

./app_datamad_new/Lib/site-packages/bootstrap_datepicker_plus/_base.py:38: FutureWarning: The 'format' parameter is ignored, set 'format' in options instead. see https://github.com/monim67/django-bootstrap-datepicker-plusbootstrap_datepicker_plus.widgets

Removed ifequal from pagination.html as it was removed in Django 4.0 and replaced with "if x = condition" instead

djangorestframework updating to 3.15.2 from 3.12.4

Updating to drf 3.15.2 from 3.12.4, had to specify basename for datacentres/ datacenter in datamad2_api/urls.py due to importing name from "DataCentre" model queryset leading to identical routings for the "datacentre" and "datacenter" base URLs.

This is due to a change from drf 3.14 -> 3.15 enforcing the following encode/django-rest-framework#8438

Added new script DataMad_csv_create.py to import data from UKRIs DataBank database into a .csv file

Created two example Docker files for local debugging, if the user wanted to.

setup.py to Python 3.12 from Python 3.6

Updated the README.md file.