Skip to content

Commit

Permalink
[Fixes #7740] Fix reverse urls
Browse files Browse the repository at this point in the history
Fix reverse urls for get_url_for_app_model and get_url_for_model methods
  • Loading branch information
mattiagiupponi authored Jul 12, 2021
1 parent f68276a commit f209b97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geonode/base/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@


def get_url_for_app_model(model, model_class):
return reverse(f'{model_class._meta.app_label}_{model}_changelist')
return reverse(f'admin:{model_class._meta.app_label}_{model}_changelist')
# was: return f'/admin/{model_class._meta.app_label}/{model}/'

def get_url_for_model(model):
return reverse(f'{model.lower()}s_{model.lower()}_changelist')
return reverse(f'admin:{model.lower()}s_{model.lower()}_changelist')
# was: f'/admin/{model.lower()}s/{model.lower()}/'

def user_and_group_permission(request, model):
Expand Down

0 comments on commit f209b97

Please sign in to comment.