Re: Django >=3 closes dev server when trying to log in in admin
Yup! that works Thank you so much El miércoles, 8 de enero de 2020, 13:26:22 (UTC-5), Alfredo Silveira escribió: > > Yes, python version 3.8 not Django > > > > On 8 Jan 2020, at 13:13, Cristhiam Gabriel Fernández > wrote: > > > 3.8? 樂 > Did you mean 2.2.8? > Yes, 2.2.8 works fine. > > El miércoles, 8 de enero de 2020, 3:11:14 (UTC-5), Alfredo Silveira > escribió: >> >> Try update your python version to 3.8 >> >> >> >> On 8 Jan 2020, at 03:59, Gil Obradors wrote: >> >> >> Oh yes, sorry, i didnt read right... >> >> Mn, no more output to paste? >> Do you use an IDE? >> >> i have django 2 and 3 working without this behaveor >> >> Have you introduced changes to admin? >> >> >> El dc., 8 de gen. 2020, 7:55, Gil Obradors va >> escriure: >> >>> Hi, 302 response status isnt an error >>> >>> https://developer.mozilla.org/es/docs/Web/HTTP/Status/302 >>> >>> El dc., 8 de gen. 2020, 2:29, Cristhiam Gabriel Fernández < >>> cristh...@gmail.com> va escriure: >>> >>>> Greetings >>>> >>>> From version 3 I'm getting this error. When I try log in in admin site >>>> django closes dev server with no error, only `"POST >>>> /admin/login/?next=/admin/ HTTP/1.1" 302 0`` >>>> >>>> Any suggestion? >>>> >>>> -- >>>> 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...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/django-users/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%40googlegroups.com?utm_medium=email_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...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAK-JoTS34PpgNruQLqzki%3DSrhEJ%3DHie2bMHj%2BTOTGTCJnNTJQg%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/django-users/CAK-JoTS34PpgNruQLqzki%3DSrhEJ%3DHie2bMHj%2BTOTGTCJnNTJQg%40mail.gmail.com?utm_medium=email_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...@googlegroups.com . > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/f3f23188-4ad9-420b-8be7-8af309e87aa9%40googlegroups.com > > <https://groups.google.com/d/msgid/django-users/f3f23188-4ad9-420b-8be7-8af309e87aa9%40googlegroups.com?utm_medium=email_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/41cdff18-4fe7-4265-a5fe-1be8ae4ec47c%40googlegroups.com.
Re: Django >=3 closes dev server when trying to log in in admin
Awesome! upgrade python to 3.8 and django works again Thank you so much El miércoles, 8 de enero de 2020, 11:30:18 (UTC-5), Jasim Ak escribió: > > Update your Python to version 3.8. > > Met with the same issue and this worked for me. > > On Wed, 8 Jan 2020, 21:43 Cristhiam Gabriel Fernández, < > cristh...@gmail.com > wrote: > >> 3.8? 樂 >> Did you mean 2.2.8? >> Yes, 2.2.8 works fine. >> >> El miércoles, 8 de enero de 2020, 3:11:14 (UTC-5), Alfredo Silveira >> escribió: >>> >>> Try update your python version to 3.8 >>> >>> >>> >>> On 8 Jan 2020, at 03:59, Gil Obradors wrote: >>> >>> >>> Oh yes, sorry, i didnt read right... >>> >>> Mn, no more output to paste? >>> Do you use an IDE? >>> >>> i have django 2 and 3 working without this behaveor >>> >>> Have you introduced changes to admin? >>> >>> >>> El dc., 8 de gen. 2020, 7:55, Gil Obradors va >>> escriure: >>> >>>> Hi, 302 response status isnt an error >>>> >>>> https://developer.mozilla.org/es/docs/Web/HTTP/Status/302 >>>> >>>> El dc., 8 de gen. 2020, 2:29, Cristhiam Gabriel Fernández < >>>> cristh...@gmail.com> va escriure: >>>> >>>>> Greetings >>>>> >>>>> From version 3 I'm getting this error. When I try log in in admin site >>>>> django closes dev server with no error, only `"POST >>>>> /admin/login/?next=/admin/ HTTP/1.1" 302 0`` >>>>> >>>>> Any suggestion? >>>>> >>>>> -- >>>>> 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...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/django-users/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%40googlegroups.com >>>>> >>>>> <https://groups.google.com/d/msgid/django-users/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%40googlegroups.com?utm_medium=email_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...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CAK-JoTS34PpgNruQLqzki%3DSrhEJ%3DHie2bMHj%2BTOTGTCJnNTJQg%40mail.gmail.com >>> >>> <https://groups.google.com/d/msgid/django-users/CAK-JoTS34PpgNruQLqzki%3DSrhEJ%3DHie2bMHj%2BTOTGTCJnNTJQg%40mail.gmail.com?utm_medium=email_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...@googlegroups.com . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/f3f23188-4ad9-420b-8be7-8af309e87aa9%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/f3f23188-4ad9-420b-8be7-8af309e87aa9%40googlegroups.com?utm_medium=email_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/e6aa96db-903f-4907-ab6f-a0563ee096d9%40googlegroups.com.
Re: Django >=3 closes dev server when trying to log in in admin
3.8? 樂 Did you mean 2.2.8? Yes, 2.2.8 works fine. El miércoles, 8 de enero de 2020, 3:11:14 (UTC-5), Alfredo Silveira escribió: > > Try update your python version to 3.8 > > > > On 8 Jan 2020, at 03:59, Gil Obradors > > wrote: > > > Oh yes, sorry, i didnt read right... > > Mn, no more output to paste? > Do you use an IDE? > > i have django 2 and 3 working without this behaveor > > Have you introduced changes to admin? > > > El dc., 8 de gen. 2020, 7:55, Gil Obradors > va escriure: > >> Hi, 302 response status isnt an error >> >> https://developer.mozilla.org/es/docs/Web/HTTP/Status/302 >> >> El dc., 8 de gen. 2020, 2:29, Cristhiam Gabriel Fernández < >> cristh...@gmail.com > va escriure: >> >>> Greetings >>> >>> From version 3 I'm getting this error. When I try log in in admin site >>> django closes dev server with no error, only `"POST >>> /admin/login/?next=/admin/ HTTP/1.1" 302 0`` >>> >>> Any suggestion? >>> >>> -- >>> 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...@googlegroups.com . >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/django-users/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%40googlegroups.com?utm_medium=email_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...@googlegroups.com . > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAK-JoTS34PpgNruQLqzki%3DSrhEJ%3DHie2bMHj%2BTOTGTCJnNTJQg%40mail.gmail.com > > <https://groups.google.com/d/msgid/django-users/CAK-JoTS34PpgNruQLqzki%3DSrhEJ%3DHie2bMHj%2BTOTGTCJnNTJQg%40mail.gmail.com?utm_medium=email_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/f3f23188-4ad9-420b-8be7-8af309e87aa9%40googlegroups.com.
Re: Django >=3 closes dev server when trying to log in in admin
No, no more output in terminal. I'm using Visual Studio Code. I'm using pipenv also. Django 2.2.9 works fine. El miércoles, 8 de enero de 2020, 1:59:21 (UTC-5), Gil Obradors escribió: > > Oh yes, sorry, i didnt read right... > > Mn, no more output to paste? > Do you use an IDE? > > i have django 2 and 3 working without this behaveor > > Have you introduced changes to admin? > > > El dc., 8 de gen. 2020, 7:55, Gil Obradors > va escriure: > >> Hi, 302 response status isnt an error >> >> https://developer.mozilla.org/es/docs/Web/HTTP/Status/302 >> >> El dc., 8 de gen. 2020, 2:29, Cristhiam Gabriel Fernández < >> cristh...@gmail.com > va escriure: >> >>> Greetings >>> >>> From version 3 I'm getting this error. When I try log in in admin site >>> django closes dev server with no error, only `"POST >>> /admin/login/?next=/admin/ HTTP/1.1" 302 0`` >>> >>> Any suggestion? >>> >>> -- >>> 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...@googlegroups.com . >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/django-users/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%40googlegroups.com?utm_medium=email_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/9c5d0dfd-5e2e-4244-9a8a-0a938f12d774%40googlegroups.com.
Django >=3 closes dev server when trying to log in in admin
Greetings >From version 3 I'm getting this error. When I try log in in admin site django closes dev server with no error, only `"POST /admin/login/?next=/admin/ HTTP/1.1" 302 0`` Any suggestion? -- 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/6b053e2c-d559-44ed-98e0-c7a5f5d3ef9b%40googlegroups.com.
Custom authentication backend does not get credentials
Hi everyone My project uses two authentications ways for different users. Administrator users authenticate themselves with username and password (ModelBackend). Customers authenticate themselves with phonenumber and token (custom authentication backend). My custom backend authentication backend never gets the credentials. It only works if I use username and password. class CustomerBackend: def authenticate(self, request, phonenumber=None, token=None, **kwargs): print(phone_number) print(token) print(kwargs) return None It shows: None None {'phonenumber': '+17786432446', 'token': 'abc'} -- 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e83d5a88-1086-4827-89fd-a9ddb8842b4f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Testing - get_object_or_404 returns 200 status code
Hi RyuCoder Should not get_object_or_404 shortcut retry 404 status code? El lunes, 10 de junio de 2019, 15:29:24 (UTC-5), RyuCoder escribió: > > Whats your question? > I failed to understand that > > On Tue, Jun 11, 2019, 1:45 AM Cristhiam Gabriel Fernández < > cristh...@gmail.com > wrote: > >> Hi Django super heroes >> >> I'm making of test cases for my simple Django application. When I test a >> view with get_object_or_404 shortcut it returns 200 status code. >> >> def my_view(self, request): >> obj_id = request.POST.get('id') >> obj = get_object_or_404(MyModel, pk=id) >> >> >> >> # Test case >> ...data = {'id': 999} >> response = self.client.post(reverse('view.name'), data=data) >> self.assertEqual(response.status_code, 404) >> >> >> I'm getting *AssertionError: 200 != 404* >> >> -- >> 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...@googlegroups.com . >> To post to this group, send email to django...@googlegroups.com >> . >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/488aa077-1b11-4404-8d4e-0dad1885707b%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/488aa077-1b11-4404-8d4e-0dad1885707b%40googlegroups.com?utm_medium=email_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c6605bef-45e0-431f-8861-f4b3e38f8856%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Testing - get_object_or_404 returns 200 status code
Hi Django super heroes I'm making of test cases for my simple Django application. When I test a view with get_object_or_404 shortcut it returns 200 status code. def my_view(self, request): obj_id = request.POST.get('id') obj = get_object_or_404(MyModel, pk=id) # Test case ...data = {'id': 999} response = self.client.post(reverse('view.name'), data=data) self.assertEqual(response.status_code, 404) I'm getting *AssertionError: 200 != 404* -- 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/488aa077-1b11-4404-8d4e-0dad1885707b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.