diff options
| author | Georg Brandl <georg@python.org> | 2010-08-21 22:36:35 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-08-21 22:36:35 +0200 |
| commit | 2399e4627c40b373869da4409213475ade655846 (patch) | |
| tree | 572132c497bf23782f4b64e6c4177e76b702b6f5 | |
| parent | 092ebec8a7eb938a2c720d57b258bd6e106bff9e (diff) | |
| download | sphinx-git-2399e4627c40b373869da4409213475ade655846.tar.gz | |
Rename module to make clear it is only for sqlalchemy.
| -rw-r--r-- | sphinx/websupport/storage/sqlalchemy_db.py (renamed from sphinx/websupport/storage/db.py) | 10 | ||||
| -rw-r--r-- | sphinx/websupport/storage/sqlalchemystorage.py | 4 | ||||
| -rw-r--r-- | tests/test_websupport.py | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sphinx/websupport/storage/db.py b/sphinx/websupport/storage/sqlalchemy_db.py index bf7b83dfd..4e2757a9e 100644 --- a/sphinx/websupport/storage/db.py +++ b/sphinx/websupport/storage/sqlalchemy_db.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ - sphinx.websupport.storage.db - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + sphinx.websupport.storage.sqlalchemy_db + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SQLAlchemy table and mapper definitions used by the - :class:`sphinx.websupport.comments.SQLAlchemyStorage`. + :class:`sphinx.websupport.storage.sqlalchemystorage.SQLAlchemyStorage`. :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. @@ -14,15 +14,15 @@ from datetime import datetime from sqlalchemy import Column, Integer, Text, String, Boolean, \ ForeignKey, DateTime -from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relation, sessionmaker, aliased +from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() - Session = sessionmaker() db_prefix = 'sphinx_' + class Node(Base): """Data about a Node in a doctree.""" __tablename__ = db_prefix + 'nodes' diff --git a/sphinx/websupport/storage/sqlalchemystorage.py b/sphinx/websupport/storage/sqlalchemystorage.py index dea2eea02..6f13c91b6 100644 --- a/sphinx/websupport/storage/sqlalchemystorage.py +++ b/sphinx/websupport/storage/sqlalchemystorage.py @@ -22,8 +22,8 @@ if sqlalchemy.__version__[:3] < '0.5': from sphinx.websupport.errors import CommentNotAllowedError, \ UserNotAuthorizedError from sphinx.websupport.storage import StorageBackend -from sphinx.websupport.storage.db import Base, Node, Comment, \ - CommentVote, Session +from sphinx.websupport.storage.sqlalchemy_db import Base, Node, \ + Comment, CommentVote, Session from sphinx.websupport.storage.differ import CombinedHtmlDiff diff --git a/tests/test_websupport.py b/tests/test_websupport.py index bf66cb3b1..e008556c8 100644 --- a/tests/test_websupport.py +++ b/tests/test_websupport.py @@ -25,7 +25,7 @@ from sphinx.websupport.errors import * from sphinx.websupport.storage.differ import CombinedHtmlDiff from sphinx.websupport.storage.sqlalchemystorage import Session, \ SQLAlchemyStorage, Comment, CommentVote -from sphinx.websupport.storage.db import Node +from sphinx.websupport.storage.sqlalchemy_db import Node from util import * |
