﻿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
8248	Built-in python function, help(), does not work on models with ForeignKey fields	lingrlongr		"If a model refers to a Site model, the help() function stops working, meaning functions, docstrings, etc don't print.

To reproduce:
{{{
$ django-admin.py startproject myproj
$ ./manage.py shell
>>> from django.contrib.sites.models import Site
>>> help(Site)
}}}

This will return correct functions, docstrings, etc...

Now create an app:
{{{
$ ./manage.py startapp myapp
}}}
Create a model:
{{{
from django.db import models
from django.contrib.sites.models import Site

class MyModel(models.Model):
    name = models.CharField(max_length=50)
    site = models.ForeignKey(Site)
}}}
Now try to view help for this either MyModel or Site:
{{{
$ ./manage.py shell
>>> from myapp.models import MyModel
>>> from django.contrib.sites.models import Site
>>> help(MyModel)
>>> help(Site)
}}}
Both calls will only show something similar to:
{{{
Help on class MyModel in module myproj.myapp.models:

MyModel = <class 'myproj.myapp.models.MyModel'>
(END)
}}}
Tested on SVN 8204 and 8313 - same results
"		closed	Core (Other)	dev		fixed	help ForeignKey foreign key	ironfroggy@…	Accepted	0	0	0	0	0	0
