Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • 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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(