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

django.gettext and django.jQuery is not a function #44

Open
Enzodtz opened this issue Jul 12, 2022 · 2 comments
Open

django.gettext and django.jQuery is not a function #44

Enzodtz opened this issue Jul 12, 2022 · 2 comments

Comments

@Enzodtz
Copy link

Enzodtz commented Jul 12, 2022

Hi, I've just installed jet-reboot and dashboard, but I'm having these erros on the console.

django.jQuery is not a function is happening under the dashboard index page.
django.gettext is not a function is happening under adding model page.

I couldn't find a way to fix this in the repo.

Thanks

@kholioeg
Copy link
Contributor

kholioeg commented Jul 19, 2022

You may need to initialize jquery and jquery init files for django on jet/templates/admin/base.html before line 31:

<script src="{% static 'admin/js/vendor/jquery/jquery.min.js' %}"></script>
<script src="{% static 'admin/js/jquery.init.js' %}"></script>

@PabloCSScobar
Copy link

I created a workaround and get rid of django.gettext is not a function error by extending admin/base.html and adding script:

{% extends 'admin/base.html' %} {% block footer %}
<script>
  django.gettext = window.gettext;
</script>
{% endblock %}

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