Move link conversions, consolidate FrontPageLink with new link class

This commit is contained in:
Roberto Rosario
2015-04-04 03:23:13 -04:00
parent 0e6fe91234
commit 39e8e26f87
17 changed files with 141 additions and 154 deletions

View File

@@ -185,6 +185,11 @@ class Link(object):
current_path = request.META['PATH_INFO']
current_view = resolve(current_path).view_name
# Preserve unicode data in URL query
previous_path = smart_unicode(urllib.unquote_plus(smart_str(request.get_full_path()) or smart_str(request.META.get('HTTP_REFERER', reverse('main:home')))))
query_string = urlparse.urlparse(previous_path).query
parsed_query_string = urlparse.parse_qs(query_string)
if self.permissions:
try:
Permission.objects.check_permissions(request.user, self.permissions)