fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add basic login.
[wolnelektury.git]
/
scripts
/
make-xml-zip.py
diff --git
a/scripts/make-xml-zip.py
b/scripts/make-xml-zip.py
index
de579c3
..
80ae799
100755
(executable)
--- a/
scripts/make-xml-zip.py
+++ b/
scripts/make-xml-zip.py
@@
-1,20
+1,17
@@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# This file is part of Wolne
l
ektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja
Nowoczesna Polska
. See NOTICE for more information.
+# This file is part of Wolne
L
ektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja
Wolne Lektury
. 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, '..')
-
-from django.core.management import setup_environ
-from wolnelektury import settings
+import os
+import django
import sys
import zipfile
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
from catalogue.models import Book