diff --git a/Dockerfile-debian-bookworm b/Dockerfile-debian-bookworm new file mode 100644 index 00000000..cc32d58e --- /dev/null +++ b/Dockerfile-debian-bookworm @@ -0,0 +1,12 @@ +# docker build --tag sfconservancy.org-bookworm - < Dockerfile-debian-bookworm +# docker run --tty --interactive --rm=true --publish=8000:8000 --mount type=bind,source=$(pwd),target=/var/www/website --mount type=bind,source=$(pwd)/conservancy-website.sqlite3,target=/var/lib/www/database/conservancy-website.sqlite3 sfconservancy.org-bookworm:latest + +ARG DEBIAN_FRONTEND=noninteractive + +FROM debian:bookworm +RUN apt-get update && apt-get upgrade -y +RUN apt-get install -y python3 python3-pip python3-wheel sqlite3 +RUN apt-get install -y python3-django python3-bs4 python3-html5lib python3-django-countries +RUN python3 -m pip freeze +WORKDIR /var/www/website/www +ENTRYPOINT ["python3", "/var/www/website/www/manage.py", "runserver", "0.0.0.0:8000"] diff --git a/Dockerfile-debian-stretch b/Dockerfile-debian-stretch index 91ad9120..433bf701 100644 --- a/Dockerfile-debian-stretch +++ b/Dockerfile-debian-stretch @@ -9,4 +9,6 @@ RUN echo "deb http://archive.debian.org/debian/ stretch main" > /etc/apt/sources RUN apt-get update && apt-get upgrade -y RUN apt-get install -y python3 python3-pip python3-wheel sqlite3 RUN apt-get install -y python3-django python3-bs4 python3-django-countries +RUN python3 -m pip freeze +WORKDIR /var/www/website/www ENTRYPOINT ["python3", "/var/www/website/www/manage.py", "runserver", "0.0.0.0:8000"] diff --git a/requirements.txt b/requirements.txt index e91a7bab..ce3b59f9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,4 @@ -beautifulsoup4==4.9.3 -Django==1.11.29 -soupsieve==1.9.6 -html5lib==0.999999999 - -django_countries==5.5 # Supports both Python 2 and 3. +Django==3.2.19 +beautifulsoup4==4.11.2 +html5lib==1.1 +django_countries==7.3.2 diff --git a/www/conservancy/apps/assignment/apps.py b/www/conservancy/apps/assignment/apps.py index 0a5b2504..4a25076b 100644 --- a/www/conservancy/apps/assignment/apps.py +++ b/www/conservancy/apps/assignment/apps.py @@ -2,4 +2,4 @@ from django.apps import AppConfig class AssignmentConfig(AppConfig): - name = 'assignment' + name = 'conservancy.apps.assignment' diff --git a/www/conservancy/apps/fossy/apps.py b/www/conservancy/apps/fossy/apps.py index a11baabc..e49acacd 100644 --- a/www/conservancy/apps/fossy/apps.py +++ b/www/conservancy/apps/fossy/apps.py @@ -2,4 +2,4 @@ from django.apps import AppConfig class FOSSYConfig(AppConfig): - name = 'fossy' + name = 'conservancy.apps.fossy' diff --git a/www/conservancy/apps/fundgoal/views.py b/www/conservancy/apps/fundgoal/views.py index 8a43686b..027b1831 100644 --- a/www/conservancy/apps/fundgoal/views.py +++ b/www/conservancy/apps/fundgoal/views.py @@ -1,6 +1,4 @@ from conservancy.apps.fundgoal.models import FundraisingGoal -from django.shortcuts import get_object_or_404, render_to_response -from django.template import RequestContext from django.http import JsonResponse @@ -10,8 +8,9 @@ def view(request): keysForJSON = [ 'fundraiser_goal_amount', 'fundraiser_so_far_amount', 'fundraiser_donation_count', 'fundraiser_donation_count_disclose_threshold' ] GET = request.GET - codeNames = [] - if 'code_name' in GET: codeNames += GET.getlist('code_name') + codeNames = [] + if 'code_name' in GET: + codeNames += GET.getlist('code_name') returnDict = {} for fundGoal in FundraisingGoal.objects.filter(fundraiser_code_name__in=codeNames): diff --git a/www/conservancy/apps/supporters/views.py b/www/conservancy/apps/supporters/views.py deleted file mode 100644 index 74abf857..00000000 --- a/www/conservancy/apps/supporters/views.py +++ /dev/null @@ -1,4 +0,0 @@ -from conservancy.apps.supporters.models import Supporter -from django.shortcuts import get_object_or_404, render_to_response -from django.template import RequestContext - diff --git a/www/conservancy/settings.py b/www/conservancy/settings.py index fa624cba..f0c2796b 100644 --- a/www/conservancy/settings.py +++ b/www/conservancy/settings.py @@ -100,3 +100,5 @@ INSTALLED_APPS = [ 'conservancy.apps.assignment', 'conservancy.apps.fossy', ] + +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'