Honesty20

Bootstrap_not_working

May 17th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. {% load static %}
  2.  
  3. <!doctype html>
  4. <html lang="en">
  5. <head>
  6. <!-- Required meta tags -->
  7. <meta charset="utf-8">
  8. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  9. <!-- Bootstrap CSS -->
  10. <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
  11.  
  12.  
  13. <title>{% block title %}Newspaper App{% endblock title %}</title>
  14. </head>
  15. <body>
  16. <nav class="navbar navbar-expand-md navbar-dark bg-dark mb-">
  17. <a class="navbar-brand" href="{% url 'home' %}">Developers</a>
  18. <button class="navbar-toggler" type="button" data-toggle="collapse"
  19. data-target="#navbarCollapse" aria-controls="navbarCollapse"
  20. aria-expanded="false" aria-label="Toggle navigation">
  21. <span class="navbar-toggler-icon"></span>
  22. </button>
  23. <div class="collapse navbar-collapse" id="navbarCollapse">
  24. {% if user.is_authenticated %}
  25. <ul class="navbar-nav ml-auto">
  26. <li class="nav-item">
  27. <a class="nav-link dropdown-toggle" data-toggle="dropdown "href="#" id="userMenu"
  28. aria-expanded="false">
  29. {{ user.username }}
  30. </a>
  31. <div class="dropdown-menu dropdown-menu-right"
  32. aria-labelledby="userMenu">
  33. <a class="dropdown-item"
  34. href="{% url 'password_change'%}">Change password</a>
  35. <div class="dropdown-divider"></div>
  36. <a class="dropdown-item" href="{% url 'logout' %}">
  37. Log Out</a>
  38. </div>
  39. </li>
  40. </ul>
  41.  
  42.  
  43. {% else %}
  44. <form class="form-inline ml-auto">
  45. <a href="{% url 'login' %}" class="btn btn-outline-secondary">
  46. Log In</a>
  47. <a href="{% url 'signup' %}" class="btn btn-primary ml-">
  48. Sign up</a>
  49. </form>
  50. {% endif %}
  51. </div>
  52. </nav>
  53. <div class="container">
  54. {% block content %}
  55. {% load bootstrap4 %}
  56. {% bootstrap_css %}
  57. {% bootstrap_javascript jquery='full' %}
  58. {% endblock content %}
  59. </div>
  60.  
  61. <!-- Optional JavaScript -->
  62. <!-- <jQuery first, then Popper.js, then Bootstrap JS -->
  63.  
  64. <script src="{% static 'js/jQuery.min.js' %}"></script>
  65. <script src="{% static 'js/popper.min.js' %}"></script>
  66. <script src="{% static 'js/bootstrap.min.js' %}"></script>
  67.  
  68. </body>
  69. </html>
Add Comment
Please, Sign In to add comment