Skip to content

Commit

Permalink
Add Django v5.0 and 5.1 to the testing (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Oct 17, 2024
1 parent 433b43e commit 5201715
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
1 change: 0 additions & 1 deletion testproj/testproj/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True

# Static files (CSS, JavaScript, Images)
Expand Down
9 changes: 8 additions & 1 deletion testproj/testproj/settings/heroku.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@
# Simplified static file serving.
# https://warehouse.python.org/project/whitenoise/

STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STORAGES = {
"default": {
"BACKEND": "django.core.files.storage.FileSystemStorage",
},
"staticfiles": {
"BACKEND": 'whitenoise.storage.CompressedManifestStaticFilesStorage',
},
}
MIDDLEWARE.insert(0, 'whitenoise.middleware.WhiteNoiseMiddleware')

# Database
Expand Down
2 changes: 1 addition & 1 deletion testproj/testproj/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def plain_view(request):


def root_redirect(request):
user_agent_string = request.META.get('HTTP_USER_AGENT', '')
user_agent_string = request.headers.get('user-agent', '')
user_agent = user_agents.parse(user_agent_string)

if user_agent.is_mobile:
Expand Down
11 changes: 5 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ envlist =
py{37,38,39}-django{22,30}-drf{310,311,312},
py{37,38,39}-django{31,32}-drf{311,312},
py{39,310}-django{40,41}-drf{313,314},
# py311-django{40,41,42,50,51}-drf314,
py311-django{40,41,42}-drf314,
# py312-django{42,50,51}-drf314,
py312-django{42}-drf314,
# py313-django{51}-drf314,
py311-django{40,41,42,50,51}-drf315,
py312-django{42,50,51}-drf315,
py313-django{51}-drf315,
py38-{lint, docs},
# py313-djmaster
# py313-djmaster # ModuleNotFoundError: No module named 'psycopg'

skip_missing_interpreters = true

Expand All @@ -40,6 +38,7 @@ deps =
drf312: djangorestframework>=3.12,<3.13
drf313: djangorestframework>=3.13,<3.14
drf314: djangorestframework>=3.14,<3.15
drf315: djangorestframework>=3.15,<3.16

typing: typing>=3.6.6

Expand Down

0 comments on commit 5201715

Please sign in to comment.