From c3954db5b21cf9df5def0bc00174b0551b38cbac Mon Sep 17 00:00:00 2001 From: Bradley Ayers Date: Mon, 6 Jun 2011 23:29:54 +1000 Subject: [PATCH] Fixed docs building, it now uses the example project so that django-tables modules can freely import django db stuff. --- django_tables/columns.py | 2 +- docs/conf.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/django_tables/columns.py b/django_tables/columns.py index b66dec4..52a6750 100644 --- a/django_tables/columns.py +++ b/django_tables/columns.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.utils.encoding import force_unicode, StrAndUnicode -from django.db.models.fields import FieldDoesNotExist from django.utils.datastructures import SortedDict from django.utils.text import capfirst from django.utils.safestring import mark_safe from django.template import RequestContext, Context, Template +from django.db.models.fields import FieldDoesNotExist from .utils import OrderBy, A, AttributeDict diff --git a/docs/conf.py b/docs/conf.py index 6322cbf..c79e25a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,14 +11,14 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, 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. +import sys, os sys.path.insert(0, os.path.join(os.path.abspath('.'), os.pardir)) -import django_tables as tables +import example sys.path.pop(0) +os.environ["DJANGO_SETTINGS_MODULE"] = "example.settings" # -- General configuration ----------------------------------------------------- -- 2.26.2