Reverse admin urls

Welcome @moanos !

While I can’t verify everything here, I do see that:

is constructed incorrectly.

The org.id needs to be part of the url tag to pass as a parameter to the ‘change’ url.

Notice the difference in the location of the parameter between what you have above and the sample in the docs:
<a href="{% url opts|admin_urlname:'delete' user.pk %}">Delete this user</a>

Also, the models themselves do not have app_label and model_name attributes. They’re exposed in the _meta attribute of the model. This means you should use something like {% url org._meta|admin_urlname:'change' ...

1 Like