diff options
author | Chris Moylan <chris@chrismoylan.com> | 2011-07-10 22:45:52 -0500 |
---|---|---|
committer | Chris Moylan <chris@chrismoylan.com> | 2011-07-10 22:45:52 -0500 |
commit | 3d073d48cbf797c3da7b19670b8696d2229cce9b (patch) | |
tree | ff32c6b125ccf791d2adc70064d2f7bc7ae6ef3b /mediagoblin/edit | |
parent | 9df37e8a4a9387e9ebe6690d0f18b94a31d7ae4d (diff) | |
parent | 3054e2b3cb08839aca7da2e1c5b4cce1768bf705 (diff) | |
download | mediagoblin-3d073d48cbf797c3da7b19670b8696d2229cce9b.tar.lz mediagoblin-3d073d48cbf797c3da7b19670b8696d2229cce9b.tar.xz mediagoblin-3d073d48cbf797c3da7b19670b8696d2229cce9b.zip |
Merge branch 'master' into test_submission_views_365
Diffstat (limited to 'mediagoblin/edit')
-rw-r--r-- | mediagoblin/edit/forms.py | 6 | ||||
-rw-r--r-- | mediagoblin/edit/views.py | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py index 2efdb9e4..0ed52af1 100644 --- a/mediagoblin/edit/forms.py +++ b/mediagoblin/edit/forms.py @@ -23,7 +23,8 @@ class EditForm(wtforms.Form): 'Title', [wtforms.validators.Length(min=0, max=500)]) slug = wtforms.TextField( - 'Slug') + 'Slug', + [wtforms.validators.Required(message="The slug can't be empty")]) description = wtforms.TextAreaField('Description of this work') class EditProfileForm(wtforms.Form): @@ -31,4 +32,5 @@ class EditProfileForm(wtforms.Form): [wtforms.validators.Length(min=0, max=500)]) url = wtforms.TextField( 'Website', - [wtforms.validators.URL(message='Improperly formed URL')]) + [wtforms.validators.Optional(), + wtforms.validators.URL(message='Improperly formed URL')]) diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py index e064a9c3..3bcf788b 100644 --- a/mediagoblin/edit/views.py +++ b/mediagoblin/edit/views.py @@ -106,9 +106,9 @@ def edit_profile(request): messages.add_message(request, messages.SUCCESS, 'Profile edited!') - return redirect(request, - "mediagoblin.edit.profile", - username=edit_username) + return redirect(request, + 'mediagoblin.user_pages.user_home', + user=edit_username) return render_to_response( request, |