dev: set explicitely DJANGO_SETTINGS_MODULE

This commit is contained in:
Tom Hubrecht 2022-10-03 13:19:52 +02:00
parent 192b9d1e15
commit 74241e22cc
2 changed files with 10 additions and 4 deletions

View file

@ -3,7 +3,7 @@ import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gestioasso.settings.local")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gestioasso.settings")
from django.core.management import execute_from_command_line

View file

@ -1,4 +1,4 @@
{ pkgs ? (import <nixpkgs>) {}}:
{ pkgs ? (import <nixpkgs>) { } }:
let
pypiDataRev = "2505eb53d85cd727c87611ee4aa35152821a12b2";
@ -30,8 +30,14 @@ let
isort
flake8
'';
pyEnv = mach-nix.mkPython { requirements = requirements + requirements-dev; };
in
mach-nix.mkPythonShell {
requirements = requirements + requirements-dev;
pkgs.mkShell {
buildInputs = [ pyEnv ];
shellHook = ''
export DJANGO_SETTINGS_MODULE=gestioasso.settings.local
'';
}