X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d60f44f5eceafa25705d55044ae1b11aceb28187..297e48d3c1b26b83366b27cc4ba960c8471b634b:/scripts/make-xml-zip.py?ds=inline

diff --git a/scripts/make-xml-zip.py b/scripts/make-xml-zip.py
index d8b3dde88..6d6a329de 100755
--- a/scripts/make-xml-zip.py
+++ b/scripts/make-xml-zip.py
@@ -3,19 +3,15 @@
 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
 #
-import sys
-sys.path.insert(0, '../apps')
-sys.path.insert(0, '../lib')
-sys.path.insert(0, '../lib/librarian')
-sys.path.insert(0, '../wolnelektury')
-sys.path.insert(0, '..')
-
-from django.core.management import setup_environ
-from wolnelektury import settings
+import os
+import django
 import sys
 import zipfile
 
-setup_environ(settings)
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../src'))
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wolnelektury.settings")
+django.setup()
 
 from catalogue.models import Book