Last active
August 28, 2016 07:44
-
-
Save j-iNFINITE/72686688e357c915fb9e to your computer and use it in GitHub Desktop.
Django 相关
This file contains 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
#初始工程 | |
django-admin.py startproject tango_with_django_project | |
manage.py startapp rango | |
#启动测试服务器 | |
manage.py runserver | |
#获取IP | |
if request.META.has_key('HTTP_X_FORWARDED_FOR'): | |
ip = request.META['HTTP_X_FORWARDED_FOR'] | |
else: | |
ip = request.META['REMOTE_ADDR'] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment