#25680: Feature request: support python manage.py shell -e 'run_some_code_as_django()' -------------------------------+-------------------------------------- Reporter: hakanw | Owner: nobody Type: New feature | Status: new Component: Uncategorized | Version: 1.8 Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+--------------------------------------
Comment (by adamchainz): Did you know? You can already do (at least in bash and zsh): {{{ python manage.py shell <<< 'do_something()' }}} This sends the string in on `stdin` which {{{shell}}} simply interprets the same as typed commands. However it should be noted you can't do this in some shells or from e.g. {{{subprocess.Popen}}} without {{{shell=True}}}. Also, if this does get implemented I'd suggest the {{{-c}}} flag to mirror {{{python -c}}}. -- Ticket URL: <https://code.djangoproject.com/ticket/25680#comment:3> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.398e8e4bc4364f5c3618964c4eea5393%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.