Sunday, September 29, 2019

Re: calling index.html

1.GO to views.py and the index function 
2.def index(request):
       return render(request, 'index.html')
3.goto ur urls.py and write following

path(' ', name of your view.index, name = 'home' )

THis how u can render any page to browser as ur home page .
you need to import render in ur views file ...... check google how to import render.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAE%3DgcjNNbD-td%3DYkSKfYx4mpPENe2RpOFYkaAa9PSbrkZ1bzQA%40mail.gmail.com.

No comments:

Post a Comment