Browse Source

HUE-2436 [useradmin] Django-1.6: We no longer need to quote uses of `reverse` (which is used by `url)`

Erick Tryzelaar 10 years ago
parent
commit
77977437c3

+ 1 - 3
apps/useradmin/src/useradmin/templates/list_groups.mako

@@ -14,8 +14,6 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 <%!
-import urllib
-
 from desktop.views import commonheader, commonfooter
 from django.utils.translation import ugettext as _
 from useradmin.models import group_permissions
@@ -82,7 +80,7 @@ ${layout.menubar(section='groups')}
           <td>
             %if user.is_superuser:
               <strong><a title="${ _('Edit %(groupname)s') % dict(groupname=group.name) }"
-                         href="${ url('useradmin.views.edit_group', name=urllib.quote(group.name)) }"
+                         href="${ url('useradmin.views.edit_group', name=group.name) }"
                          data-row-selector="true">${group.name}</a></strong>
             %else:
               <strong>${group.name}</strong>

+ 1 - 2
apps/useradmin/src/useradmin/templates/list_permissions.mako

@@ -15,7 +15,6 @@
 ## limitations under the License.
 <%!
 from desktop.views import commonheader, commonfooter
-import urllib
 from django.utils.translation import ugettext as _
 from useradmin.models import group_permissions
 from django.contrib.auth.models import Group
@@ -51,7 +50,7 @@ ${layout.menubar(section='permissions')}
           <td>
             %if user.is_superuser:
               <strong><a title="${_('Edit permission')}"
-                         href="${ url('useradmin.views.edit_permission', app=urllib.quote(perm.app), priv=urllib.quote(perm.action)) }"
+                         href="${ url('useradmin.views.edit_permission', app=perm.app, priv=perm.action) }"
                          data-name="${perm.app}" data-row-selector="true">${perm.app}</a></strong>
             %else:
               <strong>${perm.app}</strong>

+ 1 - 2
apps/useradmin/src/useradmin/templates/list_users.mako

@@ -16,7 +16,6 @@
 <%!
 from desktop.views import commonheader, commonfooter
 from django.template.defaultfilters import date, time
-import urllib
 from django.utils.translation import ugettext as _
 %>
 
@@ -88,7 +87,7 @@ ${layout.menubar(section='users')}
           <td>
             %if user.is_superuser or user.username == listed_user.username:
               <strong><a title="${_('Edit %(username)s') % dict(username=listed_user.username)}"
-                         href="${ url('useradmin.views.edit_user', username=urllib.quote(listed_user.username)) }"
+                         href="${ url('useradmin.views.edit_user', username=listed_user.username) }"
                          data-row-selector="true">${listed_user.username}</a></strong>
             %else:
               <strong>${listed_user.username}</strong>