Skip to content

Instantly share code, notes, and snippets.

@AWSomeHackers
Created July 31, 2011 08:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AWSomeHackers/1116615 to your computer and use it in GitHub Desktop.
Save AWSomeHackers/1116615 to your computer and use it in GitHub Desktop.
get client ip address in django
def my_view(request):
...
...
client_ip = request.META['REMOTE_ADDR']
#or client_ip = request.META['X_FORWARDED_FOR']
...
@kfengc27
Copy link

great

@ubercook
Copy link

ubercook commented Feb 9, 2023

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment