Bläddra i källkod

replace hardcoded path with temp dir

Benoît Hubert 7 år sedan
förälder
incheckning
26dc82ff68
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      movielib/settings.py

+ 2 - 1
movielib/settings.py

@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/2.0/ref/settings/
 """
 
 import os
+import tempfile
 
 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -122,7 +123,7 @@ LOGGING = {
         'file': {
             'level': 'DEBUG',
             'class': 'logging.FileHandler',
-            'filename': '/home/bhu/Dev/python-tdd/debug.log',
+            'filename': tempfile.gettempdir() + '/djang-debug.log',
         },
     },
     'loggers': {