Template Does Not Exist

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Template Does Not Exist

Naty Mina
,hi guys
finally i could run my project but when i'm trying to open the home page that built i get error template does not exist 
and when i look at the details i see that django.engine looked for the template when it''s not in.
the html file is in the same directory as the views and that's when i want django to look for it.
i need your help to fix that 
please
i attached files so you can see
THANK YOU

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%40googlegroups.com.

Capture.PNG (58K) Download Attachment
urls.py (159 bytes) Download Attachment
views.py (145 bytes) Download Attachment
index.html (132 bytes) Download Attachment
urls.py (824 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Template Does Not Exist

RONAK JAIN
Hey 

can you remove learning_logs in views.py?

please simply write inside view.py :


return render(request, 'index.html')

Maybe it will work for you.

Thanks




On Mon, Aug 19, 2019 at 4:17 PM Naty Mina <[hidden email]> wrote:
,hi guys
finally i could run my project but when i'm trying to open the home page that built i get error template does not exist 
and when i look at the details i see that django.engine looked for the template when it''s not in.
the html file is in the same directory as the views and that's when i want django to look for it.
i need your help to fix that 
please
i attached files so you can see
THANK YOU

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BAqMUeZQydrHn7AWES5G-B1V5LsteoTsthkg5WuB71osXfOjw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Template Does Not Exist

Naty Mina
no it did not work

Sent from Windows Mail

From: [hidden email]
Sent: ‎Monday‎, ‎August‎ ‎19‎, ‎2019 ‎1‎:‎59‎ ‎PM
To: [hidden email]

Hey 

can you remove learning_logs in views.py?

please simply write inside view.py :


return render(request, 'index.html')

Maybe it will work for you.

Thanks




On Mon, Aug 19, 2019 at 4:17 PM Naty Mina <[hidden email]> wrote:
,hi guys
finally i could run my project but when i'm trying to open the home page that built i get error template does not exist 
and when i look at the details i see that django.engine looked for the template when it''s not in.
the html file is in the same directory as the views and that's when i want django to look for it.
i need your help to fix that 
please
i attached files so you can see
THANK YOU

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BAqMUeZQydrHn7AWES5G-B1V5LsteoTsthkg5WuB71osXfOjw%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5d5a81c4.1c69fb81.83b62.f959%40mx.google.com.
Reply | Threaded
Open this post in threaded view
|

Re: Template Does Not Exist

Bhoopesh sisoudiya
Hey 
     Please put index.html file inside template folder and set "template" folder  DIR in setting.py file.

On Mon, Aug 19, 2019, 4:32 PM <[hidden email]> wrote:
no it did not work

Sent from Windows Mail

From: [hidden email]
Sent: ‎Monday‎, ‎August‎ ‎19‎, ‎2019 ‎1‎:‎59‎ ‎PM
To: [hidden email]

Hey 

can you remove learning_logs in views.py?

please simply write inside view.py :


return render(request, 'index.html')

Maybe it will work for you.

Thanks




On Mon, Aug 19, 2019 at 4:17 PM Naty Mina <[hidden email]> wrote:
,hi guys
finally i could run my project but when i'm trying to open the home page that built i get error template does not exist 
and when i look at the details i see that django.engine looked for the template when it''s not in.
the html file is in the same directory as the views and that's when i want django to look for it.
i need your help to fix that 
please
i attached files so you can see
THANK YOU

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BAqMUeZQydrHn7AWES5G-B1V5LsteoTsthkg5WuB71osXfOjw%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5d5a81c4.1c69fb81.83b62.f959%40mx.google.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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAk3c1MBzcRCv7t5hwCrDvcon4fivKM1BPrrFgWi1gsBpYeCLA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Template Does Not Exist

Bhoopesh sisoudiya
See in attachment 

On Mon, Aug 19, 2019, 5:33 PM Bhoopesh sisoudiya <[hidden email]> wrote:
Hey 
     Please put index.html file inside template folder and set "template" folder  DIR in setting.py file.

On Mon, Aug 19, 2019, 4:32 PM <[hidden email]> wrote:
no it did not work

Sent from Windows Mail

From: [hidden email]
Sent: ‎Monday‎, ‎August‎ ‎19‎, ‎2019 ‎1‎:‎59‎ ‎PM
To: [hidden email]

Hey 

can you remove learning_logs in views.py?

please simply write inside view.py :


return render(request, 'index.html')

Maybe it will work for you.

Thanks




On Mon, Aug 19, 2019 at 4:17 PM Naty Mina <[hidden email]> wrote:
,hi guys
finally i could run my project but when i'm trying to open the home page that built i get error template does not exist 
and when i look at the details i see that django.engine looked for the template when it''s not in.
the html file is in the same directory as the views and that's when i want django to look for it.
i need your help to fix that 
please
i attached files so you can see
THANK YOU

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BAqMUeZQydrHn7AWES5G-B1V5LsteoTsthkg5WuB71osXfOjw%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5d5a81c4.1c69fb81.83b62.f959%40mx.google.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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAk3c1NKUjV7raQNaqWgMgXv7Xf5xd%2BDCV2b475QAtNN%3DbQQMQ%40mail.gmail.com.

IMG_20190819_173534.jpg (6M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Template Does Not Exist

Naty Mina
yes, I did so and it worked
BTW I didn’t change any settings and it still worked.
but is there no way to set django to look for not just in templates folders? but the directory I want?
i’d like to know
thank you


From: [hidden email]
Sent: ‎Monday‎, ‎August‎ ‎19‎, ‎2019 ‎3‎:‎07‎ ‎PM
To: [hidden email]

See in attachment 

On Mon, Aug 19, 2019, 5:33 PM Bhoopesh sisoudiya <[hidden email]> wrote:
Hey 
     Please put index.html file inside template folder and set "template" folder  DIR in setting.py file.

On Mon, Aug 19, 2019, 4:32 PM <[hidden email]> wrote:
no it did not work

Sent from Windows Mail

From: [hidden email]
Sent: ‎Monday‎, ‎August‎ ‎19‎, ‎2019 ‎1‎:‎59‎ ‎PM
To: [hidden email]

Hey 

can you remove learning_logs in views.py?

please simply write inside view.py :


return render(request, 'index.html')

Maybe it will work for you.

Thanks




On Mon, Aug 19, 2019 at 4:17 PM Naty Mina <[hidden email]> wrote:
,hi guys
finally i could run my project but when i'm trying to open the home page that built i get error template does not exist 
and when i look at the details i see that django.engine looked for the template when it''s not in.
the html file is in the same directory as the views and that's when i want django to look for it.
i need your help to fix that 
please
i attached files so you can see
THANK YOU

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BAqMUeZQydrHn7AWES5G-B1V5LsteoTsthkg5WuB71osXfOjw%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5d5a81c4.1c69fb81.83b62.f959%40mx.google.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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAk3c1NKUjV7raQNaqWgMgXv7Xf5xd%2BDCV2b475QAtNN%3DbQQMQ%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5d5a9337.1c69fb81.bd279.0968%40mx.google.com.
Reply | Threaded
Open this post in threaded view
|

Re: Template Does Not Exist

Tosin Ayoola
In reply to this post by Naty Mina
D problem is either in ur settings.py file u didn't properly set ur template dir correctly (which u can do as follows in ur settings.py In the template setting section,  set d value of ur  DIR =[os.path.join(BASE_DIR, 'templates'] den create a templates folder either in ur app dir or project dir,  in the templates folder  📁 create another  folder 📁 with the name of your app,  then inside that folder create ur html file)  and make sure in your view u reference the html file as eg return render(request, 'app_name/index.html',  {'value_to_display_in_html_file': value_to_display_in_html_file}), that way 

On Aug 19, 2019 11:47, "Naty Mina" <[hidden email]> wrote:
,hi guys
finally i could run my project but when i'm trying to open the home page that built i get error template does not exist 
and when i look at the details i see that django.engine looked for the template when it''s not in.
the html file is in the same directory as the views and that's when i want django to look for it.
i need your help to fix that 
please
i attached files so you can see
THANK YOU

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHLKn706xaKMn3g3DgN49kK6kbCQNz7KNe_qCu8_J9B0ryFgfw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Template Does Not Exist

Naty Mina
Thank U


בתאריך יום שלישי, 20 באוגוסט 2019 בשעה 11:07:46 UTC+3, מאת Tosin Ayoola:
D problem is either in ur settings.py file u didn't properly set ur template dir correctly (which u can do as follows in ur settings.py In the template setting section,  set d value of ur  DIR =[os.path.join(BASE_DIR, 'templates'] den create a templates folder either in ur app dir or project dir,  in the templates folder  📁 create another  folder 📁 with the name of your app,  then inside that folder create ur html file)  and make sure in your view u reference the html file as eg return render(request, 'app_name/index.html',  {'value_to_display_in_html_file': value_to_display_in_html_file}), that way 

On Aug 19, 2019 11:47, "Naty Mina" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="OfkWf4p6AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">naty...@...> wrote:
,hi guys
finally i could run my project but when i'm trying to open the home page that built i get error template does not exist 
and when i look at the details i see that django.engine looked for the template when it''s not in.
the html file is in the same directory as the views and that's when i want django to look for it.
i need your help to fix that 
please
i attached files so you can see
THANK YOU

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="OfkWf4p6AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%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 to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c35d975d-9ffa-401d-83ec-4a13ab2ef89d%40googlegroups.com.