Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Django 3.2 #353

Merged
merged 9 commits into from
Feb 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions coldfront/config/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
#------------------------------------------------------------------------------
# Django Apps
#------------------------------------------------------------------------------

# See: https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys
# We should change this to BigAutoField at some point
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
Expand Down Expand Up @@ -84,6 +89,15 @@
#------------------------------------------------------------------------------
AUTHENTICATION_BACKENDS = []

#------------------------------------------------------------------------------
# Django Q
#------------------------------------------------------------------------------
Q_CLUSTER = {
'timeout': ENV.int('Q_CLUSTER_TIMEOUT', default=120),
'retry': ENV.int('Q_CLUSTER_RETRY', default=120),
}


#------------------------------------------------------------------------------
# Django template and site settings
#------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion coldfront/config/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
# 'ENGINE': 'django.db.backends.postgresql',
# 'NAME': 'coldfront',
# 'USER': '',
# 'PASSWORD': '',
Expand Down
2 changes: 1 addition & 1 deletion coldfront/core/allocation/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class AllocationConfig(AppConfig):
name = 'allocation'
name = 'coldfront.core.allocation'
2 changes: 1 addition & 1 deletion coldfront/core/grant/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class GrantConfig(AppConfig):
name = 'grant'
name = 'coldfront.core.grant'
2 changes: 1 addition & 1 deletion coldfront/core/portal/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class PortalConfig(AppConfig):
name = 'portal'
name = 'coldfront.core.portal'
2 changes: 1 addition & 1 deletion coldfront/core/portal/templates/portal/center_summary.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "common/base.html" %}
{% load crispy_forms_tags %}
{% load staticfiles %}
{% load static %}
{% load common_tags %}
{% load humanize %}

Expand Down
2 changes: 1 addition & 1 deletion coldfront/core/publication/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class PublicationConfig(AppConfig):
name = 'publication'
name = 'coldfront.core.publication'
2 changes: 1 addition & 1 deletion coldfront/core/research_output/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class ResearchOutputConfig(AppConfig):
name = 'research_output'
name = 'coldfront.core.research_output'
2 changes: 1 addition & 1 deletion coldfront/core/resource/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class ResourceConfig(AppConfig):
name = 'resource'
name = 'coldfront.core.resource'
2 changes: 1 addition & 1 deletion coldfront/core/user/templates/user/login.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "common/base.html" %}
{% load staticfiles %}
{% load static %}
{% load common_tags %}


Expand Down
2 changes: 1 addition & 1 deletion coldfront/core/user/templates/user/user_profile.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "common/base.html" %}
{% load staticfiles %}
{% load static %}

{% block title %}
User Profile{% if not user == viewed_user %}: {{ viewed_user.username }}{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "common/base.html" %}
{% load staticfiles %}
{% load static %}


{% block title %}
Expand Down
3 changes: 2 additions & 1 deletion coldfront/core/utils/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@


class UtilsConfig(AppConfig):
name = 'utils'
name = 'coldfront.core.utils'
verbose_name = 'Coldfront Utils'
2 changes: 1 addition & 1 deletion coldfront/plugins/iquota/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class IquotaConfig(AppConfig):
name = 'iquota'
name = 'coldfront.plugins.iquota'
2 changes: 1 addition & 1 deletion coldfront/plugins/ldap_user_search/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class LdapUserSearchConfig(AppConfig):
name = 'ldap_user_search'
name = 'coldfront.plugins.ldap_user_search'
2 changes: 1 addition & 1 deletion coldfront/plugins/mokey_oidc/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class MokeyOidcConfig(AppConfig):
name = 'mokey_oidc'
name = 'coldfront.plugins.mokey_oidc'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

{% load staticfiles %}
{% load static %}
<!-- Start System Monitor -->

<div class="col">
Expand Down
1 change: 0 additions & 1 deletion coldfront/templates/common/base.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load static %}
{% load staticfiles %}

