Thursday, October 3, 2019

Re: TemplateDoesNotExist

Hi,

Add new folder with the application name under the template folder i.e "testapp/templates/testapp"
And move your template files into new folder,
Then, when you call the template:
If the template in the same place of the view.py (application space) call it without the full path i.e "base.html"

If you want to call it from another application call it with application name prefix i.e "testapp/base.html"

Don't forget to configure settings.py.


Warmest Regards,
Ehab

From: django-users@googlegroups.com on behalf of yerri swamy <dussayerriswami@gmail.com>
Sent: Thursday, October 3, 2019 9:18 AM
To: django-users@googlegroups.com
Subject: Re: TemplateDoesNotExist
 
I tried like this
testapp>template>base.html
but also its showing same issue please help me anyone..
views.py
  1. from django.shortcuts import render

  2. # Create your views here.
  3. def hello_world(request):
  4. 	
  1. 	return render(request,'testapp/template/base.html',{})

On Wed, Sep 25, 2019 at 11:34 AM Desh Deepak <deshdeepakxpm@gmail.com> wrote:
Create template folder inside testapp.

Like this:
testapp>template>base.html



On Wed, 25 Sep 2019, 10:47 yerri swamy, <dussayerriswami@gmail.com> wrote:


On Mon, Sep 23, 2019 at 6:53 PM Desh Deepak <deshdeepakxpm@gmail.com> wrote:
Show me your views.py file.

On Mon, 23 Sep 2019, 18:48 Abu Yusuf, <yusuf@binate-solutions.com> wrote:
1. ensure you have a folder templates inside static folder
2. ensure you filled up templates_dir: 'templates'
3. ensure 'base.html' exists inside templates folder

On Mon, Sep 23, 2019 at 6:40 PM yerri swamy <dussayerriswami@gmail.com> wrote:
Hi guys,
     
        By using templates folder i am not getting what i am expecting and i am getting error 'Template Does Not Exist' ,and also defaulty it's not coming templates variable in settings.py file,How do i slove this error please explain me any one.  

--
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 todjango-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/208e411a-a8f5-4238-b846-f086826f2ff4%40googlegroups.com.

--
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 todjango-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACNsr29mvap_G4%2Bc70NrkDZEQvPye%3D22caxfBvdUvMt_b7kXqQ%40mail.gmail.com.

--
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 todjango-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJ0m4xiPWfJ%3Dt-CjkDL81F7wn5ETmcBRacMyBi5n0zpO0C%3DUQg%40mail.gmail.com.

--
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 todjango-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKMSwL-OH3MOgjE5YDwVtsH-2xPv5oNxvuWHna8MZYUXS0iR0A%40mail.gmail.com.

--
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 todjango-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJ0m4xhvoPjpgJXQKk61oG4rfnVRnUwLCX1CgYH%3DGdze8BGAfw%40mail.gmail.com.

--
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 todjango-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKMSwL-WqaCjmAvqX23kcWT%2BrCv6b25PjQxq-9AKjPkYNOVm2g%40mail.gmail.com.

No comments:

Post a Comment