python - Django: Get remote IP address inside settings.py -


I get debug ( DEBUG = True local host. How do I get user IP address in settings.py Do I want something like this to work for:

debugging at # localhost only if user_ip = '127.0.0.1': DEBUG = true else: DEBUG = False

How do I enter a user IP address inside the settings.py file inside the user_ip variable?

Probably enough to assign some internal_ips to you:


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -