Last active
October 12, 2015 13:27
-
-
Save bergantine/4033360 to your computer and use it in GitHub Desktop.
Django Template localhost switch. #django #djangotemplate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% ifequal request.get_host '127.0.0.1:8000' %} | |
| {# Include something only to be executed on "localhost" here. #} | |
| {% else %} | |
| {# Include something only to be executed in production here. #} | |
| {% endifequal %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment