added TINYWIKI_HOME settings for settings the app-specific homepages of the wiki
This commit is contained in:
7
django_project/context_processors.py
Normal file
7
django_project/context_processors.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from . import settings
|
||||
|
||||
|
||||
def tinywiki(request):
|
||||
return {
|
||||
'tinywiki_home': settings.TINYWIKI_HOME,
|
||||
}
|
||||
@@ -36,6 +36,8 @@ ENV = Env(
|
||||
EMAIL_BACKEND=(str, "console"),
|
||||
)
|
||||
|
||||
TINYWIKI_HOME = "grow-home"
|
||||
|
||||
_env_file = Path(ENV.path("DOTENV"))
|
||||
if _env_file.is_file():
|
||||
ENV.read_env(_env_file)
|
||||
|
||||
@@ -29,7 +29,7 @@ class HomeView(View):
|
||||
page = None
|
||||
if self.user_can_create_system_pages:
|
||||
if settings.USE_BOOTSTRAP:
|
||||
create_tw_home = f"<a class=\"icon-link icon-link-hover\" href={reverse('tinywiki:page', kwargs={'slug': 'tw-home'})}>{_('create a new page with the slug <i>tw-home</i>')}<svg class=\"bi\"><use xlink:href=\"{settings.settings.STATIC_URL + 'tinywiki/icons/bootstrap-icons.svg'}#house-add\" ></use></svg></a>" # noqa: E501
|
||||
create_tw_home = f"<a class=\"icon-link icon-link-hover\" href={reverse('tinywiki:page', kwargs={'slug': settings.TINYWIKI_HOME})}>{_(f'create a new page with the slug <i>{settings.TINYWIKI_HOME}</i>')}<svg class=\"bi\"><use xlink:href=\"{settings.settings.STATIC_URL + 'tinywiki/icons/bootstrap-icons.svg'}#house-add\" ></use></svg></a>" # noqa: E501
|
||||
else:
|
||||
create_tw_home = f"<a href={reverse('tinywiki:page', kwargs={'slug': 'tw-home'})}>{_('create a new page with the slug <i>tw-home</i>')}</a>" # noqa: E501
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user