Add it to ur parent html file in the head tag, do u know anything about the
jinja templating engine?

On Tue, Aug 16, 2022, 8:52 PM Matheus Bon <matheusbo...@gmail.com> wrote:

> So I don't need to create a folder with only the files in JS and activate
> with {% load static %}
>
> Interesting... I did it this way, how does it work, I probably missed
> something I didn't see, thank you very much.
>
> Em terça-feira, 16 de agosto de 2022 às 17:27:24 UTC-3, shad...@gmail.com
> escreveu:
>
>> Hi,
>>
>> The simple way for beginner that trying to use already template from any
>> resources and the runserver if It is ok?, you have to change based on what
>> do you want.
>>
>> *See the simple example below:*
>>
>> <!DOCTYPE html>
>> <html>
>> <body>
>>
>> <h1>My First JavaScript</h1>
>>
>> <p>JavaScript can change the content of an HTML element:</p>
>>
>> <button type="button" onclick="myFunction()">Click Me!</button>
>>
>> <p id="demo">This is a demonstration.</p>
>>
>> <script>
>> function myFunction() {
>>   document.getElementById("demo").innerHTML = "Hello JavaScript!";
>> }
>> </script>
>>
>> </body>
>> </html>
>>
>>
>> On Tue, 16 Aug 2022 at 11:09 PM Matheus Bon <matheu...@gmail.com> wrote:
>>
>>> Hello friends
>>>
>>> I'm new to Django and I'm having trouble using JS.
>>>
>>> I want to create a sidebar for my project, however, for some reason, I
>>> can't get it to 'move'.
>>>
>>> I tried the traditional way, putting the <script></script> in the
>>> index.html document, but it didn't work.
>>>
>>> I tried another way, using the static files, creating a 'static' folder
>>> and configuring it in my project.
>>>
>>> --
>>>
>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/174df993-3356-4f34-936c-af64ea32bec6n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/174df993-3356-4f34-936c-af64ea32bec6n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e2a68bc7-0c9f-4b1e-892c-9de405de9732n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e2a68bc7-0c9f-4b1e-892c-9de405de9732n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPTk%3Dxe26L8p9uco1sb7jrG4zihzYY88JRGye3f-n1Gf-VBESw%40mail.gmail.com.

Reply via email to