Skip to content

Commit d513ef7

Browse files
authored
Merge pull request tobami#267 from tobami/use-newer-middleware-settings
Use newer middleware settings
2 parents 079824c + 752e9d1 commit d513ef7

7 files changed

Lines changed: 11 additions & 16 deletions

File tree

codespeed/templates/codespeed/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ <h2>{% block page_title %}SPEED CENTER{% endblock page_title %}</h2>
5151

5252
<script type="text/javascript" src="{% static 'js/jquery-1.12.3.min.js' %}"></script>
5353
<script type="text/javascript" src="{% static 'js/codespeed.js' %}"></script>
54-
{% block extra_body %}{% endblock %}
54+
{% block extra_script %}{% endblock %}
5555
</body>
5656
</html>

codespeed/templates/codespeed/changes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
</div>
6666
{% endblock %}
6767

68-
{% block extra_body %}
68+
{% block extra_script %}
6969
{{ block.super }}
7070
<script type="text/javascript" src="{% static 'js/jquery.tablesorter.min.js' %}"></script>
7171
<script type="text/javascript" src="{% static 'js/changes.js' %}"></script>

codespeed/templates/codespeed/comparison.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
</div>
8181
{% endblock %}
8282

83-
{% block extra_body %}
83+
{% block extra_script %}
8484
{{ block.super }}
8585
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="{% static 'js/jqplot/excanvas.min.js' %}"></script><![endif]-->
8686
<script type="text/javascript" src="{% static 'js/jqplot/jquery.jqplot.min.js' %}"></script>

codespeed/templates/codespeed/timeline.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
</div>
107107
{% endblock %}
108108

109-
{% block extra_body %}
109+
{% block extra_script %}
110110
{{ block.super }}
111111
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="{% static 'js/jqplot/excanvas.min.js' %}"></script><![endif]-->
112112
<script type="text/javascript" src="{% static 'js/jquery.address-1.6.min.js' %}?autoUpdate=0"></script>

codespeed/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ def changes(request):
678678
for proj in Project.objects.filter(track=True):
679679
executables[proj] = Executable.objects.filter(project=proj)
680680
projectlist.append(proj)
681-
branch = Branch.objects.filter(name=proj.default_branch, project=proj)
681+
branch = Branch.objects.get(name=proj.default_branch, project=proj)
682682
revisionlists[proj.name] = list(Revision.objects.filter(
683683
branch=branch
684684
).order_by('-date')[:revlimit])

sample_project/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
SECRET_KEY = 'as%n_m#)^vee2pe91^^@c))sl7^c6t-9r8n)_69%)2yt+(la2&'
4040

4141

42-
MIDDLEWARE_CLASSES = (
42+
MIDDLEWARE = (
4343
'django.middleware.common.CommonMiddleware',
4444
'django.contrib.sessions.middleware.SessionMiddleware',
4545
'django.middleware.csrf.CsrfViewMiddleware',

sample_project/templates/home.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,14 @@ <h2>Comparison</h2>
2828
</div>
2929
{% endblock body %}
3030

31-
{% block extra_body %}
31+
{% block extra_script %}
3232
{{ block.super }}
3333
<script type="text/javascript">
34-
function permalinkToChanges(permalink) {
35-
window.location=permalink;
36-
}
37-
38-
function updateTable() {
34+
function updateReportTables() {
3935
//Add permalink events to table rows
4036
$("div#reports table tbody tr").each(function() {
4137
$(this).click(function () {
42-
permalink_string = $(this).find("td:eq(0) label").text();
43-
permalinkToChanges(permalink_string);
38+
window.location = $(this).find("td:eq(0) label").text();
4439
});
4540
});
4641
//Add hover effect to rows
@@ -53,7 +48,7 @@ <h2>Comparison</h2>
5348

5449
$(function() {
5550
$("#reports").html(getLoadText("Loading...", 0))
56-
.load("{% url "reports" %}", function(responseText) { updateTable(); });
57-
});
51+
.load("{% url "reports" %}", function(responseText) { updateReportTables(); });
52+
});
5853
</script>
5954
{% endblock %}

0 commit comments

Comments
 (0)