SVN: r20327 - trunk/quixote/demo
akuchlin-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected] Tue, 21 Jan 2003 14:13:05 -0500
| Newsgroups | gmane.comp.web.quixote.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: akuchlin
Date: 2003-01-21 14:13:04 -0500 (Tue, 21 Jan 2003)
New Revision: 20327
Modified:
trunk/quixote/demo/__init__.py
Log:
Exercise _q_resolve() in the demo pages
Modified: trunk/quixote/demo/__init__.py
==============================================================================
--- trunk/quixote/demo/__init__.py (original)
+++ trunk/quixote/demo/__init__.py 2003-01-21 14:13:05.000000000 -0500
@@ -4,7 +4,6 @@
import sys
from quixote.demo.pages import _q_index, dumpreq
from quixote.demo.widgets import widgets
-from quixote.demo.forms import form_demo
from quixote.demo.integer_ui import IntegerUI
def simple (request):
@@ -17,3 +16,13 @@
def _q_getname(request, component):
return IntegerUI(request, component)
+
+def _q_resolve (component):
+ # _q_resolve() is a hook that can be used to import only
+ # when it's actually accessed. This can be used to make
+ # start-up of your application faster, because it doesn't have
+ # to import every single module when it starts running.
+ if component == 'form_demo':
+ from quixote.demo.forms import form_demo
+ return form_demo
+