How to use JS in Django?
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 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+unsubscr...@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.
Re: How to use JS in Django?
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:* > > > > > > My First JavaScript > > JavaScript can change the content of an HTML element: > > Click Me! > > This is a demonstration. > > > function myFunction() { > document.getElementById("demo").innerHTML = "Hello JavaScript!"; > } > > > > > > > On Tue, 16 Aug 2022 at 11:09 PM Matheus Bon 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 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.
Two list on one page
Hello There I want to create two lists on one page, in the style of the image (I'm Brazilian, so the list is in Portuguese). However, if I do it the way I'm showing it in the code image, I'll necessarily have to make two pages for each list, right? -- 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/9a14d11c-7909-440c-8c7f-409571d358e8n%40googlegroups.com.
Re: Two list on one page
What would be a way to get two lists on the same page? Em quarta-feira, 24 de agosto de 2022 às 16:33:23 UTC-3, Matheus Bon escreveu: > Hello There > > I want to create two lists on one page, in the style of the image (I'm > Brazilian, so the list is in Portuguese). > > However, if I do it the way I'm showing it in the code image, I'll > necessarily have to make two pages for each list, right? > > > -- 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/05b14e53-1950-41ac-84ac-51800f40a7e2n%40googlegroups.com.
Why are the items not appearing in the table?
Hello friends! I'm creating a point of sale with a friend in order to increase our Portfolio. However, I'm having a problem to present the items in a table, I've already added items through the Django admin panel, but in the template it doesn't appear. I will be leaving the POS link that is on github, because I believe it is easier. https://github.com/Matheus-Bon/frente-de-caixa OBS: I'm Brazilian, so the codes will be in my language, but I think that's not a problem. The app I created to make the table is called app: 'cadastro'; and I want to put the table in the app called: 'paginas' in the template called: 'estoque.html' and 'gastos.html' If you need any more information, please ask, I'm available, and if you can't open git and want me to send the codes, you can talk, I'm available Thank you very much! -- 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/901f7db3-be26-4d46-ab7c-6f3c6d6d6317n%40googlegroups.com.
Re: Why are the items not appearing in the table?
Hello, Francisco! We've managed to solve this problem! Thank you so much for your time. Em qui., 8 de set. de 2022 às 17:50, Francisco Valadares < valadares@gmail.com> escreveu: > > Hello Matheus Bon , > > > > Could you give me more detail about " I've already added items through the > Django admin panel, but in the template it doesn't appear." > Are You not visualising your items in the following screen? > > [image: image.png] > > > Att, > Francisco > > Matheus Bon escreveu no dia terça, 6/09/2022 > à(s) 17:58: > >> Hello friends! >> >> I'm creating a point of sale with a friend in order to increase our >> Portfolio. However, I'm having a problem to present the items in a table, >> I've already added items through the Django admin panel, but in the >> template it doesn't appear. >> >> I will be leaving the POS link that is on github, because I believe it is >> easier. >> https://github.com/Matheus-Bon/frente-de-caixa >> >> OBS: I'm Brazilian, so the codes will be in my language, but I think >> that's not a problem. >> >> The app I created to make the table is called app: 'cadastro'; and I want >> to put the table in the app called: 'paginas' in the template called: >> 'estoque.html' and 'gastos.html' >> >> If you need any more information, please ask, I'm available, and if you >> can't open git and want me to send the codes, you can talk, I'm available >> >> >> Thank you very much! >> >> -- >> 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/901f7db3-be26-4d46-ab7c-6f3c6d6d6317n%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/901f7db3-be26-4d46-ab7c-6f3c6d6d6317n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-users/Dc7dVUOD7CE/unsubscribe. > To unsubscribe from this group and all its topics, 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/CAA-J3ictfpi5iWn%3DBQP0SSJ446Zq70gTprKitkJzmt%2BxuTj3GA%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAA-J3ictfpi5iWn%3DBQP0SSJ446Zq70gTprKitkJzmt%2BxuTj3GA%40mail.gmail.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/CAJAvtf5dMM_yXFKoPfDqxNkCbsE79BBo5rZjddpTEOLMP6NSew%40mail.gmail.com.
Re: Why are the items not appearing in the table?
The error looked like this. But for what I was wanting I had to leave this class method and go to the def method... That way I can do a lot more customization, like putting the update view in a popup. But I managed to solve it, thank you very much Boris! Em qui., 8 de set. de 2022 às 20:23, Boris Pérez escreveu: > Oi Matheus!!! É possible que vc esquecera enviar na lista de items a o > template dd a view? > > El jue, 8 sept 2022 a las 17:02, Matheus Bon () > escribió: > >> Hello, Francisco! >> We've managed to solve this problem! Thank you so much for your time. >> >> >> Em qui., 8 de set. de 2022 às 17:50, Francisco Valadares < >> valadares@gmail.com> escreveu: >> >>> >>> Hello Matheus Bon , >>> >>> >>> >>> Could you give me more detail about " I've already added items through >>> the Django admin panel, but in the template it doesn't appear." >>> Are You not visualising your items in the following screen? >>> >>> [image: image.png] >>> >>> >>> Att, >>> Francisco >>> >>> Matheus Bon escreveu no dia terça, 6/09/2022 >>> à(s) 17:58: >>> >>>> Hello friends! >>>> >>>> I'm creating a point of sale with a friend in order to increase our >>>> Portfolio. However, I'm having a problem to present the items in a table, >>>> I've already added items through the Django admin panel, but in the >>>> template it doesn't appear. >>>> >>>> I will be leaving the POS link that is on github, because I believe it >>>> is easier. >>>> https://github.com/Matheus-Bon/frente-de-caixa >>>> >>>> OBS: I'm Brazilian, so the codes will be in my language, but I think >>>> that's not a problem. >>>> >>>> The app I created to make the table is called app: 'cadastro'; and I >>>> want to put the table in the app called: 'paginas' in the template called: >>>> 'estoque.html' and 'gastos.html' >>>> >>>> If you need any more information, please ask, I'm available, and if you >>>> can't open git and want me to send the codes, you can talk, I'm available >>>> >>>> >>>> Thank you very much! >>>> >>>> -- >>>> 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/901f7db3-be26-4d46-ab7c-6f3c6d6d6317n%40googlegroups.com >>>> <https://groups.google.com/d/msgid/django-users/901f7db3-be26-4d46-ab7c-6f3c6d6d6317n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "Django users" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/django-users/Dc7dVUOD7CE/unsubscribe. >>> To unsubscribe from this group and all its topics, 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/CAA-J3ictfpi5iWn%3DBQP0SSJ446Zq70gTprKitkJzmt%2BxuTj3GA%40mail.gmail.com >>> <https://groups.google.com/d/msgid/django-users/CAA-J3ictfpi5iWn%3DBQP0SSJ446Zq70gTprKitkJzmt%2BxuTj3GA%40mail.gmail.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/CAJAvtf5dMM_yXFKoPfDqxNkCbsE79BBo5rZjddpTEOLMP6NSew%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAJAvtf5dMM_yXFKoPfDqxNkCbsE79BBo5rZjddpTEOLMP6NSew%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-users/Dc7dVUOD7CE/unsubscribe. > To unsubscribe from this group and all its topics, 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/CAObPVPBYtYPbbTqMn5KcHZPoFCxm5i6cG2dimSGDn_Sf-SnK3w%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAObPVPBYtYPbbTqMn5KcHZPoFCxm5i6cG2dimSGDn_Sf-SnK3w%40mail.gmail.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/CAJAvtf7j2-Q0oP2KT5C-rHusFnxVxNakw0NZmC6B0M1wZJvCrw%40mail.gmail.com.
'WSGIRequest' object has no attribute 'is_ajax'
Hello guys! I'm using AJAX in my Django project, as soon as I finished writing the code and went to test it, this error always pops up. The site runs normally, it's only when I send it that this happens. What should I do? -- 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/7e8fb2cc-337c-4532-9c54-ae9e2a28e877n%40googlegroups.com.
Re: 'WSGIRequest' object has no attribute 'is_ajax'
I use the version 4.1 I saw that after version 3.1 you have to implement a code to be able to use I did this and it worked, thanks dude! Em sex., 16 de set. de 2022 às 09:27, André Lewis escreveu: > What version of Django are you using? If it's 4.1, I'm pretty sure it's no > longer supported. > > You can check the docs to confirm: > https://docs.djangoproject.com/en/4.1/ref/request-response/ > > On Thu, 15 Sept 2022 at 16:55, Matheus Bon wrote: > >> Hello guys! >> >> I'm using AJAX in my Django project, as soon as I finished writing the >> code and went to test it, this error always pops up. >> >> The site runs normally, it's only when I send it that this happens. >> >> What should I do? >> >> -- >> 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/7e8fb2cc-337c-4532-9c54-ae9e2a28e877n%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/7e8fb2cc-337c-4532-9c54-ae9e2a28e877n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-users/aRS-TVajURc/unsubscribe. > To unsubscribe from this group and all its topics, 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/CAJN6x_h%2BfPaySJFGLOWKCYzkRiEn63LSqs32ee8S5Jajx0qxqw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAJN6x_h%2BfPaySJFGLOWKCYzkRiEn63LSqs32ee8S5Jajx0qxqw%40mail.gmail.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/CAJAvtf6cFqkMfK3xixGrJ_ONE5_JTfisXzRjHtoo%3Dtc4rm0Cdw%40mail.gmail.com.
JSON files. How is it done?
Hi! I'm lost in a question of my project, I see so many methods on the internet but none work for me (maybe I'm implementing it wrongly) But, I would like to know if you could give me a method to transform my model into a JSON file and then be able to retrieve these JSON files for me to put in an INPUT with a dropdown, using, for example, SELECT2. Thanks! -- 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/d89cac37-fdb7-436d-8e67-3e848ff425b3n%40googlegroups.com.
Re: JSON files. How is it done?
Thank you all! Em qui., 22 de set. de 2022 às 16:41, Julio Cojom escreveu: > Hi Matheus! > > Try to use django-select2 it is easy to set up and works like a charm! > > It has an advanced and easy implementation, so try first with the easy > ones and then if your project needs something heavier, you can refactor the > code with a simple couple of lines. > > https://django-select2.readthedocs.io/en/latest/ > > Regards, > > Julio Cojom > > El jue, 22 sept 2022 a las 4:23, Matheus Bon () > escribió: > >> Hi! >> >> I'm lost in a question of my project, I see so many methods on the >> internet but none work for me (maybe I'm implementing it wrongly) >> >> But, I would like to know if you could give me a method to transform my >> model into a JSON file and then be able to retrieve these JSON files for me >> to put in an INPUT with a dropdown, using, for example, SELECT2. >> >> Thanks! >> >> -- >> 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/d89cac37-fdb7-436d-8e67-3e848ff425b3n%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/d89cac37-fdb7-436d-8e67-3e848ff425b3n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-users/oQCdaU1cFfA/unsubscribe. > To unsubscribe from this group and all its topics, 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/CAHRQUHmdjwLux9ok-WVOYFon59HhoFhyXEXbCg0kP9KBSuVpLA%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAHRQUHmdjwLux9ok-WVOYFon59HhoFhyXEXbCg0kP9KBSuVpLA%40mail.gmail.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/CAJAvtf4ZhKa5MKoBweWVYL%3Dtb7GMiZnT_On0j%3D%2B8mqmXV325Xg%40mail.gmail.com.
Elements don't render in my table
Hello friends! I've been trying to find my error for a while as to why my database items are not being printed in the table I created, I've looked at all my files and nothing! Where is my mistake? Thanks. Here is the code: Views.py https://github.com/Matheus-Bon/frente-de-caixa/blob/main/cadastro/views.py#L2-L81 Urls.py https://github.com/Matheus-Bon/frente-de-caixa/blob/main/cadastro/urls.py#L17-L22 Table https://github.com/Matheus-Bon/frente-de-caixa/blob/main/paginas/templates/paginas/gastos.html#L24-L56 Note: I am rendering my table in the 'paginas' app and their data is in the 'registrations' app Thank you again! -- 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/99f2b47a-e3a0-47fd-9534-dbb5a8ab491bn%40googlegroups.com.