Remove django.utils dependency
And fix path issues.
This commit is contained in:
@@ -117,7 +117,7 @@ e. Click to select I agree to the Terms of Service.
|
||||
.. image:: Images/image017.png
|
||||
:width: 800
|
||||
|
||||
.. raw:: latex
|
||||
.. raw:: latex
|
||||
|
||||
\newpage %
|
||||
|
||||
@@ -166,4 +166,4 @@ If you click **View Live** your course appears as follows on Edge.
|
||||
.. image:: Images/image027.png
|
||||
:width: 800
|
||||
|
||||
*Note: Although the start date is set to the current date by default, your course will not be advertised, so it will not be visible to the general public. You can change the start date of your course in Studio.*
|
||||
*Note: Although the start date is set to the current date by default, your course will not be advertised, so it will not be visible to the general public. You can change the start date of your course in Studio.*
|
||||
|
||||
@@ -5,17 +5,18 @@ import sys, os
|
||||
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
|
||||
if on_rtd: # Add to syspath so RTD will find the common conf file
|
||||
sys.path.append('../../../')
|
||||
sys.path.append(os.path.abspath('../../../'))
|
||||
sys.path.append(os.path.abspath('../../'))
|
||||
|
||||
from docs.shared.conf import *
|
||||
|
||||
sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
master_doc = 'index'
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path.append('source/_templates')
|
||||
|
||||
sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
|
||||
0
docs/developers/source/__init__.py
Normal file
0
docs/developers/source/__init__.py
Normal file
@@ -8,8 +8,7 @@ import sys, os
|
||||
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
|
||||
if on_rtd: # Add to syspath so RTD will find the common conf file
|
||||
sys.path.append('../../../')
|
||||
sys.path.append('../../../')
|
||||
|
||||
from docs.shared.conf import *
|
||||
|
||||
@@ -24,14 +23,10 @@ templates_path.append('source/_templates')
|
||||
html_static_path.append('source/_static')
|
||||
|
||||
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
sys.path.insert(0, os.path.abspath('.'))
|
||||
#sys.path.insert(0, os.path.abspath('../../..'))
|
||||
root = os.path.abspath('../../..')
|
||||
|
||||
sys.path.append(root)
|
||||
@@ -42,9 +37,15 @@ sys.path.append(os.path.join(root, "lms/djangoapps"))
|
||||
sys.path.append(os.path.join(root, "lms/lib"))
|
||||
sys.path.append(os.path.join(root, "cms/djangoapps"))
|
||||
sys.path.append(os.path.join(root, "cms/lib"))
|
||||
sys.path.insert(0, os.path.abspath(os.path.normpath(os.path.dirname(__file__)
|
||||
+ '/../../')))
|
||||
sys.path.append('.')
|
||||
|
||||
# django configuration - careful here
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'lms.envs.test'
|
||||
if on_rtd:
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'lms'
|
||||
else:
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'lms.envs.test'
|
||||
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
@@ -68,10 +69,68 @@ htmlhelp_basename = 'edXDocs'
|
||||
# autogenerate models definitions
|
||||
|
||||
import inspect
|
||||
from django.utils.html import strip_tags
|
||||
from django.utils.encoding import force_unicode
|
||||
import types
|
||||
from HTMLParser import HTMLParser
|
||||
|
||||
|
||||
def force_unicode(s, encoding='utf-8', strings_only=False, errors='strict'):
|
||||
"""
|
||||
Similar to smart_unicode, except that lazy instances are resolved to
|
||||
strings, rather than kept as lazy objects.
|
||||
|
||||
If strings_only is True, don't convert (some) non-string-like objects.
|
||||
"""
|
||||
if strings_only and isinstance(s, (types.NoneType, int)):
|
||||
return s
|
||||
if not isinstance(s, basestring,):
|
||||
if hasattr(s, '__unicode__'):
|
||||
s = unicode(s)
|
||||
else:
|
||||
s = unicode(str(s), encoding, errors)
|
||||
elif not isinstance(s, unicode):
|
||||
s = unicode(s, encoding, errors)
|
||||
return s
|
||||
|
||||
|
||||
class MLStripper(HTMLParser):
|
||||
def __init__(self):
|
||||
self.reset()
|
||||
self.fed = []
|
||||
|
||||
def handle_data(self, d):
|
||||
self.fed.append(d)
|
||||
|
||||
def get_data(self):
|
||||
return ''.join(self.fed)
|
||||
|
||||
|
||||
def strip_tags(html):
|
||||
s = MLStripper()
|
||||
s.feed(html)
|
||||
return s.get_data()
|
||||
|
||||
class Mock(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
return Mock()
|
||||
|
||||
@classmethod
|
||||
def __getattr__(cls, name):
|
||||
if name in ('__file__', '__path__'):
|
||||
return '/dev/null'
|
||||
elif name[0] == name[0].upper():
|
||||
mockType = type(name, (), {})
|
||||
mockType.__module__ = __name__
|
||||
return mockType
|
||||
else:
|
||||
return Mock()
|
||||
|
||||
MOCK_MODULES = ['scipy', 'numpy']
|
||||
for mod_name in MOCK_MODULES:
|
||||
sys.modules[mod_name] = Mock()
|
||||
|
||||
def process_docstring(app, what, name, obj, options, lines):
|
||||
"""Autodoc django models"""
|
||||
|
||||
|
||||
76
docs/shared/requirements.txt
Normal file
76
docs/shared/requirements.txt
Normal file
@@ -0,0 +1,76 @@
|
||||
# Read the docs requirements file
|
||||
# ----------------------------------------
|
||||
# Installing modules with C dependencies on RTD can be tricky, and pip doesn't
|
||||
# have an 'ignore-errors' option, so all requirements fail. Here we keep the
|
||||
# maximal list of modules that still works.
|
||||
#
|
||||
beautifulsoup4==4.1.3
|
||||
beautifulsoup==3.2.1
|
||||
boto==2.6.0
|
||||
celery==3.0.19
|
||||
distribute>=0.6.28, <0.7
|
||||
django-celery==3.0.17
|
||||
django-countries==1.5
|
||||
django-filter==0.6.0
|
||||
django-followit==0.0.3
|
||||
django-keyedcache==1.4-6
|
||||
django-kombu==0.9.4
|
||||
django-mako==0.1.5pre
|
||||
django-masquerade==0.1.6
|
||||
django-mptt==0.5.5
|
||||
django-openid-auth==0.4
|
||||
django-robots==0.9.1
|
||||
django-sekizai==0.6.1
|
||||
django-ses==0.4.1
|
||||
django-storages==1.1.5
|
||||
django-threaded-multihost==1.4-1
|
||||
django-method-override==0.1.0
|
||||
djangorestframework==2.3.5
|
||||
django==1.4.5
|
||||
feedparser==5.1.3
|
||||
fs==0.4.0
|
||||
GitPython==0.3.2.RC1
|
||||
glob2==0.3
|
||||
lxml==3.0.1
|
||||
mako==0.7.3
|
||||
Markdown==2.2.1
|
||||
networkx==1.7
|
||||
nltk==2.0.4
|
||||
paramiko==1.9.0
|
||||
path.py==3.0.1
|
||||
Pillow==1.7.8
|
||||
pip>=1.3
|
||||
polib==1.0.3
|
||||
pycrypto>=2.6
|
||||
pygments==1.5
|
||||
pymongo==2.4.1
|
||||
python-memcached==1.48
|
||||
python-openid==2.2.5
|
||||
pytz==2012h
|
||||
PyYAML==3.10
|
||||
requests==0.14.2
|
||||
Shapely==1.2.16
|
||||
sorl-thumbnail==11.12
|
||||
South==0.7.6
|
||||
sympy==0.7.1
|
||||
xmltodict==0.4.1
|
||||
|
||||
# Metrics gathering and monitoring
|
||||
dogapi==1.2.1
|
||||
dogstatsd-python==0.2.1
|
||||
newrelic==1.8.0.13
|
||||
|
||||
# Used for Internationalization and localization
|
||||
Babel==0.9.6
|
||||
transifex-client==0.8
|
||||
|
||||
|
||||
-e common/lib/calc
|
||||
-e common/lib/capa
|
||||
-e common/lib/chem
|
||||
-e common/lib/sandbox-packages
|
||||
-e common/lib/symmath
|
||||
-e common/lib/xmodule
|
||||
-e .
|
||||
|
||||
-e git+https://github.com/edx/XBlock.git@b697bebd45deebd0f868613fab6722a0460ca0c1#egg=XBlock
|
||||
Reference in New Issue
Block a user