﻿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
31744	Pydoc support/helper	Sardorbek Imomaliev	nobody	"Currently pydoc doesn't work by default because it requires django requries `django.setup()` to be called. So to use it you need to provide some helper script like in this example https://stackoverflow.com/questions/24772805/python-documentation-for-django-views-generic-with-pydoc


{{{
#!python
import django
import pydoc
import os

os.environ['DJANGO_SETTINGS_MODULE'] = 'dummy.settings'
django.setup()
pydoc.cli()
}}}

Another issue(probably need to create separate for this one) is that when GDAL is not installed you can't use pydoc even after you have added helper script, because GDAL has to be setup properly on `import` and there is no way to make django skip this check. This also prevents running code analyzing tools like mypy on django without GDAL, which I don't think is required for running linters.

I don't know how many people are still using `pydoc`. But I think this should be supported because it is internal `python` documentation tool. How can I help with resolving this? Maybe django should provide management command for this?
"	Cleanup/optimization	closed	Core (Other)	3.0	Normal	wontfix			Unreviewed	0	0	0	0	0	0
