Skip to content

Commit

Permalink
Changed template structure to allow easier integration with Pinax
Browse files Browse the repository at this point in the history
  • Loading branch information
zen4ever committed Dec 30, 2009
1 parent ca48aad commit fb8f66f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
8 changes: 5 additions & 3 deletions avatar_crop/templates/avatar_crop/crop.html
Expand Up @@ -2,7 +2,7 @@

{% load avatar_crop_tags %}

{% block extrahead %}
{% block extra_head %}
<style type="text/css">
.img_preview {
position:relative;
Expand Down Expand Up @@ -40,7 +40,9 @@
text-align:center;
}
</style>
<script type="text/javascript" src="/static/js/jquery-1.3.2.min.js"></script>
{% endblock %}

{% block extra_body %}
<script type="text/javascript" src="/static/js/jquery.imgareaselect-0.7.min.js"></script>
<script type="text/javascript">
$(document).ready(function (){
Expand Down Expand Up @@ -72,7 +74,7 @@
</script>
{% endblock %}

{% block content %}
{% block body %}
<div class="left_column">
<div id="picture">
<img id="avatar" src="{{ avatar.avatar.url }}" alt="Avatar"/>
Expand Down
9 changes: 1 addition & 8 deletions sample_project/templates/avatar/base.html
@@ -1,8 +1 @@
<html>
<head>
<title>{% block title %}django-crop{% endblock %}</title>
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
{% extends "base.html" %}
2 changes: 1 addition & 1 deletion sample_project/templates/avatar/change.html
@@ -1,7 +1,7 @@
{% extends "avatar/base.html" %}
{% load avatar_tags %}

{% block content %}
{% block body %}
<p>Your current avatar: </p>
{% avatar user %}
<a href="{% url avatar_crop_default %}">Crop</a>
Expand Down
7 changes: 5 additions & 2 deletions sample_project/templates/base.html
Expand Up @@ -22,12 +22,15 @@
width: 250px;
}
</style>
{% block extrahead %}
{% block extra_head %}
{% endblock %}
</head>
<body>
<div class="container">
{% block content %}
{% block body %}
{% endblock %}
<script type="text/javascript" src="/static/js/jquery-1.3.2.min.js"></script>
{% block extra_body %}
{% endblock %}
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion sample_project/templates/registration/login.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}

{% block content %}
{% block body %}

{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
Expand Down

0 comments on commit fb8f66f

Please sign in to comment.