Replies: 1 comment 1 reply
-
Umm then seems you haven't actually fully integrated Django, because it's not touched at all when rendering the template. It's Jinja2 instead, which only looks somewhat similar. But indeed the Jinja2 template engine has no awareness of any "user". You'd have to pass such objects to the template. Which you would just need to modify the code for. mkdocs/mkdocs/commands/build.py Line 90 in fd0e9de Or maybe would be enough to add a MkDocs plugin with on_template_context which would somehow pull those objects from Django?
Anyway... seems that if you're taking up such an advanced project, you basically should know better than anyone who could try to help you here. It's also not really in scope and not really an issue, so I'm inclined to close it. Well, I'll move it to a discussion. |
Beta Was this translation helpful? Give feedback.
-
I integrated Django 3 with mkdocs. means instead of Mkdocs serve, I'm using Django to run
mkdocs serve
, in order to use Django authentication. Everything is fine so far. my main problem is the documentation building part. I'm overriding themian.html
using customized blocks. I want to hide one of the tabs if the user is not a superuser.but I'm getting this error:
is there a way to fix this error?
Beta Was this translation helpful? Give feedback.
All reactions