in your template folder -> account login.py to login .html .. if your html file is login.py
and you have to specify full path like
render(request,"accounts/login.html",context)
and you have to specify full path like
render(request,"accounts/login.html",context)
On Saturday, October 14, 2017 at 3:19:53 PM UTC+5:30, utpalbr...@gmail.com 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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/d7fae195-4f43-49ea-b23e-63c05bc3cfc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment