New Django user: How do I return the server's IP address?
2,486 views
Skip to first unread message
dav...@gmail.com
unread,
Nov 21, 2008, 5:14:56 PM11/21/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Where can I get the Host server's IP address?
request.META['SERVER_NAME'] simply returns localhost instead of
whatever my ip address is
Thanks.
Karen Tracey
unread,
Nov 21, 2008, 6:14:52 PM11/21/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Your machine likely has more than one IP address: one for each network interface, including the local loopback interface, so usually at least two when actually connected to a network. Which one do you want?
More importantly -- what is the real problem you are trying to solve? I have a feeling you are not asking the right question to solve it.
Karen
Steve Holden
unread,
Nov 21, 2008, 6:15:35 PM11/21/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message