Eine Ansicht, die viel zu wenig geäußert wird. Aber von den meisten von uns sicher nachvollzogen. Besonders Montags.
Author: Andreas
-
Berlin
Alles ziemlich im Nebel.
-
168 AWS Services in 2 Minutes
Forrest Brazeal took a deep breath and sang 168 AWS Services. In two minutes. I’m not sure what’s more impressive. Mentioning all those in a song or the fact AWS offers so many (and more) distinct services.
-
Kundenkarte scannen
Kundenkarte scannen: Natürlich ist man darauf nicht vorbereitet, wenn man von irgendeiner App eine Notification bekommt. Schließlich ist die Abholnummer auch in der DHL App zu finden.
Nur die Kundenkarte, die ist daheim, in der Schreibtischschublade. Immer. Mein Verständnis von Digitalisierung geht an der Stelle geringfügig weiter. Solche Kunden Karten hat der normale Kunde in einer Fülle, dass er damit Karten spielen kann. Kein Mensch braucht mehr von diesen Kundenkarten. Alleine schon wegen den ganzen Plastik aus dem diese Karten hergestellt werden.
Währenddessen kann man die Bahncard 50 in seiner bahn.de-app speichern. Was, wie ich finde, einen kleinen Applaus wert ist.
-
Little One
Look who came visit! Glad the iPhone camera was good enough to capture you on my diary. Unfortunately, there’s no scale, but it was really tiny, maybe 1mm.
-
Toad
Bügelperlen entspannen. Bügelperlen sind mein neues Zen.
-
usermanagement with django allauth.
usermanagement with django allauth: It is common for bots to register with a website. Often enough there are users instances in the user base that have registered at some point but did not verify their email-address.
Fortunately enough, for users of django and the excellent django-allauth, there are easy ways to manage these users.
First, the django ORM comes with an easy way to identify these users that did not verify their primary email:
>>> from django.contrib.auth.models import User >>> unverified_users = User.objects.filter(emailaddress__verified=False, emailaddress__primary=True)
The ORM allows simple filtering for unverified email addresses through a “relationship lookup”, that is emailaddress__verified=False in the above snippet. Of course, you may want to limit users for which the primary email address is unverified. That is the 2nd keyword argument to .filter() here: emailaddress__primary=True. The filter operator ANDs together these two conditions.
To identify users that not only have unverified, primary email addresses, but also appear to be idle, you may limit users that didn’t login through .exclude():
>> import datetime >> old_unverified_users = unverified_users.exclude(last_login__gt=datetime.date(2020, 1, 1))
Will only give you users that have logged in after Jan 1st, 2020. Of course, the argument to last_login can be modified to match your requirements.
Finally, you may chose to either email these users and re-ask to verify their email. That would be a separate task, though. In our case, we simply delete these, since they are obviously not interessted in using our site:
old_unverified_users.delete()