Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-ora2
Commits
0e066313
Commit
0e066313
authored
Sep 14, 2015
by
Usman Khalid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added django.setup() to scripts/render_templates.py and sphinx conf.py
parent
5675f9d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
docs/en_us/developers/source/conf.py
+3
-0
scripts/render_templates.py
+3
-0
No files found.
docs/en_us/developers/source/conf.py
View file @
0e066313
...
...
@@ -43,6 +43,9 @@ sys.path.append(root / "openassessment/xblock")
sys
.
path
.
append
(
root
/
"openassessment/templates"
)
os
.
environ
.
setdefault
(
"DJANGO_SETTINGS_MODULE"
,
"settings.base"
)
import
django
django
.
setup
()
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
...
...
scripts/render_templates.py
View file @
0e066313
...
...
@@ -32,6 +32,7 @@ import pytz
# This is a bit of a hack to ensure that the root repo directory
# is in the Python path, so Django can find the settings module.
sys
.
path
.
append
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)))
import
django
from
django.template.context
import
Context
from
django.template.loader
import
get_template
...
...
@@ -41,6 +42,8 @@ USAGE = u"{prog} TEMPLATE_DESC"
DATETIME_REGEX
=
re
.
compile
(
"^
\
d{4}-
\
d{2}-
\
d{2}T
\
d{2}:
\
d{2}$"
)
django
.
setup
()
def
parse_dates
(
context
):
"""
Transform datetime strings into Python datetime objects.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment