diff options
author | anoop | 2010-02-24 14:40:20 +0530 |
---|---|---|
committer | anoop | 2010-02-24 14:40:20 +0530 |
commit | 0a5d8db468dd357ae10a86cb84345c67e7d182b6 (patch) | |
tree | 6175edd9ddafcc014d050e2486a5298c0c545274 | |
parent | a9ef4454ebb728f5af57e10aba06f2a2873d6ae8 (diff) | |
download | pytask-0a5d8db468dd357ae10a86cb84345c67e7d182b6.tar.gz pytask-0a5d8db468dd357ae10a86cb84345c67e7d182b6.tar.bz2 pytask-0a5d8db468dd357ae10a86cb84345c67e7d182b6.zip |
deleted unwanted code in user.py, added css for testing in base.html.
-rw-r--r-- | taskapp/views/user.py | 2 | ||||
-rw-r--r-- | templates/base.html | 159 |
2 files changed, 153 insertions, 8 deletions
diff --git a/taskapp/views/user.py b/taskapp/views/user.py index 8746214..7fa86be 100644 --- a/taskapp/views/user.py +++ b/taskapp/views/user.py @@ -65,8 +65,6 @@ def view_my_profile(request,uid=None): @login_required def edit_my_profile(request): """ enables the user to edit his/her user profile """ - if str(request.user) == 'AnonymousUser': - return show_msg('Please register yourself to activate the functionality') if request.method == 'POST': form = UserProfileEditForm(request.POST) # if not form.is_valid(): diff --git a/templates/base.html b/templates/base.html index 5dfdebc..3e383f0 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,12 +1,159 @@ <html> <head> <title>{% block title %}PyTasks{% endblock %}</title> +<style type="text/css"> + body { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + color: #333; + text-align: center; + margin: 0px; + padding: 20px 0px 20px 0px; + } + #wrapper { + width: 956px; + padding: 10px; + margin: 0px auto 0px auto; + height: auto; + text-align: left; + border: 1px solid #ddd; + } + #header { + margin: 0px; + padding: 0px; + height: 100px; + width: auto; + background-color: #f1f1f1; + } + #container { + padding: 0px; + margin: 10px 0px 0px 0px; + background-attachment: scroll; + background-image: url(back.gif); + background-repeat: repeat-y; + background-position: 0px 0px; + height: auto; #default was 1% + width: auto; + } + #left { + margin: 0px; + width: 160px; + padding: 10px 20px 10px 20px; + float: left; + } + #nav { + margin: 0px; + padding: 0px; + list-style-image: none; + list-style-type: none; + } + #nav li { + margin: 0px; + padding: 0px; + display: block; + background-attachment: scroll; + background-image: url(bullet.gif); + background-repeat: no-repeat; + background-position: 0px 50%; + } + #nav li a:link, #nav li a:visited, #nav li a:active { + color: #666; + text-decoration: none; + display: block; + margin: 0px; + padding: 3px 15px 3px 15px; + width: 130px; + } + #nav li a:hover { + color: #999; + text-decoration: none; + } + #center { + height: auto; + width: 504px; + padding: 10px 20px 10px 20px; + float: left; + margin: 0px 0px 0px 6px; + line-height: 1.8em; + } + h1 { + font-size: 14px; + margin: 0px; + padding: 0px; + } + #right { + padding: 10px 20px 10px 20px; + height: auto; + width: 160px; + float: left; + margin: 0px 0px 0px 6px; + } + .clearer { + font-size: 0px; + line-height: 0px; + display: block; + margin: 0px; + padding: 0px; + clear: both; + height: 0px; + width: auto; + } + #footer { + margin: 10px 0px 0px 0px; + text-align: center; + padding: 15px 0px 15px 0px; + background-color: #f1f1f1; + } + #footer p { + color: #999; + margin: 0px auto 0px auto; + padding: 0px; + } + #footer a:link, #footer a:visited, #footer a:active { + color: #999; + text-decoration: none; + } + #footer a:hover { + color: #ccc; + text-decoration: none; + } +</style> </head> + <body> -<h2><a href="/">PyTasks</a></h2> -{% if user.is_authenticated %} -<a href="/accounts/logout">logout</a> -{% endif %} -<br><br> -{% block content %}This is the default content{% endblock %}</body> +<div id="wrapper"> + <div id="header"> + <h2><a href="/">PyTasks</a></h2> + </div> + <div id="container"> + <div id="left"> + <ul id="nav"> + <li><a href="/" title="home">home</a></li> + {% if user.is_authenticated %} + <li><a href="/task/browse/" title="tasks">tasks</a></li> + <li><a href="/user/notifications/" title="notifications">notifications</a></li> + <li><a href="/user/requests/" title="Requests">requests</a></li> + <br> + <li><a href="/accounts/logout/">logout</a></li> + {% else %} + <li><a href="/accounts/login/" title="login">login</a></li> + {% endif %} + </ul> + </div> + <div id="center"> + {% block content %}This is the default content{% endblock %} + </div> + <div id="right"> + <!--{% if user.is_authenticated %} + <a href="/accounts/logout">logout</a> + {% endif %}--> + </div> + <div class="clearer"> + </div> + </div> + <div id="footer"> + </div> +</div> + +</body> </html> |