Merge pull request 'Update django and python' (#33) from dev into main
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
Reviewed-on: #33
This commit is contained in:
commit
15720f8063
4 changed files with 18 additions and 5 deletions
13
.drone.yml
13
.drone.yml
|
@ -3,6 +3,19 @@ type: docker
|
|||
name: build-latest
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: python:3.12-slim-bookworm
|
||||
settings:
|
||||
repo: git.thisfro.ch/pflaenz.li/pflaenzli
|
||||
environment:
|
||||
DJANGO_ALLOWED_HOSTS: localhost,[::1]
|
||||
DJANGO_CSRF_TRUSTED_ORIGINS: http://localhost:8000
|
||||
commands:
|
||||
- pip install coverage
|
||||
- pip install -r requirements.txt
|
||||
- coverage run --branch --source='.' pflaenzli/manage.py test pflaenzli
|
||||
- coverage report -m
|
||||
|
||||
- name: build-image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM python:3.11-slim-bullseye
|
||||
FROM python:3.12-slim-bookworm
|
||||
|
||||
RUN apt update && apt install -y libpq-dev nginx gettext
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ def get_single_plz(plz):
|
|||
|
||||
|
||||
def save_language(request):
|
||||
referer_url = request.META.get('HTTP_REFERER')
|
||||
referer_url = request.headers.get('referer')
|
||||
response = redirect(referer_url)
|
||||
|
||||
if request.method == 'POST':
|
||||
|
|
|
@ -30,10 +30,10 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||
SECRET_KEY = "django-insecure-q=ps#iypevr!3zfpwtfp3lw#4r3%oyj*(2=*iq^8f4_zbodi^("
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = os.getenv('DJANGO_DEBUG') == 'true'
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = os.getenv('DJANGO_ALLOWED_HOSTS', '').split(',')
|
||||
CSRF_TRUSTED_ORIGINS = os.getenv('DJANGO_CSRF_TRUSTED_ORIGINS', '').split(',')
|
||||
ALLOWED_HOSTS = os.getenv('DJANGO_ALLOWED_HOSTS', 'localhost').split(',')
|
||||
CSRF_TRUSTED_ORIGINS = os.getenv('DJANGO_CSRF_TRUSTED_ORIGINS', 'http://localhost:8080').split(',')
|
||||
|
||||
# Application definition
|
||||
|
||||
|
|
Loading…
Reference in a new issue