###前提・実現したいこと
ドリルダウンが特定のURLでしか動かない。
localhost8000/account/index ではドリルダウンが動くのに、
他のURL(localhost8000/account/detail・localhost8000/account/profile )では動かない。
###発生している問題・エラーメッセージ
特に問題は発生していない。
###該当のソースコード
header.htmlには
<html lang="ja"> <head> <meta charset="UTF-8"> <title>WEB SITE</title> </head> <body class="relative"> <h1 class="title">WEB SITE</h1> <div class="collapse navbar-collapse head_content" id="navbarNavDropdown"> <ul class="navbar-nav top-menu"> <li class="nav-item top-menu-item"> <a class="nav-link icon_head" href="profile">PROFILE</a> </li> <li class="nav-item dropdown top-menu-item"> <a class="nav-link dropdown-toggle icon_head" href="" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> SEE </a> <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> <div class="dropdown-content"> <a class="dropdown-item" href="new_see">NEWSEE</a> </div> <div class="dropdown-content"> <a class="dropdown-item" href="past_see">PASTSEE</a> </div> </div> </i> </li> <li class="nav-item top-menu-item"> <a class="nav-link icon_head" href="know">KNOW</a> </li> </ul> </div> <a class="logout_button" href="logout_view">LOGOUT</a> </body> </html>
と書き、
index.htmlには
<html lang="ja"> <head> <meta charset="UTF-8"> <script src="https://code.jquery.com/jquery-1.11.0.min.js"></script> <link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <link rel="stylesheet" href="index.css"> <link rel="stylesheet" href="{% static 'bootflat/css/bootflat.min.css' %}"> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <title>WEB SITE</title> </head> <body class="relative"> {% include '../header.html' %} <main> <div class="col-xs-4 float-right"> {% for advertisement in advertisements.all %} <div class="advertisement"> <div class="flex-item">{{ advertisement.image|safe }}</div> </div> {% endfor %} </div> </div> </main> </body> </html>
と書き、
profile.htmlには
<html lang="ja"> <head> <meta charset="utf-8"> <link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet"> <link rel="stylesheet" href="profile.css"> <link rel="stylesheet" href="{% static 'bootflat/css/bootflat.min.css' %}"> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <script src="https://code.jquery.com/jquery-1.11.0.min.js"></script> </head> <body class="relative"> {% include '../header.html' %} <main> <h1>Hello World</h1> </main> <footer> <div class="footers"> <p>xoxo</P> </div> </footer> </body> </html>
と書いた。
###試したこと
なぜ同じheader.htmlを継承しているのに、ドリルダウンが動くファイルと動かないファイルがあるのかが分からない。だから検証のしようがない。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。