diff options
author | hardythe1 | 2015-02-23 16:08:21 +0530 |
---|---|---|
committer | hardythe1 | 2015-02-23 16:08:21 +0530 |
commit | 5669ecb3f9a7d3c16fbd4bd00b7b448fbb275181 (patch) | |
tree | 0bacdacfc5522fd7a7bad5239088b5b94df39d82 | |
parent | b838ac9acfdba428a6ed6f94a9c605781e96228b (diff) | |
download | Python-TBC-Interface-5669ecb3f9a7d3c16fbd4bd00b7b448fbb275181.tar.gz Python-TBC-Interface-5669ecb3f9a7d3c16fbd4bd00b7b448fbb275181.tar.bz2 Python-TBC-Interface-5669ecb3f9a7d3c16fbd4bd00b7b448fbb275181.zip |
specified date format and redirected
-rw-r--r-- | tbc/templates/tbc/update-profile.html | 31 | ||||
-rwxr-xr-x | tbc/views.py | 4 |
2 files changed, 33 insertions, 2 deletions
diff --git a/tbc/templates/tbc/update-profile.html b/tbc/templates/tbc/update-profile.html new file mode 100644 index 0000000..d1731bb --- /dev/null +++ b/tbc/templates/tbc/update-profile.html @@ -0,0 +1,31 @@ +{% extends 'base.html' %} +{% block content %} +{% if profile %} + <center> + <div class="alert" style="width:500px;"> + <a class="close" data-dismiss="alert" href="#">×</a> + <p> Please update your profile first and then proceed.</p> + </div> + </center> + <div class="clearfix"></div> +{% endif %} +<div id="content-wrap" style="max-width:600px;"> + <h3>Update Your Profile</h3> + <hr> + <form action="/profile/" method=POST> + {% csrf_token %} + {{ form.as_p }} + {{ form.errors }} + <br> + <input class="btn btn-primary" type=submit value=submit> + </form> +</div> +{% endblock %} + +{% block script %} +<script> + $( document ).ready(function() { + $('label[for="id_dob"]').text("DOB (yyyy/mm/dd)") + }); +</script> +{% endblock %} diff --git a/tbc/views.py b/tbc/views.py index f715e3e..deb5123 100755 --- a/tbc/views.py +++ b/tbc/views.py @@ -272,7 +272,7 @@ def UpdateProfile(request): return HttpResponseRedirect('/') else: context['form'] = form - return render_to_response('tbc/profile.html', context) + return render_to_response('tbc/update-profile.html', context) else: form = UserProfileForm() form.initial['about'] = user_profile.about @@ -284,7 +284,7 @@ def UpdateProfile(request): form.initial['phone_no'] = user_profile.phone_no form.initial['about_proj'] = user_profile.about_proj context['form'] = form - return render_to_response('tbc/profile.html', context) + return render_to_response('tbc/update-profile.html', context) def UserLogout(request): user = request.user |