Mercurial > kallithea
diff pylons_app/model/forms.py @ 530:a08f610e545e
Implemented server side forks
added ability to pass session to user/repo models
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 01 Oct 2010 00:16:09 +0200 |
parents | 3a567e329fb6 |
children |
line wrap: on
line diff
--- a/pylons_app/model/forms.py Thu Sep 30 18:35:03 2010 +0200 +++ b/pylons_app/model/forms.py Fri Oct 01 00:16:09 2010 +0200 @@ -307,6 +307,16 @@ chained_validators = [ValidPerms] return _RepoForm +def RepoForkForm(edit=False, old_data={}): + class _RepoForkForm(formencode.Schema): + allow_extra_fields = True + filter_extra_fields = False + fork_name = All(UnicodeString(strip=True, min=1, not_empty=True), ValidRepoName(edit, old_data)) + description = UnicodeString(strip=True, min=1, not_empty=True) + private = StringBoolean(if_missing=False) + + return _RepoForkForm + def RepoSettingsForm(edit=False, old_data={}): class _RepoForm(formencode.Schema): allow_extra_fields = True