costum site_name
Closed this issue · 1 comments
Hii.. there.. big pardon to ask something...
I already add this code on my django settings.py:
SITE_URL='www.mydomain.tld/somewhere/'
SITE_NAME='My site'
but doesnt works..still doesnt anything happen...
how to costum text and icon, i found on https://github.com/barszczmm/django-wpadmin/blob/master/wpadmin/menu/menus.py , and just re-write class BasicTopMenu(Menu):
class BasicTopMenu(Menu):
"""
Basic default top menu.
"""
def init_with_context(self, context):
admin_site_name = get_admin_site_name(context)
if 'django.contrib.sites' in settings.INSTALLED_APPS:
from django.contrib.sites.models import Site
site_name = Site.objects.get_current().name
site_url = 'http://' + Site.objects.get_current().domain
else:
site_name = _('Site')
site_url = '/'
self.children += [
items.MenuItem(
title=site_name,
url=site_url,
icon='fa-bullseye',
css_styles='font-size: 1.5em;',
),
I change site_name and site_url directly from the code, and also the icon url . Does have a method change the text very simple to do?
Very big thanks and appreciation for the response
i've been read how to make costum menu from docs https://media.readthedocs.org/pdf/django-wp-admin/master/django-wp-admin.pdf and change top+left menu on settings.py , ok there is no need to be issue... cool... thanx....