diff options
| -rwxr-xr-x | example_project/manage.py | 6 | ||||
| -rw-r--r-- | example_project/settings.py | 1 | ||||
| -rw-r--r-- | ishtar_common/views.py | 5 | ||||
| -rw-r--r-- | requirements.txt | 2 | ||||
| -rwxr-xr-x | xhtml2odt/xhtml2odt.py | 6 | 
5 files changed, 12 insertions, 8 deletions
| diff --git a/example_project/manage.py b/example_project/manage.py index 8a126f72d..8cce5c4b2 100755 --- a/example_project/manage.py +++ b/example_project/manage.py @@ -1,7 +1,9 @@  #!/usr/bin/python  from django.core.management import execute_manager -import sys -sys.path.append('/home/nim/Work/geo-django-fla/') + +import os, sys +sys.path.append(os.path.abspath('..')) +  try:      import settings # Assumed to be in the same directory.  except ImportError: diff --git a/example_project/settings.py b/example_project/settings.py index 328068837..2825f717e 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -24,7 +24,6 @@ STATIC_ROOT = ROOT_PATH + 'static/'  BASE_URL = "/"  URL_PATH = "" -XHTML2ODT_PATH = "/usr/local/lib/"  ODT_TEMPLATE = ROOT_PATH + "../ishtar_common/static/template.odt" diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 0f234c0a1..b5f56652c 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -47,10 +47,7 @@ from django.template import RequestContext, loader  from django.utils.decorators import method_decorator  from django.utils.translation import ugettext, ugettext_lazy as _ -if settings.XHTML2ODT_PATH: -    import sys -    sys.path.append(settings.XHTML2ODT_PATH) -    from xhtml2odt import xhtml2odt +from xhtml2odt import xhtml2odt  from menus import menu diff --git a/requirements.txt b/requirements.txt index 06d7e0e7b..401ae07d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,3 +16,5 @@ lxml  html5lib  django-extra-views==0.2.4 + +git+https://github.com/treyhunner/django-simple-history.git@0fd9b8e9c6f36b0141367b502420efe92d4e21ce diff --git a/xhtml2odt/xhtml2odt.py b/xhtml2odt/xhtml2odt.py index b8ebc38de..aa387d54e 100755 --- a/xhtml2odt/xhtml2odt.py +++ b/xhtml2odt/xhtml2odt.py @@ -106,7 +106,11 @@ import mimetypes  from StringIO import StringIO  from optparse import OptionParser -import tidy +try: +    import tidy +except: +    from tidylib import tidy_document as tidy +  from lxml import etree  from PIL import Image | 
