diff options
author | nishanth | 2010-02-28 20:49:59 +0530 |
---|---|---|
committer | nishanth | 2010-02-28 20:49:59 +0530 |
commit | 32a2753b002516357f6504a76d28851f0cc94829 (patch) | |
tree | 2477e2c44853e48092464df13a476a47ff1774dc | |
parent | 3616137f2460bdf6ecfc27f78349c32081bb4585 (diff) | |
download | pytask-32a2753b002516357f6504a76d28851f0cc94829.tar.gz pytask-32a2753b002516357f6504a76d28851f0cc94829.tar.bz2 pytask-32a2753b002516357f6504a76d28851f0cc94829.zip |
after replying to a request, you are redirected to browse redirects page.
-rw-r--r-- | taskapp/views/user.py | 10 | ||||
-rw-r--r-- | templates/index.html | 3 |
2 files changed, 3 insertions, 10 deletions
diff --git a/taskapp/views/user.py b/taskapp/views/user.py index b51bca4..a33f25c 100644 --- a/taskapp/views/user.py +++ b/taskapp/views/user.py @@ -164,15 +164,6 @@ def view_request(request, rid): 'oldest':oldest, } - ## see if user has already accepted such request and is a high previleged user - ## made_invalid = if ( user_request.role == "DV" and user_rights in ["DV", "MG", "AD"] ) or \ - ## ( user_request.role == "MG" and user_rights in ["MG", "AD"] ) or \ - ## ( user_request.role == "AD" and user_rights == "AD" ) or \ - ## ( user_request.role == "MT" and user.task_mentors.filter(task=request.task) else False - - ## create_notification(user_request.role, user_request.sent_by, user, False, remarks = "User has accepted a similar request and is same or higher privileged than the request", requested_by = user_request.sent_by ) -##def create_notification(role, sent_to, sent_from=None, reply=None, task=None, remarks=None, requested_by=None, receiving_user=None, pynts=None): - return render_to_response('user/view_request.html', context) @login_required @@ -195,6 +186,7 @@ def process_request(request, rid, reply): reply_to_request(req_obj, reply, user) + return redirect('/user/requests/') return show_msg(user, "Your reply has been processed", browse_request_url, "view other requests") else: return show_msg(user, "You are not authorised to do this", browse_request_url, "view other requests") diff --git a/templates/index.html b/templates/index.html index 3298ddd..b14457d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -68,12 +68,13 @@ {% if can_create_task %} <a href="/task/create/">Create a task</a><br /> {% endif %} + <br /> {% ifequal user.get_profile.rights "MG" %} <a href="/user/make/dv/">Request another user to be a Developer</a><br /> <a href="/user/make/mg/">Request another user to act as manager</a><br /> {% endifequal %} {% ifequal user.get_profile.rights "AD" %} - <a href="/user/make/dv/">Request another user to be a Developer</a><br /><br /> + <a href="/user/make/dv/">Request another user to be a Developer</a><br /> <a href="/user/make/mg/">Request another user to act as a Manager</a><br /> <a href="/user/make/ad">Request another user to act as an Admin</a><br /> {% endifequal %} |