We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How can I include Bootstrap theme from cdn?

Hi everybody, 

I have a project developed with Django and I need to create a scheduler with Syncfusion. I really couldn't find a proper way on how to include, via CDN, the bootstrap theme. Do you have any suggestion on how to do that? Sorry for the question, which could sound pretty silly but I really couldn't find a way. 


1 Reply 1 reply marked as answer

VR Vijay Ravi Syncfusion Team March 1, 2023 07:16 AM UTC

Hi Giorgio,


We need to create a templates folder as shown in the below snip and need to map the path of the templates folder in the settings.py file as shown in the below code snippet. Create an HTML page inside the templates folder and add the bootstrap CDN stylesheet as shown in the code snippet.



[settings.py]

 

TEMPLATES = [

    {

        'BACKEND': 'django.template.backends.django.DjangoTemplates',

        'DIRS': [os.path.join(BASE_DIR, 'templates')],

        'APP_DIRS': True,

        'OPTIONS': {

            'context_processors': [

                'django.template.context_processors.debug',

                'django.template.context_processors.request',

                'django.contrib.auth.context_processors.auth',

                'django.contrib.messages.context_processors.messages',

            ],

        },

    },

]


[home.html]

 <head>

    <meta charset="UTF-8" />

    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <title>Syncfusion Scheduler</title>

    <!-- link your stylesheet -->

    <link rel='nofollow' href=https://cdn.syncfusion.com/ej2/20.4.48/bootstrap.css rel="stylesheet">

    <!-- Essential JS 2 all script -->

    <script

      src=https://cdn.syncfusion.com/ej2/20.4.48/dist/ej2.min.js

      type="text/javascript"

    ></script>

  </head>

 


Output:


Regards,

Vijay Ravi


Attachment: schedule_jango_f4b58b78.zip

Marked as answer
Loader.
Live Chat Icon For mobile
Up arrow icon