Jump to content

DTL Block and Extend Tags


Agrajag

Recommended Posts

Hello, I am very new here and am trying to create my first website.

I am trying to use Django Template Language (DTL) block and extend tags for my html to save time, which I discovered from this tutorial: https://www.tutorialspoint.com/django/django_template_system.

However, this does not work like I thought it would, and commands like {% extend "base.html"%} only show up as text on the website, instead of extending the desired file. Would anyone mind explaining to me how to make these DTL commands work, if there is a way to make them work. I am on the Johnny server, and my html files are attached. Both files are under public_html.

Thanks.  

 

base.html

 

index.html

 

 

Link to comment
Share on other sites

  • 2 weeks later...

I don't know too much about Django but I think you need to check your URL Mapping (url.py) and make sure you put those files (base.html, index.html) inside the mapped urls.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...