I'm working on a django project, how can i get my own public ip address without using any external websites, or using python standard library. I tried socket.gethostbyname(socket.gethostname()) which returns 127.0.0.1. As my project is hosted on different servers i want to configure my settings.py settings according to external IP. Any help.??
Get HOST_ADDR in python without using external resource or webiste
87 Views Asked by BHushan Rathod At
0
There are 0 best solutions below
Related Questions in PYTHON-3.X
- Update a text file with ( new words+ \n ) after the words is appended into a list
- Kivy - Create new widget and set its position and size
- TypeError: encoding or errors without a string argument
- How to print varible name in python
- PyQt, Python 3: Lambda slot assigning signal argument to a variable?
- How to write data to stdin of the first process in a Python shell pipeline?
- pygame.draw.circle, still draws a square
- Duplicate Frames Created When Calling a Function in a Tkinter Application
- Python TypeError: can only concatenate tuple (not "int") to tuple
- recursively editing member variable: All instances have same value
- missing 1 required positional argument: 'key'
- How do I fix this sorting error?
- Dictionary values missing
- Why does opening a file in two different encodings work as expected?
- Binary bit flip generator in python
Related Questions in SOCKETS
- Drawing with ncurses, sockets and fork
- UDP sockets in C not working
- How can I send multiple objects over one socket in java?
- psuedo TCP multicast with os.dup2() in python?
- My get request for http is very slow
- Nodejs connect mysql socket to another host?
- HttpRequestContext vs HttpContext
- Spring based client server communication without network
- Java does not accept 2 methods with same name
- Retrieve Data From EOC(Eithernet Over coxial) device
- Ping a server without freezing the Thread
- C sockets: Exit client after all data is received
- What is the best way to send XML converted to a byte array over TCP, then translate the response back to readable XML?
- C# Winform to Connect to Device Using IP
- Java Restart a Socket
Related Questions in DJANGO-REST-FRAMEWORK
- CORS in ionic app and django
- DjangoRestFramework Class Serializers missing "Meta" attribute?
- django rest framework - token authentication logout
- Django Rest Framework + React + Reflux: Can't GET new objects
- Is it possible to restrict url access from application only in Django REST
- Using QHttpMultiPart with QHttpPart Binary and Form Data
- django rest framework search filter all fields
- How to install python django rest framework on fedora 21 with yum?
- Django REST : Making a custom serializer return proper error message
- Why `create()` method of django rest framework serializer return a value?
- Automatically add all model fields to django rest serializer
- django rest framework - adding to views.obtain_auth_token
- How to deserialize nested objects with Django Rest Framework
- Django REST Framework - Update object with FK to a model with unique field
- Django user login through api
Related Questions in DJANGO-SETTINGS
- Only 'Title' menu while creating new page. Install Wagtail
- No such table as django_site
- Serving static files when in deployment mode with debug = false
- upload image using filerImageField
- django login required for the entire site not working
- Is there a function for generating settings.SECRET_KEY in django?
- Django Python - No connection could be made because the target machine actively refused it
- High response time when setting value for Django settings module inside a middleware
- Django images not loading even after using --insecure
- MySQL: django.db.utils.OperationalError: (1698, "Access denied for user 'root'@'localhost'") with correct username and pw
- AUTH_USER_MODEL refers to model that has not been installed
- django media_root not working
- django import a variable from server specific settings file
- Applications in subfolder in 1.7
- Django Gunicorn ImportError: No module named django.core.wsgi
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?