#22868: Activated language not respected in post_save signal called during
custom
management command
-------------------------------+--------------------
Reporter: stodge | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
This one is a little tricky to explain. My problem seems to be this:
* run custom management command
* activate language from settings, which is "en-gb"
* dynamically import module for a Django app and invoke custom bootstrap
function
* calling get_language() in bootstrap function returns "en-gb"
* bootstrap function calls loaddata management command (using
management.call_command)
* data created in DB, which triggers a post_save signal
* get_language() in post_save signal always returns "en-us"
I don't know if the signal is invoked in a separate thread but I would
expect get_language to return the newly activated language when called in
a post_save signal. Or am I missing something? Thanks
--
Ticket URL: <https://code.djangoproject.com/ticket/22868>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/049.ebb4cfadcaaf2de265fd32b8965acca1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.