Browse Source

convert {%url%} syntax for Django 1.5

Natenom/support-murmur-13-1446181288462
Michael Ziegler 11 years ago
parent
commit
d161b2c802
  1. 20
      pyweb/mumble/templates/mumble/mumble.html
  2. 16
      pyweb/templates/index.html

20
pyweb/mumble/templates/mumble/mumble.html

@ -14,7 +14,7 @@
background: transparent url({{ MUMBLE_MEDIA_PREFIX }}img/tab-scroller-menu.gif) no-repeat 0 0;
}
</style>
<script src="{% url django.views.i18n.javascript_catalog %}"></script>
<script src="{% url 'django.views.i18n.javascript_catalog' %}"></script>
<script src="{{ MUMBLE_DJANGO_URL }}mumble/api/api.js"></script>
<script src="{{ MUMBLE_DJANGO_URL }}mumble/forms/api.js"></script>
<script src="{{ MUMBLE_DJANGO_URL }}mumble/forms/choicescombo.js"></script>
@ -40,7 +40,7 @@
text: "{% trans "Back to the server list" %}",
xtype: "button",
handler: function(){
location.href = "{% url mumble.views.mumbles %}";
location.href = "{% url 'mumble.views.mumbles' %}";
}
} ],
buttons: [
@ -48,14 +48,14 @@
{
xtype: 'buttonIframeWindow',
text: "{% trans 'Edit Translation' %}",
url: '{% url rosetta-home %}'
url: '{% url "rosetta-home" %}'
},
{% endif %}
{% if user.is_staff %}
{
xtype: 'buttonIframeWindow',
text: "{% trans 'Administration' %}",
url: '{% url admin:mumble_mumble_change MumbleServer.id %}'
url: '{% url "admin:mumble_mumble_change" MumbleServer.id %}'
},
{% endif %}
{% if user.is_authenticated %}
@ -65,7 +65,7 @@
{
xtype: 'buttonIframeWindow',
text: "{% trans 'Register' %}",
url: '{% url registration.views.register %}'
url: '{% url "registration.views.register" %}'
},
{% endif %}
new Ext.ux.ButtonLogin()
@ -90,7 +90,7 @@
is_admin: {{ IsAdmin|lower }}
})
],
source_url: "{% url mumble.views.cvp_json MumbleServer.id %}",
source_url: "{% url 'mumble.views.cvp_json' MumbleServer.id %}",
imageurl: '{{MUMBLE_MEDIA_PREFIX}}/img',
listeners: {
moveUser: function( tree, userdata, chandata ){
@ -109,7 +109,7 @@
items: [{
title: "{% trans "Server info" %}",
{% if QRAvailable %}
html: ('<img src="{% url mumble.views.qrcode MumbleServer.id %}" ' +
html: ('<img src="{% url "mumble.views.qrcode" MumbleServer.id %}" ' +
'style="float: right" alt="QR Code for embedded view"/>' +
renderserverinfos( {{ ServerDict|safe }} ))
{% else %}
@ -196,7 +196,7 @@
height: 200,
title: "{% trans "Texture" %}",
html: String.format('<img src="{0}" alt="Avatar" id="img_avatar" />',
"{% url mumble.views.showTexture MumbleServer.id MumbleAccount.mumbleid %}")
"{% url 'mumble.views.showTexture' MumbleServer.id MumbleAccount.mumbleid %}")
}, {
flex: 1,
height: 200,
@ -208,7 +208,7 @@
xtype: "form",
labelWidth: 150,
fileUpload: true,
url: "{% url mumble.views.update_avatar MumbleAccount.id %}",
url: "{% url 'mumble.views.update_avatar' MumbleAccount.id %}",
items: [{
name: "usegravatar",
fieldLabel: "{% trans "Use Gravatar" %}",
@ -227,7 +227,7 @@
var now = new Date();
var img = Ext.fly("img_avatar");
img.dom.src = String.format("{0}?_dc={1}",
"{% url mumble.views.showTexture MumbleServer.id MumbleAccount.mumbleid %}",
"{% url 'mumble.views.showTexture' MumbleServer.id MumbleAccount.mumbleid %}",
now.getTime()
);
}

16
pyweb/templates/index.html

@ -30,33 +30,33 @@
<div id="headpanel">
<div id="headlinks">
{% if user.is_authenticated %}
<a href="{% url django.contrib.auth.views.logout %}">{% trans "Log out" %}</a> |
<a href="{% url 'django.contrib.auth.views.logout' %}">{% trans "Log out" %}</a> |
{% else %}
<a href="{% url django.contrib.auth.views.login %}">{% trans "Log in" %}</a> |
<a href="{% url 'django.contrib.auth.views.login' %}">{% trans "Log in" %}</a> |
{% endif %}
{% if user.is_staff %}
<a href="{% url admin:index %}" target="_blank">{% trans "Administration" %}</a> |
<a href="{% url 'admin:index' %}" target="_blank">{% trans "Administration" %}</a> |
{% if "rosetta" in INSTALLED_APPS %}
<a href="{% url rosetta.views.home %}" target="_blank">{% trans "Edit translations" %}</a> |
<a href="{% url 'rosetta.views.home' %}" target="_blank">{% trans "Edit translations" %}</a> |
{% endif %}
{% endif %}
<a href="{% url views.imprint %}">{% trans "Imprint" %}</a>
<a href="{% url 'views.imprint' %}">{% trans "Imprint" %}</a>
</div>
<h2>{% block Headline %}{% endblock %}</h2>
</div>
<!-- navi -->
<div id="navipanel">
<ul id="navilinks">
<li><a href="{% url mumble.views.redir %}">{% trans "Home" %}</a></li>
<li><a href="{% url 'mumble.views.redir' %}">{% trans "Home" %}</a></li>
{% if MumbleActive %}
<li><b>Mumble</b></li>
{% else %}
<li><a href="{% url mumble.views.mumbles %}">Mumble</a></li>
<li><a href="{% url 'mumble.views.mumbles' %}">Mumble</a></li>
{% endif %}
{% if ProfileActive %}
<li><b>Profile</b></li>
{% else %}
<li><a href="{% url views.profile %}">{% trans "Profile" %}</a></li>
<li><a href="{% url 'views.profile' %}">{% trans "Profile" %}</a></li>
{% endif %}
</ul>
</div>

Loading…
Cancel
Save