django queryset - Get the data particular to current year only

2022-03-30 Thread Trippy Samurai
I have my query written to get some thing from database and display on my website that query is getting all the data from db but what if i want to get the data particular to current year only def get(self, request, *args, **kwargs): filt

Re: Difference in datetime with timezone

2022-03-30 Thread Andrés Alvarez
Thanks Anthony, I didn't know that pytz is deprecated. Now with zoneinfo is working. Regards, Andres. El miércoles, 30 de marzo de 2022 a la(s) 03:02:56 UTC-4, Antonis Christofides escribió: > Hi, > > not what you asked, but > > from settings import TIME_ZONE > > is an error. It happens to

How to make file upload model

2022-03-30 Thread Darshan Ghorpade
*Hello * *I have designed a form which accepts some file from user* *how to design model to accept that file and store it ?* *Any tutorial that will be easy to understand please share* -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscri

Re: Django docker application

2022-03-30 Thread Izmir K
Hi there, Could you share your docker-compose.yml and dockerfile as well? On Wednesday, 30 March 2022 at 10:47:01 UTC+1 Kolluri Mounish wrote: > Hi all, > I'm new to dockers, while Initiating a django application within a > container I'm facing fallowing error. > > [image: Screenshot 2022-03-3

Mobile Safari users affected by CSRF failure on log in - how to debug?

2022-03-30 Thread Bartosz Nowotny
Hello, I'm a maintainer of a Django portal for customers of the company I work for. Recently, I have added some instrumentation and I noticed that iOS (or more generally, mobile Safari) users are often getting CSRF failure when attempting to log in. The specific error is: *CSRF token missing or

Django selenium (StaticLiverServerTestCase): tests run together fail but pass if run individually

2022-03-30 Thread Jérôme Le Carrou
write tests with *StaticLiverServerTestCase* for my Django application. *My issue: tests runs together fail while pass when run individually.* I have read much about this behavior on SO but none of answer/comments help. It seems that issue may come from shared files/fields/data. I have tried

Django docker application

2022-03-30 Thread Kolluri Mounish
Hi all, I'm new to dockers, while Initiating a django application within a container I'm facing fallowing error. [image: Screenshot 2022-03-30 150852.png] OS: windows Package Manager: pipenv Database: PostgreSQL Please let me know if any one has an idea about it. -- You received this message

Re: Difference in datetime with timezone

2022-03-30 Thread Antonis Christofides
Hi, not what you asked, but     from settings import TIME_ZONE is an error. It happens to work in this case, but generally you should write     from django.conf import settings and then use "settings.TIME_ZONE". In Django, "settings" isn't a module, it's an object. Django has some logic when