Skip to content

Instantly share code, notes, and snippets.

@rdhyee
Created June 24, 2014 21:06
Show Gist options
  • Save rdhyee/59e6034af68c061bca71 to your computer and use it in GitHub Desktop.
Save rdhyee/59e6034af68c061bca71 to your computer and use it in GitHub Desktop.
One of these things that I couldn't remember how to do when away from Django for a while.
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": "",
"signature": "sha256:6f3f328d74cbe57a2dc6c4bba3677586d7c69f46a1d9902dee915607b842713f"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"from django.contrib.sites.models import Site\n",
"Site.objects.get_current().domain"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 3,
"text": [
"u'localhost:8000'"
]
}
],
"prompt_number": 3
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment