[damned-lies] Show a message on a module branch update
- From: Gil Forcada Codinachs <gforcada src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Show a message on a module branch update
- Date: Sun, 7 Oct 2012 23:11:49 +0000 (UTC)
commit 9b6979096e0c6acf3f44738a5154005faf893082
Author: Gil Forcada <gforcada gnome org>
Date: Mon Oct 8 01:06:32 2012 +0200
Show a message on a module branch update
On the edit branches form, if updating a branch without
adding any new branch no message was showing to confirm
to the user that her action was successful.
stats/views.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/stats/views.py b/stats/views.py
index b4a495e..caa2e78 100644
--- a/stats/views.py
+++ b/stats/views.py
@@ -132,8 +132,10 @@ def module_edit_branches(request, module_name):
cat = Category(release=rel, branch=branch, name=form.cleaned_data['new_branch_category'])
cat.save()
updated = True
+ else:
+ messages.success(request, "Branches updated")
if updated:
- form = ModuleBranchForm(mod) # Redisplay a clean form
+ form = ModuleBranchForm(mod)
else:
messages.error(request, "Sorry, the form is not valid")
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]