My code : I am following tutorial on Django site and this is where I got stuck <https://lh3.googleusercontent.com/-4kF2Od8XM64/WQUIyjnP_YI/AAAAAAAA2-s/2kGkTbViOjI5UA-UxqrYZrBjx1SElQOyQCLcB/s1600/code.png> <https://lh3.googleusercontent.com/-4kF2Od8XM64/WQUIyjnP_YI/AAAAAAAA2-s/2kGkTbViOjI5UA-UxqrYZrBjx1SElQOyQCLcB/s1600/code.png> "current_datetime" I am not sure why I get the Type Error at line 20. Its same as tutorial.
<https://lh3.googleusercontent.com/-4kF2Od8XM64/WQUIyjnP_YI/AAAAAAAA2-s/2kGkTbViOjI5UA-UxqrYZrBjx1SElQOyQCLcB/s1600/code.png> <https://lh3.googleusercontent.com/-4kF2Od8XM64/WQUIyjnP_YI/AAAAAAAA2-s/2kGkTbViOjI5UA-UxqrYZrBjx1SElQOyQCLcB/s1600/code.png>When I run the server, I get the following error : <https://lh3.googleusercontent.com/-4kF2Od8XM64/WQUIyjnP_YI/AAAAAAAA2-s/2kGkTbViOjI5UA-UxqrYZrBjx1SElQOyQCLcB/s1600/code.png> <https://lh3.googleusercontent.com/-4kF2Od8XM64/WQUIyjnP_YI/AAAAAAAA2-s/2kGkTbViOjI5UA-UxqrYZrBjx1SElQOyQCLcB/s1600/code.png> TypeError at /time/ context must be a dict rather than Context. Request Method: GET Request URL: http://127.0.0.1:8000/time/ Django Version: 1.11 Exception Type: TypeError Exception Value: context must be a dict rather than Context. Exception Location: D:\Users\Pubudu\AppData\Local\Programs\Python\Python36\lib\site-packages\django\template\context.py in make_context, line 287 Python Executable: D:\Users\Pubudu\AppData\Local\Programs\Python\Python36\python.exe Python Version: 3.6.1 Python Path: ['C:\\Users\\Pubudu\\workspace\\hello', 'D:\\Users\\Pubudu\\AppData\\Local\\Programs\\Python\\Python36\\python36.zip', 'D:\\Users\\Pubudu\\AppData\\Local\\Programs\\Python\\Python36\\DLLs', 'D:\\Users\\Pubudu\\AppData\\Local\\Programs\\Python\\Python36\\lib', 'D:\\Users\\Pubudu\\AppData\\Local\\Programs\\Python\\Python36', 'D:\\Users\\Pubudu\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages'] Server time: Sat, 29 Apr 2017 21:35:31 +0000 Traceback Switch to copy-and-paste view <http://127.0.0.1:8000/time/#> - D:\Users\Pubudu\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\handlers\exception.py in inner 1. response = get_response(request) ... ▶ Local vars <http://127.0.0.1:8000/time/#> - D:\Users\Pubudu\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\handlers\base.py in _get_response 1. response = self.process_exception_by_middleware(e, request) ... ▶ Local vars <http://127.0.0.1:8000/time/#> - D:\Users\Pubudu\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\handlers\base.py in _get_response 1. response = wrapped_callback(request, *callback_args, **callback_kwargs) <https://lh3.googleusercontent.com/-4kF2Od8XM64/WQUIyjnP_YI/AAAAAAAA2-s/2kGkTbViOjI5UA-UxqrYZrBjx1SElQOyQCLcB/s1600/code.png> <https://lh3.googleusercontent.com/-4kF2Od8XM64/WQUIyjnP_YI/AAAAAAAA2-s/2kGkTbViOjI5UA-UxqrYZrBjx1SElQOyQCLcB/s1600/code.png> -- You received this message because you are subscribed to the Google Groups "Django users" 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]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/13acc1ea-9461-45a1-96bc-a266e5e3f0a7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

