How to change the django cms admin logo? - django

Is there any way to change the Django CMS admin logo? I tried many things to change the logo of Django cms admin but unable to. Can anyone help me?

You could copy, modify and then include this template file in your project in the folder: your-project/templates/cms/toolbar/items
https://github.com/divio/django-cms/blob/develop/cms/templates/cms/toolbar/items/logo.html
You need to keep the css class cms-toolbar-item-logo because the JS binds to that logo and may error without it.
You can then add override the css rule for the icon by changing the content, you may need to rewrite this altogether by setting the content as empty and adding a background image:
.cms-icon-logo:before {
content:"\E02D"
}

Related

Is django-ckeditor a truly wysiwyg editor?

When I'm editing content in ckeditor, it looks great with all the styling applied. For example, code snippet looks like:
and blockquote looks like:
But when django template(content) is rendered it doesn't preserve any of the styling.
Code snippets becomes :
and blockquote becomes :
You need to make sure that the styles in CKEditor are also available in your site's CSS files. See contents.css in CKEditor's main folder and adjust both it, and/or your site's CSS, to match each other.

Django admin change list scrollbar at top and bottom

In my Django changelist there are lots of columns that means there is a scrollbar at the bottom of the list. Is it possible to get a scrollbar to appear at the top so I don't need to scroll down
Thanks
Grant
The penny dropped thanks to AlexandreS and this is what I did
I used this plugin: https://github.com/avianey/jqDoubleScroll
I coped the code to my js file: js/admin-help.js
In admin in the model class, I have this
class Media:
js = (
'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', # jquery
'js/admin-help.js', # project static folder
)
Then collectstatic and it looks like it works, as I want too
Thanks
Grant
This is something that you will have to change in your template.
Here is an example of how you can achieve this.
How to override and extend basic Django admin templates?
EDIT: But I am not sure that you can change the template itself.

Adding non-CMS (Django) page to Wagtail menu

I may not be understanding something obvious, but I'm struggling to add a (top-level) menu item to my Wagtail based menu that hooks to a page rendered by an included app that doesn't know about Wagtail. Ideally, it is just a normal Django TemplateView with standard urlconf, though I may need to add some custom code.
If I use the custom URL in the menu editor, I get a not found from Wagtails core.serve. I've looked at snippets, wagtail hooks, RoutablePageMixin, and the custom URL in the menu editor and none seem like it accomplishes what I'm trying to do.
It may well be that I'm simply misunderstanding the docs, but is there a simple example of someone doing this? The closest I've found so far is https://www.caktusgroup.com/blog/2016/02/15/wagtail-2-steps-adding-pages-outside-cms/. I've also searched https://docs.wagtail.io/en/v2.4/advanced_topics/third_party_tutorials.html to now avail. Any guidance appreciated.
Thx,
--Don
Hope this is useful, but it seems that my problem was not the mixing of Wagtail and non-Wagtail items - it was in my URLConf - Wagtail.core.serve occurred before the Django url I was trying to reach and was trying to respond. Once I reordered the URLConf appropriately, I am getting the view as I wanted.
Sigh...

Show article only in popup using Joomla with actual template

I'm using Joomla 3.4 and want to open popup with some article only.
I have this link to load into popop: index.php?option=com_content&view=article&catid=13&Itemid=176&id=6&tmpl=component
I know that I must add tmpl=component but when I add this it load system CSS, JS and HTML layout. It doesn't load active template CSS, JS etc. Why is this happening? Without this attribute it load whole page with active template.
Thanks for advice.
Never mind! I have already done this. I just need to edit component.php file in template.
OK so I found the solution.
I just create file named 'component.php' in the template root folder and edit it as I want. I include my CSS, JS, etc to the file with my specific HTML. So if I add tmpl=component to the URL it looks for compoment.php file. That's all.

django: how to add home link to admin

I would like to add a link to / to every page in template. Can I do it without changing django internal template? I could customize django, but this is something I seriously wouldn't like to do.
Sure, just override one of the Django admin templates in your own templates/admin directory. For instance, copy the contents of django/contrib/admin/templates/base.html into yourproject/templates/admin/base.html. Then, change the latter to your heart's content.
See: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates
According to the accepted answer, I still failed to make it. After some try-error experiments, my answer is:
copy django/contrib/admin/templates/base_site.html to as your_project/templates/admin/base_site.html
customize your local base_site.html to whatever you want
add to your settings.py
TEMPLATE_DIRS = ('templates',)