Assertionerror because of custom user model and django allauth

2017-08-12 Thread Prithviraj Mitra
I am a fresher in django(version - 1.10). I am using allauth app in the frontend for registration. I am getting an error in the frontend while signing up. assert not EmailAddress.objects.filter(user=user).exists() AssertionError https://github.com/pennersr/django-allauth/blob/maste

Re: deploying on windows

2017-08-12 Thread Avraham Serour
I had to deploy django on windows once, after trying some different options I ended up installing cygwin and compiling uwsgi and nginx inside cygwin. Bonus you can use the same scripts to manage, you can ssh to the machine and run bash You could also try WSL, which is the same as cygwin but new (a

Re: How to insert a row in another table once a user is created

2017-08-12 Thread Prithviraj Mitra
All good. It works now. It has to be EmailAddress.objects.create(user=instance, email=instance.email ) Many thanks for your input. On Saturday, 12 August 2017 16:58:10 UTC+1, Derek wrote: > > I am not exactly sure about your use case description, but it seems as if > your EmailAddress table is

Re: deploying on windows

2017-08-12 Thread Larry Martell
I have experience with apache (not on windows), but none at all with IIS. Don't think I want to go down that route. On Sat, Aug 12, 2017 at 2:15 PM, Jani Tiainen wrote: > Certain version of IIS does have native WSGI support. > > Couldn't find it with my phone but google should help you with that.

Re: deploying on windows

2017-08-12 Thread Jani Tiainen
Certain version of IIS does have native WSGI support. Couldn't find it with my phone but google should help you with that. 12.8.2017 21.06 "Larry Martell" kirjoitti: > I have a django app that runs in linux. It uses nginx and uwsgi. I > have successfully deployed it with Docker, vagrant/Virtual

deploying on windows

2017-08-12 Thread Larry Martell
I have a django app that runs in linux. It uses nginx and uwsgi. I have successfully deployed it with Docker, vagrant/VirtualBox, VMware, kvm, and on bare metal. But now I have prospective client that refuses to run linux, even in a VM. So I am tying to get my app running on Windows Server 2016, pi

Re: How to insert a row in another table once a user is created

2017-08-12 Thread Prithviraj Mitra
I have got some updates. Basically what I want is if admin creates a user then no verification is needed. He/she can straight go to the login page and login with the email and password which was emailed to the user.(I need to do this email part later though) Now another issue has raised with

Re: How to insert a row in another table once a user is created

2017-08-12 Thread Prithviraj Mitra
Hi Derek, Many thanks for your suggestion. I made some progress since I posted this topic. The new row has been created in EmailAddress table but the email is blank. I can't find a solid reason. In the admin user creation form there is an email field and the table auth_user has got the email.

Re: How to use try..except, but when DEBUG is True, show the error?

2017-08-12 Thread Jani Tiainen
Also I would suggest that you log exception in case you don't want to raise it. That way you know that something goes wrong. 12.8.2017 18.52 "Fellipe Henrique" kirjoitti: > Thanks, but.. it's weird I tried that before, and show me the error, but, > only text.. not that "yellow page" from django

Re: How to insert a row in another table once a user is created

2017-08-12 Thread Derek
I am not exactly sure about your use case description, but it seems as if your EmailAddress table is incomplete - suggest: class EmailAddress(models.Model): user = models.OneToOneField(User, unique=True, related_name ='profile') verified = models.BooleanField(verbose_name=_('verified'), d

Re: How to use try..except, but when DEBUG is True, show the error?

2017-08-12 Thread Fellipe Henrique
Thanks, but.. it's weird I tried that before, and show me the error, but, only text.. not that "yellow page" from django... I'll look again my code... Thanks again! T.·.F.·.A.·. S+F *Fellipe Henrique P. Soares* e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge' *F

RE: How to use try..except, but when DEBUG is True, show the error?

2017-08-12 Thread Marcin Gałązka
> Hello, > > i have these code, for example: > > try: >x = parse_date('') > except TypeError: > return False > ​> > > It's ok for me code like these.. but, when DEBUG == True, I like to show the > django default error page... > > How can I do that? > > Regards Why not simply re-rai

Re: How to use try..except, but when DEBUG is True, show the error?

2017-08-12 Thread Vijay Khemlani
from django.conf import settings try: x = parse_date('') except TypeError: if settings.DEBUG: raise else: return False On Sat, Aug 12, 2017 at 10:54 AM, Fellipe Henrique wrote: > Hello, > > i have these code, for example: > > try: >x = parse_date('') > except TypeErr

Re: How to use try..except, but when DEBUG is True, show the error?

2017-08-12 Thread Jani Tiainen
You can reraise exception simply by calling "raise" without params. 12.8.2017 17.54 "Fellipe Henrique" kirjoitti: > Hello, > > i have these code, for example: > > try: >x = parse_date('') > except TypeError: > return False > > ​ > > It's ok for me code like these.. but, when DEBUG ==

Re: how to create webpage

2017-08-12 Thread Sol Chikuse
Hi Dachawar. As much as Django, which is a web framework is designed to simplify your web development life, you will need to build the basic understanding of how it works. The best way to do this is to go through the Django documentation. Django has Tu

How to use try..except, but when DEBUG is True, show the error?

2017-08-12 Thread Fellipe Henrique
Hello, i have these code, for example: try: x = parse_date('') except TypeError: return False ​ It's ok for me code like these.. but, when DEBUG == True, I like to show the django default error page... How can I do that? Regards T.·.F.·.A.·. S+F *Fellipe Henrique P. Soares* e-

Re: how to create webpage

2017-08-12 Thread Larry Medina
Hi Dachawar, I too am new and am currently going through the tutorial which can be found here: https://docs.djangoproject.com/en/1.11/intro/tutorial01/ This will give you a good basis as to how the databases are written with Python as well as what takes care of URL links, building the content fo

why when using the tag AMP or ⚡, the server django load four times or more, and when deleting this tag only load one time? I need help

2017-08-12 Thread ANTHONY WAINER
-- You received this messag

how to create webpage

2017-08-12 Thread Dachawar prabhakar vijaykumar
hi i am new in django. how to create a webpage in it. where should i write pyhton code in it. plz explain -- 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