tangowithcode / tango_with_django_19

A beginners guide to web programming with Python / Django 1.9
Apache License 2.0
207 stars 188 forks source link

9.7 creating the login() view #34

Closed aisflat439 closed 8 years ago

aisflat439 commented 8 years ago

print statement for login details had syntax error. Again I'm not sure that this isn't my enviroment specific.

doing it the way I did below solves that issue print("Invalid login details: {0}, {1}".format(username, password))

maxwelld90 commented 8 years ago

Thanks for the spot! Yes, this should have parenthesis wrapped around like you have. In Python 2, print is a distinct keyword; in Python 3, it's just a regular function. Python 2 also supports the regular print() function, so it makes sense to wrap everything up in parentheses.

I'm going to add you to the acknowledgements page to thank you for your efforts! If you spot anything else, please let us know. Cheers!