>
> So if you could apply the attached patch to your installation of TG
> 1.0.4 & check if things work out for you, I'll apply it to the 1.0 trunk
> and will beg Florent to make a new release.. :)
Not only _talking_ about attaching but actually _doing_ it helps
tremendously...
Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
Index: CHANGELOG.txt
===================================================================
--- CHANGELOG.txt (Revision 4035)
+++ CHANGELOG.txt (Arbeitskopie)
@@ -106,6 +106,8 @@
* Installation of TurboGears now does not require installation of an ORM.
Instead, a project that relies on SQLObject or SQLAlchemy will have a
``setup.py`` file written with the proper requirements (#1501, #1620).
+* removed the hard SQLAlchemy/SQLObject dependecies and modified quickstart
+ to render the required ORM as requirement into a projects setup.py.
Features
~~~~~~~~
@@ -152,6 +154,7 @@
* toolbox loading will no more crash on a missing SQLObject import. (#1620).
* Identity bug when using non-ASCII characters in the URL. (#1598, #1407,
#1022)
+* fixed the behavior of tg.mochikit_suppress which wasn't actually working
Project Updates
~~~~~~~~~~~~~~~
Index: turbogears/tests/test_form_controllers.py
===================================================================
--- turbogears/tests/test_form_controllers.py (Revision 4035)
+++ turbogears/tests/test_form_controllers.py (Arbeitskopie)
@@ -97,11 +97,16 @@
root = cherrypy.root
turbogears.config.update({"global":{"tg.mochikit_suppress" : True}})
testutil.createRequest("/usemochi")
- print cherrypy.response.body[0]
+ suppressed_body = cherrypy.response.body[0]
# repair the fixture
turbogears.config.update({"global":{"tg.mochikit_suppress" : False}})
- assert "MochiKit.js" not in cherrypy.response.body[0]
+ testutil.createRequest("/usemochi")
+ included_body = cherrypy.response.body[0]
+
+ assert "MochiKit.js" not in suppressed_body
+ assert "MochiKit.js" in included_body
+
def test_mochikit_everywhere():
"MochiKit can be included everywhere by setting tg.mochikit_all"
root = cherrypy.root
Index: turbogears/widgets/base.py
===================================================================
--- turbogears/widgets/base.py (Revision 4035)
+++ turbogears/widgets/base.py (Arbeitskopie)
@@ -573,13 +573,19 @@
If 'turbogears.mochikit' is part of tg.include_widgets, a warning is
issued.
"""
- def retrieve_javascript(self):
- if config.get('tg.mochikit_suppress', False):
- if 'turbogears.mochikit' in config.get('tg.include_widgets', []):
- warnings.warn("""tg.mochikit_suppress == True, but
'turbogears.mochikit' is to be included via 'tg.mochikit_suppress'.
+
+ template = """
+ <script xmlns:py="http://purl.org/kid/ns#" py:if="not suppress"
type="text/javascript" src="$link"></script>
+ """
+
+ def update_params(self, p):
+ super(MochiKitLink, self).update_params(p)
+ suppress = config.get('tg.mochikit_suppress', False)
+ p['suppress'] = suppress
+
+ if suppress and 'turbogears.mochikit' in
config.get('tg.include_widgets', []):
+ warnings.warn("""tg.mochikit_suppress == True, but
'turbogears.mochikit' is to be included via 'tg.mochikit_suppress'.
This is a contratiction, and mochikit_suppress overrides the inclusion to
prevent subtle errors due to version mixing of MochkKit.""")
- return set()
- return super(MochiKitLink, self).retrieve_javascript()
mochikit = MochiKitLink("turbogears", "js/MochiKit.js")