Changeset 1768
- Timestamp:
- 09/16/08 09:00:41 (18 months ago)
- Location:
- trunk/pylucid_project/PyLucid
- Files:
-
- 4 modified
-
install/install.py (modified) (2 diffs)
-
plugins_internal/auth/auth.py (modified) (2 diffs)
-
tools/forms_utils.py (modified) (1 diff)
-
__init__.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pylucid_project/PyLucid/install/install.py
r1731 r1768 14 14 15 15 from PyLucid.install.BaseInstall import BaseInstall 16 from PyLucid.tools.forms_utils import ModelForm2 16 17 17 18 import sys, os … … 204 205 205 206 206 class CreateUserForm( forms.ModelForm):207 class CreateUserForm(ModelForm2): 207 208 """ 208 209 form for input the username, used in auth.login() -
trunk/pylucid_project/PyLucid/plugins_internal/auth/auth.py
r1758 r1768 61 61 warnings.warn("Debugmode is on", UserWarning) 62 62 63 64 63 from django.conf import settings 64 65 65 from PyLucid.tools import crypt 66 from PyLucid.models import JS_LoginData, Page 67 from PyLucid.tools.forms_utils import ModelForm2 66 68 from PyLucid.system.BasePlugin import PyLucidBasePlugin 67 69 from PyLucid.system.context_processors import add_dynamic_context 68 from PyLucid.models import JS_LoginData, Page 70 69 71 70 72 … … 160 162 #______________________________________________________________________________ 161 163 # FORMS 162 163 class ModelForm2(forms.ModelForm):164 def validate_unique(self):165 """166 Don't validate unique fields.167 We used a ModelForm only for generating the forms and not for168 create/update any database data. So a field unique Test would like169 generate Errors like:170 User with this Username already exists.171 """172 pass173 174 164 175 165 class UsernameForm(ModelForm2): -
trunk/pylucid_project/PyLucid/tools/forms_utils.py
r1722 r1768 153 153 154 154 155 class ModelForm2(forms.ModelForm): 156 """ 157 A model form witch don't validate unique fields. 158 159 This ModelForm is only for generating the forms and not for create/update 160 any database data. So a field unique Test would like generate Errors like: 161 User with this Username already exists. 162 163 see also: 164 http://www.jensdiemer.de/_command/118/blog/detail/30/ (de) 165 http://www.python-forum.de/topic-16000.html (de) 166 """ 167 def validate_unique(self): 168 pass 169 170 171 155 172 156 173 if __name__ == "__main__": -
trunk/pylucid_project/PyLucid/__init__.py
r1762 r1768 19 19 try: 20 20 from django.utils.version import get_svn_revision 21 21 22 22 svn_revision = get_svn_revision("PyLucid") 23 23 if svn_revision == u'SVN-unknown': … … 36 36 # - No spaces: "0.8.0 RC2" -> "0.8.0RC2" 37 37 # http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s-version 38 PYLUCID_VERSION = (0, 8, 5, svn_revision)39 PYLUCID_VERSION_STRING = "0.8.5 " + svn_revision38 PYLUCID_VERSION = (0, 8, 5, "RC2", svn_revision) 39 PYLUCID_VERSION_STRING = "0.8.5RC2" + svn_revision 40 40 41 41