Added branch 1.0.
[wolnelektury.git] / apps / djangosphinx / apis / current.py
diff --git a/apps/djangosphinx/apis/current.py b/apps/djangosphinx/apis/current.py
new file mode 100644 (file)
index 0000000..e85f4ec
--- /dev/null
@@ -0,0 +1,11 @@
+from djangosphinx.constants import *
+
+try:
+    from sphinxapi import *
+except ImportError, exc:
+    name = 'djangosphinx.apis.api%d' % (SPHINX_API_VERSION,)
+    sphinxapi = __import__(name)
+    for name in name.split('.')[1:]:
+        sphinxapi = getattr(sphinxapi, name)
+    for attr in dir(sphinxapi):
+        globals()[attr] = getattr(sphinxapi, attr)