blob: 1c20f4e632e3f73d4d64827b7795837ed34459d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import os
import sys
import site
from os.path import dirname, abspath
SERVER_ROOT = abspath(dirname(dirname(__file__))) + '/'
site.addsitedir(SERVER_ROOT + 'venv/lib/python3.4/site-packages')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
sys.path = [SERVER_ROOT, ] + sys.path
sys.path.insert(0, os.path.join(SERVER_ROOT, "app"))
sys.path.insert(0, os.path.join(SERVER_ROOT, "app/lib"))
sys.path.insert(0, os.path.join(SERVER_ROOT, "config"))
from pages.models import PageGenerator
PageGenerator(os.path.join(SERVER_ROOT, "_pages")).write_files()
|