-
Notifications
You must be signed in to change notification settings - Fork 160
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
_ in both ApiBasketMiddleWare and translations? #333
Comments
j2l
changed the title
ugettext in both ApiBasketMiddleWare and translations?
_ in both ApiBasketMiddleWare and translations?
Feb 13, 2024
This has been fixed in 1e10a52 but not release yet. Is it release time? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
When I add the
"oscarapi.middleware.ApiBasketMiddleWare"
, I get the error:I'm using the sandbox with included settings.py:
As soon as I comment the middleware, it works again.
For now, I replace
_
withi_
:from django.utils.translation import gettext_lazy as i_
and subsequent calls in languages("en-us", i_("English")),...
. It seems to work.I'd love to know if there's a better fix.
Additionally, may I ask for an example of "fill your basket with the API and use plain Oscar views for checkout" as stated in the doc? https://django-oscar-api.readthedocs.io/en/stable/topics/outofthebox.html?highlight=basket#middleware-and-mixed-usage
In my case, the API is called by a browser on a different port.
Thank you!
The text was updated successfully, but these errors were encountered: