Skip to content

Commit 4896242

Browse files
committed
update dependencies and update docker image to python 3.10
upgrade django to 4.2
1 parent 6c20468 commit 4896242

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-alpine
1+
FROM python:3.10-alpine
22

33
WORKDIR /app
44

pim/settings.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@
7676
STATIC_URL = '/static/'
7777
STATICFILES_DIRS = [BASE_DIR / "static"]
7878
STATIC_ROOT = BASE_DIR / "staticfiles"
79-
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
79+
STORAGES = {
80+
"staticfiles": {
81+
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
82+
},
83+
}
8084

8185
ROOT_URLCONF = 'pim.urls'
8286

requirements.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
django==4.1.10
2-
django-widget-tweaks==1.4.12
3-
djangorestframework==3.13.1
4-
django-cors-headers==3.13.0
5-
django-debug-toolbar==4.1.0
6-
whitenoise==6.3.0
1+
django==4.2.5
2+
django-widget-tweaks==1.5.0
3+
djangorestframework==3.14.0
4+
django-cors-headers==4.2.0
5+
django-debug-toolbar==4.2.0
6+
whitenoise==6.5.0
77
mysqlclient==2.1.0
8-
psycopg2==2.9.5
8+
psycopg2==2.9.7
99
requests==2.31.0
1010

1111
## for testing
12-
beautifulsoup4==4.11.1
12+
beautifulsoup4==4.12.2

shelly3em_rest/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def device_results(request, id):
6565
end_param = request.GET.get('end', timezone.now())
6666

6767
results = Shelly3EMResult.objects.filter(
68-
device_id=device, date__range=[start_param, end_param]).prefetch_related('emeters')
68+
device_id=device, date__range=[start_param, end_param]).order_by('date').prefetch_related('emeters')
6969

7070
average_power = (
7171
results

static/rest_framework/css/bootstrap-theme.min.css.map

Lines changed: 0 additions & 2 deletions
This file was deleted.

static/rest_framework/css/bootstrap.min.css.map

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)