-
Notifications
You must be signed in to change notification settings - Fork 67
/
cms_helper.py
executable file
·49 lines (34 loc) · 993 Bytes
/
cms_helper.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env python
from tempfile import mkdtemp
HELPER_SETTINGS = dict(
ROOT_URLCONF="tests.example_app.urls",
INSTALLED_APPS=["meta", "tests.example_app"],
META_SITE_PROTOCOL="http",
META_USE_SITES=True,
META_USE_OG_PROPERTIES=True,
META_USE_TWITTER_PROPERTIES=True,
META_USE_SCHEMAORG_PROPERTIES=True,
META_USE_JSON_LD_SCHEMA=True,
FILE_UPLOAD_TEMP_DIR=mkdtemp(),
TEST_RUNNER="app_helper.pytest_runner.PytestTestRunner",
SECRET_KEY="dont-use-me",
)
try:
import sekizai # NOQA
HELPER_SETTINGS["INSTALLED_APPS"].append("sekizai")
HELPER_SETTINGS["TEMPLATE_CONTEXT_PROCESSORS"] = [
"sekizai.context_processors.sekizai",
]
except ImportError:
pass
def run():
from app_helper import runner
runner.run("meta")
def setup():
import sys
from app_helper import runner
runner.setup("meta", sys.modules[__name__])
if __name__ == "__main__":
run()
if __name__ == "cms_helper":
setup()