[snowy] Use absolute path to XSL
- From: Sanford Armstrong <sharm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [snowy] Use absolute path to XSL
- Date: Tue, 14 Sep 2010 23:33:02 +0000 (UTC)
commit 08bdd6ffad63e4a7c30d6ee6578a7f5e2e527c4a
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date: Tue Sep 14 16:30:01 2010 -0700
Use absolute path to XSL
notes/views.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/notes/views.py b/notes/views.py
index e05e1a1..1ae8bc3 100644
--- a/notes/views.py
+++ b/notes/views.py
@@ -91,11 +91,13 @@ def note_detail(request, username, note_id, slug='',
# break this out into a function
import libxslt
import libxml2
-
+ import os.path
+
style, doc, result = None, None, None
try:
- styledoc = libxml2.parseFile('data/note2xhtml.xsl')
+ styledoc = libxml2.parseFile(os.path.join(settings.PROJECT_ROOT,
+ 'data/note2xhtml.xsl'))
style = libxslt.parseStylesheetDoc(styledoc)
template = CONTENT_TEMPLATES.get(note.content_version, DEFAULT_CONTENT_TEMPLATE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]