Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25710 closed Cleanup/optimization (fixed)

Clarify the docs about what INTERNAL_IPS does

Reported by: Marten Kenbeek Owned by: Alex Morozov
Component: Documentation Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The current documentation says:

A tuple of IP addresses, as strings, that:

  • See debug comments, when DEBUG is True
  • Receive X headers in admindocs if the XViewMiddleware is installed (see The Django admin documentation generator)

The documentation of DEBUG doesn't mention INTERNAL_IPS at all, and the documentation of the admindocs only briefly mentions it in the last line.

Change History (11)

comment:1 by Tim Graham, 9 years ago

Easy pickings: set
Summary: Document what INTERNAL_IPS doesClarify the docs about what INTERNAL_IPS does
Triage Stage: UnreviewedAccepted

There's also a usage in AdminEmailHandler that could be mentioned.

comment:2 by Alex Morozov, 9 years ago

Guys, could you please elaborate on what specifically must be documented?

INTERNAL_IPS is now used at three places (except tests):

  1. django.template.context_processors.debug to add SQL queries to context. Its docs mention the setting. Is it enough?
  2. django.contrib.admindocs.middleware.XViewMiddleware to add an X-View header. Docs mention the setting. Should we refactor documentation? I hardly can imagine what to add about the middleware itself.
  3. django.utils.log.AdminEmailHandler to prefix an email subject with an 'internal'/'EXTERNAL' marks. Should we mention the setting here?

As for the DEBUG documentation, it seems pretty complete to me, since this setting has no direct relation to the INTERNAL_IPS. Am I wrong?

comment:3 by Alex Morozov, 9 years ago

Owner: changed from nobody to Alex Morozov
Status: newassigned

comment:4 by Tim Graham, 9 years ago

Linking from the INTERNAL_IPS setting to where each of those features are discussed in more detail would be helpful.

comment:5 by Alex Morozov, 9 years ago

@timgraham, thank you. Do I understand correctly that the existing phrase "See debug comments, when DEBUG is True" is about the debug context processor?

comment:6 by Tim Graham, 9 years ago

Yes, I think so.

comment:7 by Alex Morozov, 9 years ago

Someone, please review my russian English.

comment:8 by Tim Graham, 9 years ago

Has patch: set

comment:9 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In 5abed86:

Fixed #25710 -- Clarified the docs about what INTERNAL_IPS does.

comment:10 by Tim Graham <timograham@…>, 9 years ago

In 361038ee:

[1.9.x] Fixed #25710 -- Clarified the docs about what INTERNAL_IPS does.

Backport of 5abed864ee1cd31a0b920768b4abe85b26b43a4d from master

comment:11 by Tim Graham <timograham@…>, 9 years ago

In b4aa38d:

[1.8.x] Fixed #25710 -- Clarified the docs about what INTERNAL_IPS does.

Backport of 5abed864ee1cd31a0b920768b4abe85b26b43a4d from master

Note: See TracTickets for help on using tickets.
Back to Top