Prevent typos and other errors when assigning attributes to Django model instancesPrevent typos and other errors when assigning attributes to Django model instances.
Ever done the following?
>>> user = User.objects.get(pk=102) >>> user.superuser = True >>> user.save() # Argh, why is this user now not a superuser...
With this package:
>>> user = User.objects.get(pk=102) >>> user.superuser = True ... ValueError: Refusing to set unknown attribute 'superuser' on auth.User instance. (Did you misspell 'username', 'first_name', 'last_name', 'is_active', 'email', 'is_superuser', 'is_staff', 'last_login', 'password', 'id', 'date_joined')
If you are looking for a highly experienced full-stack Django developer with a track record of producing high-quality and maintaininable code, please get in touch.