Commits

Anonymous committed 9abf7a4

Minor fixes

  • Participants
  • Parent commits 0852cde

Comments (0)

Files changed (3)

File registration/lib/forms.py

 import sys
 import tg
 from tg.i18n import lazy_ugettext as l_
-from tgext.ajaxforms import ajaxloaded
-from tgext.pluggable import plug_url
 
 if tg.config.get('prefer_toscawidgets2', False):
     from tw2.forms import TableForm, TextField, PasswordField
     from formencode import validators
 
     class RegistrationForm(TableForm):
-        user_name = TextField(label=l_(u'User Name'), validator=UniqueUserValidator(not_empty=True))
-        email_address = TextField(label=l_(u'Email'), validator=UniqueEmailValidator(not_empty=True))
-        password = PasswordField(label=l_(u'Password'), validator=Required)
-        password_confirm = PasswordField(label=l_(u'Confirm Password'), validator=Required)
+        user_name = TextField(label=l_('User Name'), validator=UniqueUserValidator(not_empty=True))
+        email_address = TextField(label=l_('Email'), validator=UniqueEmailValidator(not_empty=True))
+        password = PasswordField(label=l_('Password'), validator=Required)
+        password_confirm = PasswordField(label=l_('Confirm Password'), validator=Required)
         validator = validators.FieldsMatch('password', 'password_confirm')
 
 else:

File registration/lib/validators.py

 import re
-from tg import request
 from tg.i18n import ugettext as _
-from registration.model import DBSession, Registration
+from registration.model import DBSession
 from formencode import Invalid
 from tw.forms import validators
 
 # -*- coding: utf-8 -*-
-import sys, os
+import os
 
 try:
     from setuptools import setup, find_packages