I have been trying to use the Django template inheritance feature for my project Since I've added {% block content %}s I am now getting a server error 500 whenever I try to run the child template. The base template runs fine. I am quite sure it has something to do with the content blocks, but I'm not sure why as I don't repeat any names of blocks and everything on the child template is contained within a block. The console says two errors:
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Code goes like this:
Base.html
<!DOCTYPE html>
<style>
'My style'
</style>
<html lang='en'>
<head>
<meta charset='UTF-8'
{% block title %}
webpage
{% endblock %}
<script>'Jquery reference'</script>
</head>
{% block script %}
'empty'
{% endblock %}
<body>
<div id='navbar'>
'My navbar'
</div>
<div id='main_content_block'>
{% block content %}
<h1>This is my base</h1>
{% endblock %}
</div>
</body>
</html>
Home.html
{% extends 'main/base.html' %}
{% block title %}
<title>Home</title>
{% endblock %}
{% block script %}
'My javascript'
{% endblock %}
{% block content %}
'My content'
{% endblock %}
Thanks for your time
Django couldn't find base.html and including the absolute path instead of the relative fixed it.