﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33536	Running help() against django.db.models.PositiveIntegerField results in error	Brenden Hyde	nobody	"**Issue Description:**

As a Django user, I would like to read built-in docstrings for Django classes without having an existing Django project.

When creating a new Django project, it can be helpful to read the built-in docstrings for each class in a package before beginning. For example, if I have never used django.db.models.PositiveIntegerField and want to know what the ""null"" or ""blank"" kwargs do, I can open a Python or IPython REPL and type the following:

{{{
from django.db import models
help(models.PositiveIntegerField)
}}}

The above, in theory, should print the help doc for the PositiveIntegerField class. However, the current state of things causes a traceback instead:

{{{
ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
}}}

According to the Django [https://docs.djangoproject.com/en/4.0/topics/settings/#envvar-DJANGO_SETTINGS_MODULE/ docs], this issue is caused by not telling Django where your settings come from. However, if a user is just trying to read generic documentation for a given class, I don't think they should have to implement a concrete settings file first. Ideally, a user should be able to read these docs locally without creating anything at all. I realize that online documentation through the Django website is available, but it would be nice to be able to read the docstrings in a REPL.


**Steps to Reproduce**
1. Create a new virtual environment (I use pipenv, but any should work)
2. Install django~=4.0.0 and ipython to your virtualenv
3. open the ipython REPL by running ""ipython"" from the command line
4. In the REPL, run the following 2 lines of code:

{{{
from django.db import models
help(models.PositiveIntegerField)
}}}
5. The above should result in a traceback ending with this error message:

{{{
ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
}}}
"	Bug	closed	Database layer (models, ORM)	4.0	Normal	wontfix			Unreviewed	0	0	0	0	0	0
