Commits

paj  committed a0507c4

Remove references to pylons

  • Participants
  • Parent commits 01a4c99

Comments (0)

Files changed (3)

File docs/index.rst

 Introduction
 ------------
 
-tw2.sqla is a database layer for ToscaWidgets 2 and SQLAlchemy. It allows common database tasks to be achieved with a minimal amount of code.
+tw2.sqla is a database layer for ToscaWidgets 2 and SQLAlchemy. It allows common database tasks to be achieved with minimal code.
 
 .. warning::
-    This is currently (July 2010) pre-alpha software. Although intended to work with any SQLAlchemy model, I am focusing testing on Elixir.
-
+    This is currently (June 2011) pre-alpha software.
+    
 
 Features
 --------
     Applications often contain quite repetitive code to initiate the act of loading and saving data. A database layer should aim to do this automatically.
 
 
+`Populating Selection Fields`
+
+    Selection fields, such as dropdown lists, often have their options sourced from a database table. A database layer should load these automatically, and ideally support cacheing for efficiency.
+
+
 `Generating Widget Definitions`
 
     Many applications contain long widget definitions that closely match the underlying database models. The idea is to reduce application code by automatically generating these definitions. Some tools exist that automatically generate source code at design time, but tw2.sqla avoids that approach and generates the definitions at run time.
     For flexibility it is very important to be able to override the automatic definitions. This needs to be possible on a per-field basis. It should also be possible to provide a customised policy, specifying the rules for generating widgets from model definitions. For example, an application may decide that all fields named "comment" should have a TextArea, instead of a TextField.
 
 
-`Populating Selection Fields`
-
-    Selection fields, such as dropdown lists, often have their options sourced from a database table. A database layer should load these automatically, and ideally support cacheing for efficiency.
-
 
 Existing Technology
 -------------------
     zip_safe=False,
     include_package_data=True,
     test_suite = 'nose.collector',
-    tests_require = ['BeautifulSoup', 'nose', 'FormEncode', 'WebTest', 'tw2.forms', 'elixir', 'pylons'] + _extra_cheetah + _extra_genshi + _extra_kid + _extra_mako,
+    tests_require = ['BeautifulSoup', 'nose', 'FormEncode', 'WebTest', 'elixir'] + _extra_cheetah + _extra_genshi + _extra_kid + _extra_mako,
     extras_require = {
         'cheetah': _extra_cheetah,
         'kid': _extra_kid,

File tests/test_widgets.py

 
 
 class TestListPageElixir(ElixirBase, ListPageT): pass
+class TestListPageSQLA(SQLABase, ListPageT): pass
 
-class TestListPageSQLA(SQLABase, ListPageT):
-    def setup(self):
-        super(TestListPageSQLA, self).setup()
-        import pylons
-        pylons.configuration.config.setdefault('DBSession', self.session)
 
 class FormPageT(tw2test.WidgetTest):
     def setup(self):
 class TestFormPageElixir(ElixirBase, FormPageT): pass
 
 class TestFormPageSQLA(SQLABase, FormPageT):
-    def setup(self):
-        super(TestFormPageSQLA, self).setup()
-        import pylons
-        pylons.configuration.config.setdefault('DBSession', self.session)
-
     def test_no_query_property(self):
         old_prop = self.widget.entity.query
         self.widget.entity.query = None
 
 
 class TestAutoListPageElixir(ElixirBase, AutoListPageT): pass
-class TestAutoListPageSQLA(SQLABase, AutoListPageT):
-    def setup(self):
-        super(TestAutoListPageSQLA, self).setup()
-        import pylons
-        pylons.configuration.config.setdefault('DBSession', self.session)
+class TestAutoListPageSQLA(SQLABase, AutoListPageT): pass
 
 # TODO -- do AutoListPageEDIT here
 
 </form>"""
 
 class TestAutoTableForm1Elixir(ElixirBase, AutoTableFormT1): pass
-class TestAutoTableForm1SQLA(SQLABase, AutoTableFormT1):
-    def setup(self):
-        super(TestAutoTableForm1SQLA, self).setup()
-        import pylons
-        pylons.configuration.config.setdefault('DBSession', self.session)
+class TestAutoTableForm1SQLA(SQLABase, AutoTableFormT1): pass
+
 
 class AutoTableFormT2(tw2test.WidgetTest):
     def setup(self):
 """
 
 class TestAutoTableForm2Elixir(ElixirBase, AutoTableFormT2): pass
-class TestAutoTableForm2SQLA(SQLABase, AutoTableFormT2):
-    def setup(self):
-        super(TestAutoTableForm2SQLA, self).setup()
-        import pylons
-        pylons.configuration.config.setdefault('DBSession', self.session)
+class TestAutoTableForm2SQLA(SQLABase, AutoTableFormT2): pass
 
 
 class AutoViewGridT(tw2test.WidgetTest):
 
 
 class TestAutoViewGridElixir(ElixirBase, AutoViewGridT): pass
-class TestAutoViewGridSQLA(SQLABase, AutoViewGridT):
-    def setup(self):
-        super(TestAutoViewGridSQLA, self).setup()
-        import pylons
-        pylons.configuration.config.setdefault('DBSession', self.session)
+class TestAutoViewGridSQLA(SQLABase, AutoViewGridT): pass
+
 
 class AutoGrowingGridT(tw2test.WidgetTest):
     def setup(self):
     </table>"""
 
 class TestAutoGrowingGridElixir(ElixirBase, AutoGrowingGridT): pass
-class TestAutoGrowingGridSQLA(SQLABase, AutoGrowingGridT):
-    def setup(self):
-        super(TestAutoGrowingGridSQLA, self).setup()
-        import pylons
-        pylons.configuration.config.setdefault('DBSession', self.session)
+class TestAutoGrowingGridSQLA(SQLABase, AutoGrowingGridT): pass
 
 
 class AutoGrowingGridAsChildT(tw2test.WidgetTest):
     </tr>
     </table></body></html>"""
 
-class TestAutoGrowingGridAsChildElixir(ElixirBase, AutoGrowingGridAsChildT):
-    pass
-class TestAutoGrowingGridAsChildSQLA(SQLABase, AutoGrowingGridAsChildT):
-    def setup(self):
-        super(TestAutoGrowingGridAsChildSQLA, self).setup()
-        import pylons
-        pylons.configuration.config.setdefault('DBSession', self.session)
+class TestAutoGrowingGridAsChildElixir(ElixirBase, AutoGrowingGridAsChildT): pass
+class TestAutoGrowingGridAsChildSQLA(SQLABase, AutoGrowingGridAsChildT): pass
+
 
 class AutoGrowingGridAsChildWithRelationshipT(tw2test.WidgetTest):
     def setup(self):
     ElixirBase, AutoGrowingGridAsChildWithRelationshipT):
     pass
 class TestAutoGrowingGridAsChildWithRelationshipSQLA(
-    SQLABase, AutoGrowingGridAsChildWithRelationshipT):
-    def setup(self):
-        super(TestAutoGrowingGridAsChildWithRelationshipSQLA, self).setup()
-        import pylons
-        pylons.configuration.config.setdefault('DBSession', self.session)
+SQLABase, AutoGrowingGridAsChildWithRelationshipT): pass