简体   繁体   中英

Add Custom bootstap template to Django CMS Project

I hope you are well. The reason i'm writing to you is because ive been utilizing the Django cms bootstrap carousel plug in.

Im all set however i am struggling to figure out how to add me newly added custom template to my application.

Im wondering if there is something i need to add to my settings.py file like CAROUSEL_TEMPLATES = [ ' ' ]

I am not using setup.py

All of the applications are installed via requirements.txt

static and troage files are in AWS and templates are served from the source code of the applictation.

I would be very grateful if you could point me in the right direction?

Djangocms version: Django-cms 3.10

Django version : Django==3.2

Plug in im using: djangocms-bootstrap 1.1.2

The default setting for these templates is;

DJANGOCMS_BOOTSTRAP4_CAROUSEL_TEMPLATES = (
    ('default', _('Default')),
)

And you can see those default templates here .

So that default path within the templates directory looks like templates/djangocms_bootstrap4/carousel/default

Assuming you have a set of templates you called theme you'd change that setting to;

DJANGOCMS_BOOTSTRAP4_CAROUSEL_TEMPLATES = (
    ('default', _('Default')),
    ('theme', _('Theme')),
)

And you would add your templates in the following directory;

templates/djangocms_bootstrap4/carousel/theme

It all worked perfectly thank you.The only thing i had to remove the _ from your settings .py suggestion. so it workeed with the following:

DJANGOCMS_BOOTSTRAP4_CAROUSEL_TEMPLATES = (
    ('default', ('Default')),
    ('theme', ('Theme')),
)

Thanks again!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM