diff options
author | Prabhu Ramachandran | 2011-11-20 23:26:18 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2011-11-20 23:26:18 +0530 |
commit | 5650db889ad19d199efe06c59f766698a515a4c5 (patch) | |
tree | 5fc269ed1f38608bbd46cee8af68687803115d82 /templates | |
parent | 13d4aa869a8a49c2ea27ee97b88decfde48639b5 (diff) | |
download | online_test-5650db889ad19d199efe06c59f766698a515a4c5.tar.gz online_test-5650db889ad19d199efe06c59f766698a515a4c5.tar.bz2 online_test-5650db889ad19d199efe06c59f766698a515a4c5.zip |
ENH: Adding a URL_ROOT configuration option.
This is useful when you are forced to host the app on a URL like
host.org/foo/exam and not as host.org/exam as you would want. Change
the URL_ROOT setting to "/foo" in the above case for this to work.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/exam/intro.html | 2 | ||||
-rw-r--r-- | templates/exam/login.html | 4 | ||||
-rw-r--r-- | templates/exam/question.html | 4 | ||||
-rw-r--r-- | templates/exam/quit.html | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/templates/exam/intro.html b/templates/exam/intro.html index 75de639..1d3e5de 100644 --- a/templates/exam/intro.html +++ b/templates/exam/intro.html @@ -45,7 +45,7 @@ carefully. <p> We hope you enjoy taking this exam.</p> -<form action="/exam/start/" method="post" align="center"> +<form action="{{URL_ROOT}}/exam/start/" method="post" align="center"> {% csrf_token %} <input type="submit" name="start" value="Start Exam!"> </form> diff --git a/templates/exam/login.html b/templates/exam/login.html index 8f0ef6c..8e6352e 100644 --- a/templates/exam/login.html +++ b/templates/exam/login.html @@ -15,6 +15,6 @@ Please login to proceed.</p> <input type="submit" value="Login" /> </form> -<!-- <a href="/exam/forgotpassword/">Forgot Password</a> <br /> --> -<a href="/exam/register/">New User Registration</a> +<!-- <a href="{{URL_ROOT}}/exam/forgotpassword/">Forgot Password</a> <br /> --> +<a href="{{URL_ROOT}}/exam/register/">New User Registration</a> {% endblock content %}
\ No newline at end of file diff --git a/templates/exam/question.html b/templates/exam/question.html index 226bdca..dec476e 100644 --- a/templates/exam/question.html +++ b/templates/exam/question.html @@ -58,7 +58,7 @@ function update_time() <p id="status"></p> -<form id="code" action="/exam/{{ question.id }}/check/" method="post"> +<form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/" method="post"> {% csrf_token %} <textarea rows="20" cols="100" name="answer"> @@ -78,7 +78,7 @@ you have {{ paper.questions_left }} question(s) left in {{ quiz_name }}.</p> <p id="time_left"> <strong> Time left: </strong> </p> <hr/> -<form id="logout" action="/exam/quit/" method="post"> +<form id="logout" action="{{URL_ROOT}}/exam/quit/" method="post"> {% csrf_token %} <input type="submit" name="quit" value="Quit exam and logout" /> </form> diff --git a/templates/exam/quit.html b/templates/exam/quit.html index a9d3515..37b5c08 100644 --- a/templates/exam/quit.html +++ b/templates/exam/quit.html @@ -6,7 +6,7 @@ <p>Your current answers are saved.</p> <p> Are you sure you wish to quit the exam?</p> -<form action="/exam/complete/" method="post"> +<form action="{{URL_ROOT}}/exam/complete/" method="post"> {% csrf_token %} <input type="submit" name="yes" value="Yes!" /> <input type="submit" name="no" value="No!" /> |