What is the error?
Also in your file tree you show your templates/accounts/login.py, you want
it to be .html to match to template name in the render.

Dylan

On Sat, Oct 14, 2017 at 2:49 AM, <[email protected]> wrote:

> my code that caused an error :
> ///
> from django.shortcuts import render
> from django.http import HttpResponse
> from django.template import loader
> # Create your views here.
>
> def home(request) :
>     return render(request,'login.html',context)
> ///
> above code is in my views.py of my app name "accounts"
> my project name "tutorial"
> All my directories are :
>
> tutorial->
>      accounts
>      tutorial
>      manage.py
> and accounts->
>             migrations
>             __pycache__
>             templates
>             admin.py
>             apps.py
>             __init__.py
>             models.py
>             tests.py
>             urls.py
>             views.py
>
> and templates->
>              accounts->
>                      login.py
>
> --
> 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/e74b849c-1757-43ca-9bea-e5820cc06f85%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e74b849c-1757-43ca-9bea-e5820cc06f85%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAHtg44DeZMFcSyHUzSju9C6%2B19AOrvpkdp-FHGY13xU-yjR%2BWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to