django-cms: Advance theme management - python

For my django CMS site i need to manage the entire theme of the templates from admin panel. It includes link text colour, hover text background, button colour etc.
I found the app https://github.com/MegaMark16/django-cms-themes, but i can be used with predefined themes only.And i want the admin, who doesnt have any idea about CSS, will be able to manage the theme of the entire website using tools such as colour pallettes etc..
Is there any django app that can be used for this instead of django-cms-themes ?
Thanks in Advance....

Related

How to change Log out icon in jazzmin django theme?

I have django project with jazzmin theme library I use, I've change icon for sidebar with:
"icons:{...}"
and I want to change the user menu icons, the logout menu:
what I know is, we can use this line:
"usermenu_links" : {}
But I don't quite understand how to pointing for the log out button, any idea?

How to customize image toolbar in ckeditor and enable Upload outside admin panel?

The first problem:
If click on the image toolbar, the wizard appears with additional settings. Can I modify it to upload the image in one click without entering additional information and sending the image to the server?
Correct example https://ckeditor.com/docs/ckeditor5/latest/features/images/images-overview.html#inserting-images-via-source-url
The second problem:
Outside the admin panel, there is no upload tab on the image toolbar. How to fix it?
Thanks for your time.

Is it possible to add a Button to a Wagtail Settings page?

I am trying to customize a settings page so it has a button that I will assign to a certain action. (Let's assume for now I just want to log something into the console).
Ideally it would be of something like this:
#register_setting
class ActionTriggeringSetting(BaseSetting):
button = models.ButtonField(
action=myLoggingFunc,
help_text='Click here to log "Hello World" to the console'
)
I tried looking into the site settings but found nothing really helpful there.
Does anybody know if something of the sort exists?
Thank you
Depending on where in the admin UI you want you button to be, there is a way using the register-admin-menu-item or register-settings-menu-item Wagtail hook
See: https://docs.wagtail.io/en/v2.10.1/reference/hooks.html#register-admin-menu-item
and
https://docs.wagtail.io/en/v2.10.1/reference/hooks.html#register-settings-menu-item
The approaches above will add a button to the Wagtail Admin menu or the settings submenu, respectively. Clicking on the button will trigger a custom view that you also need to add - this is also loosely covered in the linked docs.

Can I Use One view In a Django Project?

I´m new to web dev,
and I was wondering if it´s possible to make a website, that just need to present information of a company (HTML), in just one view.
Like rendering the entire bootstrap in one view.
Yes, you can serve your HTML code through a TemplateView.
So if your entire single page application sits in home.html you could definitely do this. But there is no point in using Django for only that purpose. You would rather want to serve your static HTML page from a classic web server like nginx or apache.
I don't know why would you want to do that.
You can use different html files which will be served as your website templates. You can also extend the files using a simple base.html file. This will help you if you want to open other links when people click on different links on the website.
See this example: https://github.com/singh1114/Djangosite/tree/master/duggal/webportal/templates/webportal.
For using this you have to know more about views and urls.
For making scrollable things, you need to know the concept of ids in HTML.
For example
http://yoursite.com/#your_name will try to find id your_name in the HTML. This way you can create scrollable things.

Django doesn't show the CSS of my template

The problem is described in title. I have this template for a blog that I'm creating using Django.
When I open it normally, using double click over the HTML file, it looks like this:
But when I open it via url from the Django project, it looks like this
It only shows a green square (part of the css) but obviously can't open the css correctly.
Any idea to solve this?
In Django you don't open the HTML with double click on the file, you need to run the server first and open your site using the localhost (like you did in the second picture).
Judging by those images, are you sure you put the image in the static folder? In Django, the HTML files stays in the "templates" folder of your app and the css, javascript and images in the "static" folder.
If this answer doesn't help you, then you should post your code here, otherwise I can't find the problem.

Categories