From 7887212fd544eb9cfde7b476524886fe1c95dc81 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Tue, 10 Dec 2013 14:22:41 +0530 Subject: changes to redirect according to user rights --- tbc/templates/tbc/forbidden.html | 6 +++ tbc/templates/tbc/login.html | 3 ++ tbc/views.py | 97 +++++++++++++++++++++------------------- 3 files changed, 60 insertions(+), 46 deletions(-) create mode 100644 tbc/templates/tbc/forbidden.html diff --git a/tbc/templates/tbc/forbidden.html b/tbc/templates/tbc/forbidden.html new file mode 100644 index 0000000..e9d49bb --- /dev/null +++ b/tbc/templates/tbc/forbidden.html @@ -0,0 +1,6 @@ +{% extends 'base.html' %} +{% block content %} + +
Oops, You do not have the required rights to view this page.
+ +{% endblock %} diff --git a/tbc/templates/tbc/login.html b/tbc/templates/tbc/login.html index 6d7a050..2274619 100644 --- a/tbc/templates/tbc/login.html +++ b/tbc/templates/tbc/login.html @@ -1,5 +1,8 @@ {% extends 'base.html' %} {% block content %} +{% if require_login %} +The requsted page requires login.
+{% endif %}