Commit 00178f56 authored by VAN ZUIJLEN Nils's avatar VAN ZUIJLEN Nils
Browse files

Merge branch '73-migrer-vers-django-4-ou-3-2' into 'master'

Resolve "Migrer vers Django 3.2"

Closes #73

See merge request !69
parents 88e30f7f 04fc84e8
......@@ -15,3 +15,4 @@ collected_static
*.log
*.out
*.toc
*.kdev4
......@@ -9,9 +9,13 @@ flake8 = "*"
freezegun = "*"
coverage = "*"
mypy = "*"
types-redis = "*"
types-Markdown = "*"
types-requests = "*"
types-freezegun = "*"
[packages]
django = "~=2.2"
django = "~=3.2"
django-redis-cache = "*"
mysqlclient = "*"
redis = "*"
......@@ -23,8 +27,6 @@ django-redis-sessions = "*"
django-stubs = "*"
beautifulsoup4 = "*"
[requires]
python_version = "3.9"
[scripts]
test = "./test.sh"
......
This diff is collapsed.
......@@ -27,7 +27,7 @@ class OrderItemForm(forms.ModelForm):
def __init__(self, item=None, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
instance = getattr(self, "instance", None)
instance = getattr(self, "instance")
if item is None:
item = instance.item
......
......@@ -2,6 +2,7 @@ import csv
import json
from typing import Any
from typing import Dict
from typing import Optional
from typing import Type
from django.contrib import messages
......@@ -529,7 +530,7 @@ class DeliveryView(PermissionRequiredMixin, ListView):
order__payment__paid=True,
).select_related("order__user__profile", "order__user", "item")
def boolQueryParam(self, param):
def boolQueryParam(self, param: str) -> Optional[bool]:
if param == 'true':
return True
if param == 'false':
......@@ -539,7 +540,7 @@ class DeliveryView(PermissionRequiredMixin, ListView):
def options(self, request: HttpRequest, *args: Any, **kwargs: Any) -> JsonResponse:
itemList = OrderItem.objects
itemList = OrderItem.objects.all()
delivered = self.boolQueryParam(request.GET["delivered"])
if delivered is False:
......
......@@ -108,6 +108,8 @@ DATABASES = {
}
}
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
FIXTURE_DIRS = ("fixtures/",)
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment