Skip to content

Instantly share code, notes, and snippets.

@toxinu
Created September 23, 2020 16:37
Show Gist options
  • Save toxinu/e67c5319355419ea070a753b20f86897 to your computer and use it in GitHub Desktop.
Save toxinu/e67c5319355419ea070a753b20f86897 to your computer and use it in GitHub Desktop.
blog/pip-installable-django-project
# src/my_awesome_project/runner/commands/version.py
import click
import django
@click.command()
def version():
"Show Django version."
click.echo('Django {}'.format(django.__version__))
{{< /highlight >}}
Then you'll be able to do:
{{< highlight bash >}}
$ my-awesome-project version
Django 1.10.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment