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 1.8 / Python 3.3/3.4 Uncaught ReferenceError: pgettext is not defined #47
Comments
Works for me with Django 1.8, though I've not tested with Python 3 (though that should be irrelevant, since the issue is with the JavaScript rather than the Python). Are you sure that you're seeing the |
Did you ever manage to figure this out @brechmos? |
Sorry, I was away on vacation this past week. I found a small hack to get On Fri, Jul 24, 2015 at 3:44 PM, Dominic Rodger notifications@github.com
Craig Jones |
@brechmos would you mind sharing your hack? I'm getting the same issue using Python 2.7.6 running django 1.7.3 and recurrence 1.2.0. I also set up i18n preferences to see if that would get me past the missing requirement with no luck. I'm manually including recurrence.css, recurrence.js, and recurrence-widget.js in an extrastyle block in one of my templates in that order. Here are my requirements if it's of any help:
|
So you also need to include the |
@dominicrodger I have some other fields which need specific DOM elements wrapped around them in the form field for a library's sake. I included the |
@Lythimus - are you actually including the jsi18n JavaScript in your HTML? The missing |
I wasn't manually including the jsi18n file. I wasn't sure if you meant danabr's implementation of jsI18n or Ted or if it mattered, but regardless, my preference remained installing without requiring internationalization. So I threw the following in my template before pulling in
I should probably not I wasn't passing any arguments into the template rendering of the form view other than for DOM rendering: Thanks for the assistance @dominicrodger. |
I actually ended up doing what @Lythimus did too. I hate to ask such a stupid question, though, how do you include the jsi18n in there? I tried the "Set up Internationalization" in the Installation docs, but it didn't seem to do anything for me. I was still getting the pgettext problem. |
If you're using a form with a @Lythimus - when you say "when django-recurrence internationalization detection As far as I can tell, all you have to do for django-recurrence is either:
Both of those options require using |
I revised the docs and created a pull request to better reflect the current state of the package. Configuring internationalization is not something we should suggest users to 'skip' as it throws an exception in the browser and breaks the form. |
I have same problem using Python 3.8, django-recurrence 1.10.3, Django version 3.0.8. It works in the admin page, but does not work when viewing the regular form. I get the error:
Tested with both Firefox and Safari. I have followed the guide and added the JavaScript catalog to the urls.py of the project. I have added I have tried with both Following the solution in #153 solved the issue for me, perhaps the documentation should be update to reflect this. |
I recently moved over to django 1.8 and Python3. I completely understand that this is experimental for Python 3 and is valid for up to Django 1.7 but I am having an issue.
I continue to get Uncaught ReferenceError: pgettext is not defined. I tried following the instructions:
but I am still getting errors. I am not sure if the errors are "expected" with Django 1.8 or if I might be just doing something wrong.
The error is at:
though is probably not too surprising. :-)
Any ideas would be appreciated.
The text was updated successfully, but these errors were encountered: