Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

history module is throwing error in enitty_base_nav.html #817

Closed
sennierer opened this issue May 8, 2024 · 6 comments
Closed

history module is throwing error in enitty_base_nav.html #817

sennierer opened this issue May 8, 2024 · 6 comments

Comments

@sennierer
Copy link
Collaborator

{% if object.history %}
<li class="nav-item">
<a class="nav-link
{% if request.path == object.get_history_url %}active{% endif %}
" style="color: #007bff" href="{{ object.get_history_url }}"><span class="material-symbols-outlined material-symbols-align">history</span>History</a>
</li>
{% endif %}

Error: History is not registered namespace

@b1rger
Copy link
Contributor

b1rger commented May 14, 2024

I can not reproduce this. @gythaogg I think you brought that up, can you give a bit more detail about the setup?

@gythaogg
Copy link
Contributor

@b1rger
If you don't have "apis_core.history" from the installed apps then I get this error from base.html in the entity detail page

image

@b1rger
Copy link
Contributor

b1rger commented May 15, 2024

If you don't have "apis_core.history" from the installed apps then I get this error from base.html in the entity detail page

but only if you have added VersionMixin to the entity, right?

With an entity inheriting from VersionMixin but without apis_core.history in the INSTALLED_APPS I get the same error, but not if I haven't added the VersionMixin anywhere

@gythaogg
Copy link
Contributor

Oops. That's fair.

@b1rger
Copy link
Contributor

b1rger commented May 27, 2024

So we can close this?

@gythaogg
Copy link
Contributor

Yes! Agree with you that if the models inherit from VersionMixin then apis_core.history should be in the INSTALLED_APPS for APIS to behave normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants