Mercurial > kallithea
comparison 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 |
comparison
equal
deleted
inserted
replaced
529:3a567e329fb6 | 530:a08f610e545e |
---|---|
305 user = All(Int(not_empty=True), ValidRepoUser) | 305 user = All(Int(not_empty=True), ValidRepoUser) |
306 | 306 |
307 chained_validators = [ValidPerms] | 307 chained_validators = [ValidPerms] |
308 return _RepoForm | 308 return _RepoForm |
309 | 309 |
310 def RepoForkForm(edit=False, old_data={}): | |
311 class _RepoForkForm(formencode.Schema): | |
312 allow_extra_fields = True | |
313 filter_extra_fields = False | |
314 fork_name = All(UnicodeString(strip=True, min=1, not_empty=True), ValidRepoName(edit, old_data)) | |
315 description = UnicodeString(strip=True, min=1, not_empty=True) | |
316 private = StringBoolean(if_missing=False) | |
317 | |
318 return _RepoForkForm | |
319 | |
310 def RepoSettingsForm(edit=False, old_data={}): | 320 def RepoSettingsForm(edit=False, old_data={}): |
311 class _RepoForm(formencode.Schema): | 321 class _RepoForm(formencode.Schema): |
312 allow_extra_fields = True | 322 allow_extra_fields = True |
313 filter_extra_fields = False | 323 filter_extra_fields = False |
314 repo_name = All(UnicodeString(strip=True, min=1, not_empty=True), ValidRepoName(edit, old_data)) | 324 repo_name = All(UnicodeString(strip=True, min=1, not_empty=True), ValidRepoName(edit, old_data)) |