<!DOCTYPE html>
<html lang="en">
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ more advanced configuration use `local_settings.py`.
| SECRET_KEY | This is used to provide cryptographic signing, and should be set to a unique, unpredictable value. [See here](https://docs.djangoproject.com/en/3.1/ref/settings/#secret-key). If you don't provide this one will be generated each time ColdFront starts. |
| LANGUAGE_CODE | A string representing the language code. [See here](https://docs.djangoproject.com/en/3.1/ref/settings/#language-code)
| TIME_ZONE | A string representing the time zone for this installation. [See here](https://docs.djangoproject.com/en/3.1/ref/settings/#std:setting-TIME_ZONE) |
| Q_CLUSTER_RETRY | The number of seconds Django Q broker will wait for a cluster to finish a task. [See here](https://django-q.readthedocs.io/en/latest/configure.html#retry) |
| Q_CLUSTER_TIMEOUT | The number of seconds a Django Q worker is allowed to spend on a task before it’s terminated. IMPORTANT NOTE: Q_CLUSTER_TIMEOUT must be less than Q_CLUSTER_RETRY. [See here](https://django-q.readthedocs.io/en/latest/configure.html#timeout) |

### Template settings

Expand Down
58 changes: 29 additions & 29 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
arrow==0.13.1
bibtexparser==1.1.0
blessed==1.15.0
chardet==3.0.4
Django==2.2.26
django-crispy-forms==1.7.2
django-environ==0.4.5
django-model-utils==3.1.2
django-picklefield==2.0
django-q==1.0.1
arrow==1.2.1
bibtexparser==1.2.0
blessed==1.19.0
chardet==4.0.0
Django==3.2.12
django-crispy-forms==1.13.0
Faker==11.3.0
django-environ==0.8.1
django-model-utils==4.2.0
django-picklefield==3.0.1
django-q==1.3.9
django-settings-export==1.2.1
django-simple-history==2.7.2
django-split-settings==1.0.1
django-sslserver==0.20
django-su==0.8.0
doi2bib==0.3.0
factory-boy==2.12.0
Faker==3.0.0
future==0.17.1
humanize==0.5.1
idna==2.8
pyparsing==2.3.1
python-dateutil==2.8.0
django-simple-history==3.0.0
django-split-settings==1.1.0
django-sslserver==0.22
django-su==0.9.0
doi2bib==0.4.0
factory-boy==3.2.1
future==0.18.2
humanize==3.13.1
idna==3.3
pyparsing==3.0.6
python-dateutil==2.8.2
python-memcached==1.59
pytz==2018.9
redis==3.2.1
requests==2.26.0
six==1.12.0
sqlparse==0.3.0
pytz==2021.3
redis==3.5.3
requests==2.27.1
six==1.16.0
sqlparse==0.4.2
text-unidecode==1.3
urllib3==1.26.6
wcwidth==0.1.7
urllib3==1.26.8
wcwidth==0.2.5
52 changes: 26 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,34 @@
python_requires='>=3.6',
packages=find_packages(),
install_requires=[
'arrow==0.13.1',
'bibtexparser==1.1.0',
'blessed==1.15.0',
'chardet==3.0.4',
'Django==2.2.26',
'django-crispy-forms==1.7.2',
'django-environ==0.4.5',
'django-model-utils==3.1.2',
'django-picklefield==2.0',
'django-q==1.0.1',
'arrow==1.2.1',
'bibtexparser==1.2.0',
'blessed==1.19.0',
'chardet==4.0.0',
'Django==3.2.12',
'django-crispy-forms==1.13.0',
'django-environ==0.8.1',
'django-model-utils==4.2.0',
'django-picklefield==3.0.1',
'django-q==1.3.9',
'django-settings-export==1.2.1',
'django-simple-history==2.7.2',
'django-split-settings==1.0.1',
'django-sslserver==0.20',
'django-su==0.8.0',
'doi2bib==0.3.0',
'future==0.17.1',
'humanize==0.5.1',
'idna==2.8',
'pyparsing==2.3.1',
'python-dateutil==2.8.0',
'django-simple-history==3.0.0',
'django-split-settings==1.1.0',
'django-sslserver==0.22',
'django-su==0.9.0',
'doi2bib==0.4.0',
'future==0.18.2',
'humanize==3.13.1',
'idna==3.3',
'pyparsing==3.0.6',
'python-dateutil==2.8.2',
'python-memcached==1.59',
'pytz==2018.9',
'redis==3.2.1',
'requests==2.26.0',
'six==1.12.0',
'urllib3==1.26.6',
'wcwidth==0.1.7',
'pytz==2021.3',
'redis==3.5.3',
'requests==2.27.1',
'six==1.16.0',
'urllib3==1.26.8',
'wcwidth==0.2.5',
],
entry_points={
'console_scripts': [
Expand Down