mirror of
https://github.com/PokeAPI/pokeapi
synced 2025-02-16 12:38:25 +00:00
Update Django to version 3.1
Some third-party packages had to be updated and some new settings were added due to `manage.py` not running.
This commit is contained in:
parent
30e8a01253
commit
8f716cdbf0
2 changed files with 24 additions and 6 deletions
|
@ -97,6 +97,7 @@ INSTALLED_APPS = (
|
|||
"django.contrib.sessions",
|
||||
"django.contrib.sites",
|
||||
"django.contrib.admin",
|
||||
'django.contrib.messages',
|
||||
"django.contrib.humanize",
|
||||
"corsheaders",
|
||||
"rest_framework",
|
||||
|
@ -115,9 +116,26 @@ CORS_ALLOW_METHODS = "GET"
|
|||
CORS_URLS_REGEX = r"^/api/.*$"
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
"DEFAULT_RENDERER_CLASSES": ("drf_ujson.renderers.UJSONRenderer",),
|
||||
"DEFAULT_PARSER_CLASSES": ("drf_ujson.renderers.UJSONRenderer",),
|
||||
"DEFAULT_RENDERER_CLASSES": ("rest_framework.renderers.JSONRenderer",),
|
||||
"DEFAULT_PARSER_CLASSES": ("rest_framework.renderers.JSONRenderer",),
|
||||
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.LimitOffsetPagination",
|
||||
"PAGE_SIZE": 20,
|
||||
"PAGINATE_BY": 20,
|
||||
}
|
||||
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
|
@ -1,13 +1,13 @@
|
|||
Django==2.1.15
|
||||
Django==3.1.14
|
||||
Unipath==1.1
|
||||
coverage==4.5.1
|
||||
django-appconf==1.0.4
|
||||
django-cors-headers==2.5.3
|
||||
django-cors-headers==3.11.0
|
||||
django-discover-runner==1.0
|
||||
django-redis==4.10.0
|
||||
django-redis==4.12.1
|
||||
django-cachalot==2.3.5
|
||||
django-tastypie==0.14.3
|
||||
djangorestframework==3.9.4
|
||||
djangorestframework==3.14.0
|
||||
drf-ujson==1.2.0
|
||||
gunicorn==20.1.0
|
||||
mimeparse==0.1.3
|
||||
|
|
Loading…
Add table
Reference in a new issue