Skip to content

Instantly share code, notes, and snippets.

@jefftriplett
Last active April 5, 2021 09:29
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jefftriplett/e87b36d750f94e48080a2be46e71dbe1 to your computer and use it in GitHub Desktop.
Save jefftriplett/e87b36d750f94e48080a2be46e71dbe1 to your computer and use it in GitHub Desktop.
Django Management Command to print a "Magic Link" for one-click log-in. This is nice for people who project switch or don't want to remember passwords.
@TimothyMalahy
Copy link

So do you run this command with arguments for the username of the user?

@jefftriplett
Copy link
Author

I don't, but I probably will going forward. It's optional so it's going to fetch the first user or which every you pass in with. python manage.py magic-link --user=admin

This is mostly for convenience.

@jefftriplett
Copy link
Author

Added to Django Snippets too: https://djangosnippets.org/snippets/10855/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment