Add support for Debian Bookworm

This commit is contained in:
Ben Sturmfels 2023-09-13 13:33:27 +10:00
parent 05323a307d
commit cf3d7c6100
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0
8 changed files with 25 additions and 16 deletions

View file

@ -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"]

View file

@ -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"]

View file

@ -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

View file

@ -2,4 +2,4 @@ from django.apps import AppConfig
class AssignmentConfig(AppConfig):
name = 'assignment'
name = 'conservancy.apps.assignment'

View file

@ -2,4 +2,4 @@ from django.apps import AppConfig
class FOSSYConfig(AppConfig):
name = 'fossy'
name = 'conservancy.apps.fossy'

View file

@ -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
@ -11,7 +9,8 @@ def view(request):
'fundraiser_donation_count_disclose_threshold' ]
GET = request.GET
codeNames = []
if 'code_name' in GET: codeNames += GET.getlist('code_name')
if 'code_name' in GET:
codeNames += GET.getlist('code_name')
returnDict = {}
for fundGoal in FundraisingGoal.objects.filter(fundraiser_code_name__in=codeNames):

View file

@ -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

View file

@ -100,3 +100,5 @@ INSTALLED_APPS = [
'conservancy.apps.assignment',
'conservancy.apps.fossy',
]
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'