Re: Do queries made instantiating a form not show up in db.connection.queries?

2018-11-01 Thread Jonathan Berger
Thank you! I was looking at the value of 'connection.queries' before rendering the form. On Thu, Nov 1, 2018 at 6:12 PM Karen Tracey wrote: > On Thu, Nov 1, 2018 at 8:14 PM Jonathan Berger > wrote: > >> >> Per the db and model FAQ >>

Re: foreign key is not working

2018-11-01 Thread amit pant
i used all method which is on docs but still it's not working properly. i am using django 2 with pyhton 3 On Wed, Oct 31, 2018 at 5:28 PM Paras Patidar wrote: > Use: > on_delete = models.CASCADE > In Foreign Key > > On Wed 31 Oct, 2018, 5:15 PM amit pant, wrote: > >> i used foreign key for

Re: Error when I use python manage.py makemigrations polls

2018-11-01 Thread amit pant
It's seems you could not add app on settings.py INSTALLED APPS list. you should firstly add there then you can do makemigrations On Fri, Nov 2, 2018 at 6:57 AM ALLAN NJOROGE wrote: > Hey, I am a newbie in Django and am trying to learn by following the > official documentation, I am stuck on

Re: Error : MultiValueDictKeyError

2018-11-01 Thread amit pant
hey, you can use request.POST.get('username') -- 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,

Re: Error : MultiValueDictKeyError

2018-11-01 Thread Vivek Jha
We can create whatsapp group.Sharing of information will be more convenient -- 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

Re: Error when I use python manage.py makemigrations polls

2018-11-01 Thread ALLAN NJOROGE
Thanks let me do that On Thu, Nov 1, 2018 at 6:58 PM Dewansh Rawat wrote: > Hey there! > Can you please host you're code on GitHub or gist? It becomes quite easier > to debug then. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To

Error when I use python manage.py makemigrations polls

2018-11-01 Thread Dewansh Rawat
PS, also try this out, if it works out for you... https://stackoverflow.com/questions/17931380/attributeerror-tuple-object-has-no-attribute-startswith -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Error when I use python manage.py makemigrations polls

2018-11-01 Thread Dewansh Rawat
Hey there! Can you please host you're code on GitHub or gist? It becomes quite easier to debug then. -- 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

Error when I use python manage.py makemigrations polls

2018-11-01 Thread Dewansh Rawat
PS, also try this link, if it works out for you... https://stackoverflow.com/questions/17931380/attributeerror-tuple-object-has-no-attribute-startswith -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Error when I use python manage.py makemigrations polls

2018-11-01 Thread M Hashmi
Share Installed App snapshot again. Its not showing "polls" in installed apps. On Thu, Nov 1, 2018 at 6:27 PM ALLAN NJOROGE wrote: > Hey, I am a newbie in Django and am trying to learn by following the > official documentation, I am stuck on writing your first code part 2, I > have followed

Re: Do queries made instantiating a form not show up in db.connection.queries?

2018-11-01 Thread Karen Tracey
On Thu, Nov 1, 2018 at 8:14 PM Jonathan Berger wrote: > > Per the db and model FAQ > : > expected behavior is that 'connection.queries' should contain a list of all > SQL queries made by an

django render html template isse

2018-11-01 Thread sidh
Hi, I am executing script using django form and it provides me below results. It's good but i would like to render it to html template. *return HttpResponse(onsubmit, content_type="text/plain")* Output: *URL: https://abc.com* *Timestamp: Wed, Oct 31, 2018 18:44 GMT* *HTTP Response Code: 500*

django render output to template

2018-11-01 Thread sidh
Hi, I created a form, on submit i am triggering a script When i use : #return HttpResponse(onsubmit, content_type="text/plain") my results are good but i want to render it to template to get good output. *Output:* *URL: https://abc.com/* *Timestamp: Wed, Oct 31, 2018 18:44 GMT* *HTTP

Do queries made instantiating a form not show up in db.connection.queries?

2018-11-01 Thread Jonathan Berger
Hi Django Users, I'm a moderate-level user of Django and trying to determine if I've found a bug. Per the db and model FAQ : expected behavior is that 'connection.queries' should contain a list

Re: Use Email to Login With Django Auth

2018-11-01 Thread Timothy Cook
I use this and it works great. https://django-allauth.readthedocs.io/en/latest/installation.html On Thu, Nov 1, 2018 at 9:08 AM Ryan Shepard wrote: > How could i go about allowing people to also use their email to sign into > Django instead of a username? I have done research my self and

