如何为django-debug-toolbar正确设置内部ip [英] How to correctly set up internal ip for django-debug-toolbar

查看:113
本文介绍了如何为django-debug-toolbar正确设置内部ip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我第一次在google cloud computing中编辑setting.py文件,请原谅我这个愚蠢的问题...

First time i'm editing setting.py file in google cloud computing please forgive me for this silly Question ...

我想运行django-debug-toolbar,并按照该教程中的每个步骤进行操作.我想要的是仅在(our office)中可见的工具栏.

I wanted to run django-debug-toolbar and followed every step in that tutorial. And the thing i want is the tool bar to be visible in (our office) only.

所以我像INTERNAL_IPS = ('182.74.xx.xx',)一样将我们的public address放入INTERNAL_IPS中,并且我做了restart运行服务器.但工具栏不可见.如果更改回127.0.0.1,则工具栏再次可见

So i just put our public address into INTERNAL_IPS like INTERNAL_IPS = ('182.74.xx.xx',) and i did restart run server. but the tool bar not visible. If changed back to 127.0.0.1 then tool bar visible again

推荐答案

应该可以.只需restart并确保重新编译所有内容.如果生产服务器在nginx后面运行,请确保也重新启动...

It's should work. Just restart and make sure recompile all the things. If production server running behind nginx make sure restart that too...

如果要检查,只需将内部Ip地址替换为其他Ip address,然后进行确认.

And if you want to check just replace your internal Ip address with different Ip address then confirm it.

这篇关于如何为django-debug-toolbar正确设置内部ip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