Skip to content

Instantly share code, notes, and snippets.

@Geekfish
Last active May 1, 2018 14:37
Show Gist options
  • Save Geekfish/340b65c0eaae5719a6d90c67dc1fec53 to your computer and use it in GitHub Desktop.
Save Geekfish/340b65c0eaae5719a6d90c67dc1fec53 to your computer and use it in GitHub Desktop.
Useful commands

Show the SQL executed by a migration:

python manage.py sqlmigrate <appname> <migration no eg. 0001 or 0004>

Generate a signing key:

import random, string
''.join([random.SystemRandom().choice("{}{}{}".format(string.ascii_letters, string.digits, string.punctuation)) for i in range(50)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment