Re: Filtering serializermethodfield in DRF

2021-02-23 Thread Kunal Solanke
I don't the exact use case here, but you can pass context while passing data to specializer.And then use it inside creializer clas by self.context. In this case you can pass query params to context On Wed, Feb 24, 2021, 10:15 shreeh...@gmail.com wrote: > I have to filter my queryset based on a q

Filtering serializermethodfield in DRF

2021-02-23 Thread shreeh...@gmail.com
I have to filter my queryset based on a query param. I have to filter based on serializermethodfield. Any help would be appreciated. Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: django voluntary work.

2021-02-23 Thread Sharif Mehedi
Mr. Gilwell Muhati, Since you haven't made any decision yet probably because you are doubting my ability to work with docker. I can assure you even though I am new to docker, I am a quick learner, and have gone through the official docker guide, I will have no trouble using docker. I only ask y

Re: AttributeError: 'NoneType' object has no attribute 'replace'

2021-02-23 Thread Kasper Laudrup
On 23/02/2021 17.56, Abnilson Rafael wrote: Hi, I'm getting error above when I try to this program: The get_language() member function/method of your "translation" object/variable doesn't return anything and you most likely expect it to return a string. Try to figure out how that could happ

Re: Django does't send email on the remote server

2021-02-23 Thread ule...@gmail.com
I have this same problem when i use smtp = out.telenet.be on my local server it works fine but when it use pythonanywhere.com i get OSError: [Errno 101] Network is unreachable Op dinsdag 23 februari 2021 om 11:06:09 UTC+1 schreef soko...@gmail.com: > I am trying to send an email when a user fill

“Did you mean?” search query

2021-02-23 Thread dupakoor kannan
Hello everyone, I would like to implement a search for miss spelled words from the database. I read the answers https://stackoverflow.com/questions/476394/django-did-you-mean-query. Do we have any other apps or an easy way? Any pointers? Thank you Kannan -- You received this message because

Re: Why is this acting like a permanent redirect?

2021-02-23 Thread Robert F
Thanks David. I'll give this a try. On Monday, February 22, 2021 at 4:56:11 PM UTC-8 David Nugent wrote: > Hi Robert, > > To point out the most likely cause of the issue: LOGIN_REDIRECT_URL is a > url, not a route name. > > Possibly could use a reverse_lazy('login-redirect') here after import

Re: Help needed

2021-02-23 Thread Rodrigo Delfino
Such as others have said, you should remove ```auto_now=True```, after that, you cant forget to run ```makemigrantions``` and ```migrate``` Em terça-feira, 23 de fevereiro de 2021 às 03:04:24 UTC-3, bhurk...@gmail.com escreveu: > Hello everyone, > > I am trying to select the custom date but >

Re: Django does't send email on the remote server

2021-02-23 Thread ramadhan ngallen
Change EMAIL_PORT = 465 EMAIL_USE_TLS=False EMAIL_USE_SSL=True On your sendmail function set sail_silently=False so that we can  see an error on terminal On 23 Feb 2021, 14:15 +0300, Sergei Sokov , wrote: > 'setting.py' > EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" > EMAIL_HOST_

Re: Django does't send email on the remote server

2021-02-23 Thread Sergei Sokov
'setting.py' EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" EMAIL_HOST_USER = "em...@gmail.com" EMAIL_HOST = "smtp.gmail.com" EMAIL_PORT = 587 EMAIL_USE_TLS = True EMAIL_HOST_PASSWORD = "Your_Password" I have chtcked spam, I have tried different email services I switched

Re: Django does't send email on the remote server

2021-02-23 Thread Anubhav Gupta
alse please share the program to have a look on On Tue, Feb 23, 2021 at 3:57 PM Anubhav Gupta wrote: > you should be using app password instead of less secure option > > On Tue, Feb 23, 2021 at 3:36 PM Sergei Sokov wrote: > >> I am trying to send an email when a user fills out a form on my site

Re: Django does't send email on the remote server

2021-02-23 Thread Anubhav Gupta
you should be using app password instead of less secure option On Tue, Feb 23, 2021 at 3:36 PM Sergei Sokov wrote: > I am trying to send an email when a user fills out a form on my site. > Everything works on my local server, letters are sent and I am got them. > On a remote timeweb.com server w

Re: Help needed

2021-02-23 Thread FIRDOUS BHAT
Why don't you change field type to Char and save the datetimestamp by your side? On Tue, Feb 23, 2021 at 12:21 PM neha bhurke wrote: > I have done all these codes but it is saving only the current date . > Any other method > *Regard,* > *Neha Bhurke* > > *Precise Industrial Solutions Private Lim

Re: Help needed

2021-02-23 Thread Chelsea Fan
Replace auto_now to auto_add_now On Tue, 23 Feb 2021, 9:04 am neha bhurke, wrote: > Hello everyone, > > I am trying to select the custom date but > datetime=models.DateTimeField(auto_now=True) > is only taking current date > Please help me > > -- > You received this message because you are

Re: Help needed

2021-02-23 Thread FIRDOUS BHAT
You definitely have to remove, auto_now=True On Tue, Feb 23, 2021 at 11:34 AM neha bhurke wrote: > Hello everyone, > > I am trying to select the custom date but > datetime=models.DateTimeField(auto_now=True) > is only taking current date > Please help me > > -- > You received this message b

Re: Help needed

2021-02-23 Thread John
I think you are misunderstanding the use of `auto_now=True`. It will always set that field to the time when the object was last saved; it's not meant to be a form field. See https://docs.djangoproject.com/en/3.1/ref/models/fields/#datefield. What are you trying to do? Have a date field that is

Django does't send email on the remote server

2021-02-23 Thread Sergei Sokov
I am trying to send an email when a user fills out a form on my site. Everything works on my local server, letters are sent and I am got them. On a remote timeweb.com server with the same settings, letters are not sent. Tried DEBUG = False and True I tried different mail services: gmail, mail, yand