Add user email verification to custom user model

2021-03-09 Thread Manuel Buri
Hi, I am a bit lost while trying to add user email verification step to my custom user model that is based on AbstractBaseUser. Did someone do that already or if not how should I do it differently? Thank you so much! -- You received this message because you are subscribed to the Google Groups

Re: Add user email verification to custom user model

2021-03-09 Thread Manuel Buri
alert("Error: La dirección de correo " + x + " es > incorrecta."); > document.getElementById("correo").value = ""; > } > } > } > > Regards, > > Gabriel Araya Garcia > GMI - Desarrollo de Sistemas In

Re: Add user email verification to custom user model

2021-03-12 Thread Manuel Buri
Thank you very much for your help. I made it work! Please let me know if I need to explain it to someone else. Best wishes, Manuel Manuel Buri T: +41 79 933 01 11 M: manuel.b...@gmail.com W: www.manuelburi.com <http://manuelburi.com/?utm_source=gmail> On Tue, 9 Mar 2021 at 17:54,

Calendar based on JS/JQuery needs to communicate with Django

2021-03-17 Thread Manuel Buri
Hello, I am having a website where people are able to *make bookings for offices*. Clients will click on the *calendar that is rendered in JS/JQuery (on client side)* to select a date and then book for a specific date via a button. To store the booking in my database I am using an Ajax call, wh

2 Almost equal Context with non-empty query set: 1 works, 1 returns nothing

2021-03-18 Thread Manuel Buri
Hi folks, can you please help me with this. I am trying to get the context working where I filter for the organization_id as well as the booking_time. Both queries are not empty, however, only the context without the booking_time filter works while rending in html. Code: @login_required def ov

Re: 2 Almost equal Context with non-empty query set: 1 works, 1 returns nothing

2021-03-19 Thread Manuel Buri
; I think , >>> At first, you shoukd check the value of "request.user.organization_id" . >>> Next, try to use Q if the value is valid. >>> >>> context['bookings'] = >>> Booking.objects.filters(Q((organization_id=request.user.organization_id) & >>> Q

View / Query Set not showing with filter

2021-03-19 Thread Manuel Buri
Hi, I am having this query set in my view: context['bookings']=Booking.objects.filter( Q(organization_id=request.user.organization_id), *Q(booking_time__range= (start_date, end_date))*) It produces a *non-empty* query set! However, I am NOT able to display it in my template. If I get *rid* of

Re: View / Query Set not showing with filter

2021-03-19 Thread Manuel Buri
e in YouTube. > > On Fri 19 Mar, 2021, 6:31 PM Manuel Buri, wrote: > >> Hi, >> >> I am having this query set in my view: >> context['bookings']=Booking.objects.filter( >> Q(organization_id=request.user.organization_id), *Q(booking_time__range= >>

Re: View / Query Set not showing with filter

2021-03-19 Thread Manuel Buri
': 'H'}, {'id': 10, 'account_id': 4, 'organization_id': 11, 'office_id': 1, 'booking_time': datetime.datetime(2021, 3, 21, 0, 0, tzinfo=), 'location': 'H'}]> I am really clueless why this is happening. Do

Re: View / Query Set not showing with filter

2021-03-19 Thread Manuel Buri
the field is this (copied from my Model): booking_time= models.DateTimeField(default=timezone.now) sent from my phone. sorry for typos. On Fri, 19 Mar 2021, 21:28 Anornymous u, wrote: > What is the name of the field, this part that reads range > > On Fri, Mar 19, 2021, 16:

Re: View / Query Set not showing with filter

2021-03-19 Thread Manuel Buri
kings']=Booking.objects.filter( Q(organization_id=request.user.organization_id), *Q(booking_time__range= (start_date, end_date))*) Thank you so much for your help. Best wishes, Manuel Manuel Buri T: +41 79 933 01 11 M: manuel.b...@gmail.com W: www.manuelburi.com <http://manuelburi.com/?utm

Re: View / Query Set not showing with filter

2021-03-19 Thread Manuel Buri
{% endfor %} {% endfor %} What do you think? Thank you so much for your help ! Best wishes, Manuel Manuel Buri T: +41 79 933 01 11 M: manuel.b...@gmail.com W: www.manuelburi.com <http://manuelburi.com/?utm_source=gmail> On Fri, 19 Mar 2021 at 22:51, Thomas Lockha

Re: View / Query Set not showing with filter

2021-03-19 Thread Manuel Buri
ext) return render(request, 'overview/overview.html', context) haha sorry for not using pastebin before :D Thank you so much. Best wishes, Manuel Manuel Buri T: +41 79 933 01 11 M: manuel.b...@gmail.com W: www.manuelburi.com <http://manuelburi.com/?utm_source=gmail> On Fri,

Custom User Model

2021-04-03 Thread Manuel Buri
Hi, I have a custom user model (see below) with inheritance from AbstractBaseUser and PermissionMixin. Therefore I have not only the auth_group, auth_group_permissions and auth_permissions tables but also those for my custom user model called 'Account'. Currently I have the following problem:

Re: Custom User Model

2021-04-04 Thread Manuel Buri
stored in auth_group while the permission and user allocation is stored in users_account_groups as well as users_account_user_permissions... Is this normal? [image: Screenshot 2021-04-04 at 10.26.11.png] Best wishes, Manuel Manuel Buri T: +41 79 933 01 11 M: manuel.b...@gmail.com W

Do I really need Groups for permission management?

2021-04-11 Thread Manuel Buri
Hi, I would love to know more about the advantages / disadvantages of using groups for permission management. Currently my project uses Booleans for is_workspace_owner (True or False) and consequently does not allow to show certain links via template if-checks as well as some user_passes_test.

Celery + AWS SQS

2021-09-21 Thread Manuel Buri
Hi, I would like to know if I need to actively delete messages in the queue (AWS SQS) or if I can simply set up the asynchronous service e.g. like in this blogpost . Thank you very much for a short answer. Manuel