djangosnippets.org: Latest snippets tagged with 'internal_ips'http://djangosnippets.org/tags/internal_ips/2010-07-22T09:21:59.718453-05:00Internal view decorator
2010-07-22T09:21:59.718453-05:00gsakkishttp://djangosnippets.org/snippets/2120/<p>The <code>internal_view</code> decorator makes a view accessible only from <code>INTERNAL_IPS</code>. Handy for exposing internal APIs.</p>
Freely redistributableSupport IP ranges in INTERNAL_IPS
2010-01-09T18:28:11.151972-06:00jdunckhttp://djangosnippets.org/snippets/1862/<p>CIDR ( http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing ) is a well-known IP range syntax. This CIDR_LIST class can be used to make ranges of IPs considered "internal" for Django's debugging and security purposes. (Django only ever needs to do "ip in INTERNAL_IPS" so <strong>contains</strong> is sufficient for the purpose.)
</p>
<p>For example, to make localhost …</p>
Freely redistributable