Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #21784: Correctly decode stdin input for migration defaults

  • Loading branch information...
commit 7535e9f4a4f5317a0073a8fde0eacf17ce31bac0 1 parent 2a31d00
Andrew Godwin andrewgodwin authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/migrations/questioner.py
2  django/db/migrations/questioner.py
View
@@ -97,7 +97,7 @@ def ask_not_null_addition(self, field_name, model_name):
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":
Please sign in to comment.
Something went wrong with that request. Please try again.