Skip to content

Commit

Permalink
[GeoNode#7740] Use URL reversing: py files
Browse files Browse the repository at this point in the history
  • Loading branch information
etj committed Jul 9, 2021
1 parent 7d62c29 commit 437bb39
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions geonode/layers/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
from geonode.thumbs.thumbnails import create_thumbnail
from geonode.base.auth import get_or_create_token
from geonode.base.forms import CategoryForm, TKeywordForm, BatchPermissionsForm, ThesaurusAvailableForm
from geonode.base.views import batch_modify
from geonode.base.views import batch_modify, get_url_for_model
from geonode.base.models import (
Thesaurus,
TopicCategory)
Expand Down Expand Up @@ -1221,6 +1221,7 @@ def layer_change_poc(request, ids, template='layers/layer_change_poc.html'):
# Process the data in form.cleaned_data
# ...
# Redirect after POST
# Pls fix following url, it seems not bound
return HttpResponseRedirect('/admin/maps/layer')
else:
form = PocForm() # An unbound form
Expand Down Expand Up @@ -1694,7 +1695,7 @@ def batch_permissions(request, model):

if "cancel" in request.POST or not ids:
return HttpResponseRedirect(
f'/admin/{model.lower()}s/{model.lower()}/'
get_url_for_model(model)
)

if request.method == 'POST':
Expand Down Expand Up @@ -1729,7 +1730,7 @@ def batch_permissions(request, model):
except set_permissions.OperationalError as exc:
celery_logger.exception('Sending task raised: %r', exc)
return HttpResponseRedirect(
f'/admin/{model.lower()}s/{model.lower()}/'
get_url_for_model(model)
)
return render(
request,
Expand Down

0 comments on commit 437bb39

Please sign in to comment.