Jump to content

Recommended Posts

Posted

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

 

 

  • 2 weeks later...
Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...