Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

Remove header toolbar in Django


Hello,

How can I remove the toolbar header for Django? I am using the dark header layout, but when I set the following in _templates/layout/default.py to false or comment it out it doesn't change anything:


def initDarkHeaderLayout(context):
KTTheme.addHtmlAttribute("body", "data-kt-app-layout", "dark-header")
KTTheme.addHtmlAttribute("body", "data-kt-app-header-fixed", "true")
KTTheme.addHtmlAttribute("body", "data-kt-app-toolbar-enabled", "false")

KTTheme.addHtmlClass("body", "app-default")

return context


any help would be appreciated.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


I apologize for the delay. To remove the toolbar header in Django, you need to modify the main layout file. Here's how you can do it:

Open the main layout file located at /django/starterkit/_templates/layout/default.html.

Find the line that includes the toolbar partial:

{% include "./partials/sidebar-layout/_toolbar.html" %}

Remove or comment out this line to prevent the toolbar from being included in the layout.

Save the file and restart your Django server if necessary.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(