Re: Use Email to Login With Django Auth

2018-11-01 Thread Ryan Shepard
That helps a bunch, thank you! On Thursday, November 1, 2018 at 12:44:20 PM UTC-5, Andrew Pinkham wrote: > > You may be interested in django-improved-user, as it provides an > email-based User model. > > https://pypi.org/project/django-improved-user/ > > Full disclosure: I am one of the

Re: Using django on kubernetes

2018-11-01 Thread Dan Davis
Thanks, would you say that running Minikube is the best way to learn Kubernetes at a significant level, or would you recommend a small Virtualbox/vagrant setup that really is a multi-node Kubernetes? I don't really have enough cores and memory for the later anyway, but I could just start-up

Re: Use Email to Login With Django Auth

2018-11-01 Thread maunish dave
Do not use django login authentication instead make your own authentication page On Fri 2 Nov, 2018, 12:12 AM Deb Das, wrote: > You can query for the given email and get the username, then getting the > username do normal Django authentication. > > On Thu 1 Nov, 2018, 5:39 PM Ryan Shepard >>

Re: Use Email to Login With Django Auth

2018-11-01 Thread Deb Das
You can query for the given email and get the username, then getting the username do normal Django authentication. On Thu 1 Nov, 2018, 5:39 PM Ryan Shepard How could i go about allowing people to also use their email to sign into > Django instead of a username? I have done research my self and

Re: Use Email to Login With Django Auth

2018-11-01 Thread Andrew Pinkham
You may be interested in django-improved-user, as it provides an email-based User model. https://pypi.org/project/django-improved-user/ Full disclosure: I am one of the original authors. If you have any trouble with the package or documentation, please open an issue! Andrew

Django bugfix release: 2.1.3

2018-11-01 Thread Carlton Gibson
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2018/nov/01/bugfix-release/ -- 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

Re: race condition on post multiple files to the same folder

2018-11-01 Thread Simon Charette
Hello there, I think you just hit #29890[0], a bug present in Django in 2.0+ and fixed in Django 2.1.3 which should be released today[1]. Simply updating to 2.1.3 when it's released should address your issue. Cheers, Simon [0] https://code.djangoproject.com/ticket/29890 [1]

Re: There's way to change "model_list" result variable name from ListView?

2018-11-01 Thread Daniel Roseman
On Wednesday, 31 October 2018 12:51:15 UTC, Fellipe Henrique wrote: > > Hi, > > Normal ListView result a list with "model"_list as name... there's any > way to change these name? > > > You can set `context_object_name` to whatever name you want. This is documented here:

Re: Use Email to Login With Django Auth

2018-11-01 Thread Mikhailo Keda
use email as username) check this code - https://bitbucket.org/voron-raven/chat/src/1073edbed7700a5bea87bf5b9c08297e7db57af6/core/views.py#lines-267:283 and modify POST to set email as username -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Use Email to Login With Django Auth

2018-11-01 Thread ansh srivastav
Your question is not clear, please be a bit specific. [image: Mailtrack] Sender notified by Mailtrack 11/01/18, 6:33:43 PM

Re: Error in function to return permissions

2018-11-01 Thread Joel Mathew
Thank you! Sincerely yours, Joel G Mathew On Wed, 31 Oct 2018 at 21:36, Stephen J. Butler wrote: > > @login_required needs "request" as the first parameter. > > On Wed, Oct 31, 2018 at 11:58 AM Joel Mathew wrote: >> >> I have a custom function to check if a user is authorized to do >>

race condition on post multiple files to the same folder

2018-11-01 Thread Han Hu
Here is my model definition class Item(models.Model): name = models.CharField(max_length=256) def item_id_path(instance, filename): return '{}/{}'.format(instance.item.id, filename) # Create your models here. class File(models.Model): file =

Use Email to Login With Django Auth

2018-11-01 Thread Ryan Shepard
How could i go about allowing people to also use their email to sign into Django instead of a username? I have done research my self and tried creating my own backend for it. But it doesn't work. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: There's way to change "model_list" result variable name from ListView?

2018-11-01 Thread Derek
You question is not very clear; perhaps add some code and/or screenshots to show what you mean. On Wednesday, 31 October 2018 14:51:15 UTC+2, Fellipe Henrique wrote: > > Hi, > > Normal ListView result a list with "model"_list as name... there's any > way to change these name? > > >