Permalink
Browse files

Updated all template url tags from view names to url names

  • Loading branch information...
matthewhanson committed May 4, 2012
1 parent b1e1f63 commit ad5409735fb1d41fdfc19e080c6da07910e0c834
@@ -12,7 +12,7 @@
function update() {
Ext.Ajax.request({
- url : "{% url geonode.maps.views.check_download %}",
+ url : "{% url maps_download_check %}",
method: "GET",
success: function(result) {
process = Ext.util.JSON.decode(result.responseText);
@@ -77,7 +77,7 @@
Ext.get(Ext.DomQuery.select("select[@name='default-style']")).on("change", function(evt, elem) {
Ext.Ajax.request({
method: "post",
- url: "{% url layer_style layer.typename %}",
+ url: "{% url data_style layer.typename %}",
params: {"defaultStyle" : elem.value}
});
});
@@ -92,7 +92,7 @@
{% if can_change_permissions %}
new GeoNode.PermissionsEditor({
renderTo: "permissions_form",
- userLookup: "{% url geonode.views.ajax_lookup %}",
+ userLookup: "{% url auth_ajax_lookup %}",
permissions: {{ permissions_json }},
levels: {
'admin': 'layer_admin',
@@ -102,7 +102,7 @@
},
listeners: {
updated: function(perms) {
- var submitTo = "{% url geonode.maps.views.ajax_layer_permissions layer.typename %}";
+ var submitTo = "{% url data_ajax_perm layer.typename %}";
Ext.Ajax.request({ url: submitTo, jsonData: perms.writePermissions() });
}
}
@@ -277,10 +277,10 @@ <h3> {% trans "Manage" %} </h3>
<ul>
{% if user.is_authenticated %}
{% if can_change %}
- <li> <a href="{% url layer_metadata layer.typename %}">
+ <li> <a href="{% url data_metadata layer.typename %}">
{% trans "Update the description of this data" %}
</a> </li>
- <li> <a href="{% url layer_replace layer.typename %}">
+ <li> <a href="{% url data_replace layer.typename %}">
{% trans "Upload a new version of this data" %}
</a></li>
{% endif %}
@@ -290,7 +290,7 @@ <h3> {% trans "Manage" %} </h3>
</a></li>
{% endif %}
{% if can_delete %}
- <li><a href="{% url layer_remove layer.typename %}">
+ <li><a href="{% url data_remove layer.typename %}">
{% trans "Remove" %}
</a></li>
{% endif %}
@@ -10,7 +10,7 @@
{% block main %}
<div class="twocol">
<h2> {% trans "Editing details for " %} {{ layer.typename }} </h2>
- <form action="{% url layer_metadata layer.typename %}" method="POST">
+ <form action="{% url data_metadata layer.typename %}" method="POST">
{% csrf_token %}
<ul class="form">
{{ layer_form.as_ul }}
@@ -25,7 +25,7 @@
<script type="text/javascript">
Ext.onReady(function(){
{% autoescape off %}
- var form_target = "{% url layer_replace layer.typename %}";
+ var form_target = "{% url data_replace layer.typename %}";
var layer_name = "{{ layer.name|escapejs }}";
var is_featuretype = {% if is_featuretype %}true{% else %}false{% endif %};
@@ -203,7 +203,7 @@ <h2>{% trans "Add data" %}</h2>
var permissionsEditor = new GeoNode.PermissionsEditor({
renderTo: "permissions_form",
- userLookup: "{% url geonode.views.ajax_lookup %}",
+ userLookup: "{% url auth_ajax_lookup %}",
listeners: {
updated: function(pe) {
permissionsField.setValue(Ext.util.JSON.encode(pe.writePermissions()));
@@ -33,11 +33,11 @@
'_none': '_none'
},
renderTo: "permissions_form",
- userLookup: "{% url geonode.views.ajax_lookup %}",
+ userLookup: "{% url auth_ajax_lookup %}",
permissions: {{ permissions_json }},
listeners: {
updated: function(perms) {
- var submitTo = "{% url geonode.maps.views.ajax_map_permissions map.id %}";
+ var submitTo = "{% url maps_ajax_perm map.id %}";
Ext.Ajax.request({ url: submitTo, jsonData: perms.writePermissions() });
}
}
@@ -61,7 +61,7 @@ <h3>{{map.title}}</h3>
{% block sidebar %}
<div id="sidebar" class="threecol">
<h3>{% trans "Download" %}</h3>
- <p><a href="{% url geonode.maps.views.map_download map.id %}">{% trans "Download all layers included in this map" %}</a></p>
+ <p><a href="{% url maps_download map.id %}">{% trans "Download all layers included in this map" %}</a></p>
<h3>{% trans "Layers" %}</h3>
<p>{% trans "This map uses the following layers" %} </p>
<ul>
@@ -76,15 +76,15 @@ <h3>{% trans "Manage" %}</h3>
{% has_obj_perm user map "maps.change_map" as can_change %}
{% has_obj_perm user map "maps.delete_map" as can_delete %}
- <li><a href="{% url geonode.maps.views.view map.id %}">{% trans "View or edit this map" %}</a></li>
+ <li><a href="{% url maps_view map.id %}">{% trans "View or edit this map" %}</a></li>
{% if can_change %}
- <li><a href="{% url geonode.maps.views.map_controller map.id %}?describe">{% trans "Edit metadata" %}</a></li>
+ <li><a href="{% url maps_controller map.id %}?describe">{% trans "Edit metadata" %}</a></li>
{% endif %}
{% if can_change_permissions %}
<li><a href="{% url edit_map_permissions map.id %}">{% trans "Edit permissions" %}</a></li>
{% endif %}
{% if can_delete %}
- <li><a href="{% url geonode.maps.views.map_controller map.id %}?remove">{% trans "Delete map" %}</a></li>
+ <li><a href="{% url maps_controller map.id %}?remove">{% trans "Delete map" %}</a></li>
{% endif %}
<li><a href="{% url maps_new %}?copy={{map.id}}">{% trans "Duplicate map" %}</a></li>
</ul>
@@ -17,7 +17,7 @@ <h3>{% trans "Actions" %}</h3>
<li><a href="{% url auth_password_change %}">{% trans "Change password" %}</a></li>
{% endif %}
<li><a href="{% url data_upload %}">{% trans "Upload new data" %}</a></li>
- <li><a href="{% url map_new %}">{% trans "Create a new map" %}</a></li>
+ <li><a href="{% url maps_new %}">{% trans "Create a new map" %}</a></li>
</ul>
<h3>{% trans "Settings" %}</h3>
<ul>
@@ -166,7 +166,7 @@ <h2> {% trans "Maps & Data" %} </h2>
handler: function() {
var activeList = serialize();
var editor = new GeoNode.PermissionsEditor({
- userLookup: "{% url geonode.views.ajax_lookup %}",
+ userLookup: "{% url auth_ajax_lookup %}",
permissions: { users:[] }
});
editor.container.padding = 5;
@@ -7,13 +7,13 @@ <h2>GeoNode Login</h2>
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
- <form method="post" action="{% url django.contrib.auth.views.login %}">
+ <form method="post" action="{% url auth_login %}">
{% csrf_token %}
<ul class="form">
{{ form.as_ul }}
<li><input type="hidden" name="next" value="{{next}}" /></li>
<li><input type="submit" value="Login"/></li>
- <li><a href="{% url django.contrib.auth.views.password_reset %}">Forgot password?</a></li>
+ <li><a href="{% url auth_password_reset %}">Forgot password?</a></li>
</ul>
</form>
</div>
@@ -21,9 +21,9 @@
var searchTable = new GeoNode.SearchTable({
renderTo: 'search_results',
trackSelection: true,
- permalinkURL: '{% url search %}',
- searchURL: '{% url search_api %}',
- layerDetailURL: '{% url search_result_detail %}',
+ permalinkURL: '{% url data_search %}',
+ searchURL: '{% url data_search_api %}',
+ layerDetailURL: '{% url data_search_detail %}',
constraints: [bbox],
searchParams: {{init_search}}
});
@@ -38,7 +38,7 @@
cart: dataCart,
renderTo: 'data_ops',
- begin_download_url: '{% url geonode.maps.views.batch_layer_download %}',
+ begin_download_url: '{% url data_download %}',
stop_download_url: '{{site}}geoserver/rest/process/batchDownload/kill/',
download_url: '{{site}}geoserver/rest/process/batchDownload/download/'
});
@@ -31,8 +31,8 @@
(r'^data/', include(geonode.maps.urls.datapatterns)),
# Accounts
- (r'^accounts/ajax_login$', 'geonode.views.ajax_login'),
- (r'^accounts/ajax_lookup$', 'geonode.views.ajax_lookup'),
+ url(r'^accounts/ajax_login$', 'geonode.views.ajax_login', name='auth_ajax_login'),
+ url(r'^accounts/ajax_lookup$', 'geonode.views.ajax_lookup', name='auth_ajax_lookup'),
(r'^accounts/', include('registration.urls')),
(r'^profiles/', include('profiles.urls')),
(r'^avatar/', include('avatar.urls')),

0 comments on commit ad54097

Please sign in to comment.