I'll rewrite it and ask you a question

Asked 2 years ago, Updated 2 years ago, 62 views

I'm using django now and I'm going to divide frameset in HTml. But it's not even written in HTML code. Please check. It's also divided into views.

It's divided by urls.

The purpose of the screen.

Current HTML code and current screen

It doesn't come out when the screen is set to frameset. I'd appreciate it if you let me know if you know.

django

2022-09-22 21:43

1 Answers

I think I misrepresented you in the last reply . Even if you put it in the frame of the frame set like that, home and lookup cannot be called.

I think it would be good to use template inheritance for the function you mentioned above. I'm going to make this template. Save the file name as main.html.

<head>
<style>
div{
  border: 1px solid blue;
}
.split{
  display: flex;
  height: 100vh;
}
.left{
   flex: 0 0 100px;
}

</style>
</head>
<body>
<div class="split">
  <div class="left">
  <!-- Organize the menu here. -->
  </div>
  <div class="right">
  {% {% block content %}{% endblock %}
  </div>
</div>
</body>

And in as.html, put the contents in the block content below.

{% extends "layout.html" %}

{% {% block content %}
  <!-- Organize the contents of the as screen here. -->
{% {% endblock %}

Configure lookup.html as above.

If you do this, it's not the way to get menu.html and lookup.html from main.html. It is implemented by loading the main.html from as.html, leaving only the path (urls.py) and views.py of as.html.

For more information on template inheritance, see here .


2022-09-22 21:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.