diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2014-01-16 19:03:39 +0000 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2014-01-16 19:04:10 +0000 |
| commit | 7535e9f4a4f5317a0073a8fde0eacf17ce31bac0 (patch) | |
| tree | 5b772ee239fc7d61705c7177de60413a50051db5 | |
| parent | 2a31d00933fd1d06ae3013f2c0eb8f4982fa7db6 (diff) | |
Fixed #21784: Correctly decode stdin input for migration defaults
| -rw-r--r-- | django/db/migrations/questioner.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/migrations/questioner.py b/django/db/migrations/questioner.py index 3c43c29c11..ae75b47d03 100644 --- a/django/db/migrations/questioner.py +++ b/django/db/migrations/questioner.py @@ -97,7 +97,7 @@ class InteractiveMigrationQuestioner(MigrationQuestioner): print("Please enter the default value now, as valid Python") print("The datetime module is available, so you can do e.g. datetime.date.today()") while True: - code = input(">>> ") + code = input(">>> ").decode(sys.stdin.encoding) if not code: print("Please enter some code, or 'exit' (with no quotes) to exit.") elif code == "exit": |
