Skip to content

Commit

Permalink
Ajoute un paramètre Django pour faire fonctionner la connexion dans V…
Browse files Browse the repository at this point in the history
…agrant
  • Loading branch information
philippemilink committed Mar 23, 2024
1 parent 9889af3 commit 5eefcb4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions roles/app/files/vagrant.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from .prod import *

# Required in Vagrant since Django 4
# (see https://docs.djangoproject.com/en/5.0/releases/4.0/#csrf-trusted-origins-changes-4-0)
CSRF_TRUSTED_ORIGINS = ["http://127.0.0.1:8080", "http://localhost:8080"]
9 changes: 9 additions & 0 deletions roles/app/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,15 @@
tags:
- bootstrap

- name: install Vagrant settings
ansible.builtin.copy:
src: vagrant.py
dest: "{{ appdir }}/zds/settings/vagrant.py"
mode: u=rw,g=r,o=r
when: env == "vagrant"
tags:
- bootstrap

# Installation of backend, frontend and zmd dependencies

- name: update pip in virtualenv # some dependencies (like rust ones) require a recent pip
Expand Down

0 comments on commit 5eefcb4

Please sign in to comment.