Commits

Andriy Kornatskyy committed 45fcf16

Make use of wheezy.html mako widget preprocessor.

  • Participants
  • Parent commits 7de0264

Comments (0)

Files changed (2)

File demos/public/src/config.py

 from wheezy.caching import MemoryCache
 from wheezy.core.collections import defaultdict
 from wheezy.core.i18n import TranslationsManager
+from wheezy.html.ext.mako import widget_preprocessor
 from wheezy.http import CacheProfile
 from wheezy.http import RequestVary
 from wheezy.security.crypto import Ticket
         'render_template': MakoTemplate(
             directories=['content/templates'],
             filesystem_checks=False,
-            template_cache=template_cache),
+            template_cache=template_cache,
+            preprocessor=[widget_preprocessor]
+            ),
 
         'ticket': Ticket(
             max_age=1200,

File demos/public/src/membership/web/views.py

             return self.redirect_for('default')
         credential = credential or Credential()
         return self.render_response('membership/signin.html',
-                self.widgets(
-                    credential=credential,
-                    model=self.model))
+                        credential=credential,
+                        model=self.model)
 
     def post(self):
         if not self.validate_xsrf_token():
             return self.redirect_for('default')
         registration = registration or Registration()
         return self.render_response('membership/signup.html',
-                self.widgets(
-                    registration=registration,
-                    credential=registration.credential,
-                    account=registration.account,
-                    model=self.model),
+                model=self.model,
+                registration=registration,
+                account=registration.account,
+                credential=registration.credential,
                 questions=sorted(
                     self.factory.membership.password_questions.items(),
                     key=itemgetter(1)),