$ python manage.py shell
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from mysite.models import *
>>> help(Merchant)
Help on class Merchant in module mysite.models:
Merchant = <class 'src.mysite.models.Merchant'>
but this isn't the doc string I have for this class at all and isn't
what you normally get from pydoc. I try a few more of the classes with
the same result. So I copy one of those classes to a new class in the
same module (just adding the number 2 to the name) and it works
perfectly for that class. Obviously something somewhere else is
different but what?
Looks like this is the default result for Model subclasses. Possibly
related to the way we create them (using a metaclass). Feel free to work
out a patch in django/db/models/base.py (in the ModelBase class,
probably) if you want to fix this. It would probably be useful.
Otherwise, might be worth opening a ticket in case somebody else is
looking for something to do.
> but this isn't the doc string I have for this class at all and isn't
> what you normally get from pydoc. I try a few more of the classes with
> the same result. So I copy one of those classes to a new class in the
> same module (just adding the number 2 to the name) and it works
> perfectly for that class. Obviously something somewhere else is
> different but what?
Given the complete lack of example code you've provided, we have no way
of telling.
Regards,
Malcolm
--
Despite the cost of living, have you noticed how popular it remains?
http://www.pointy-stick.com/blog/
I've seen it happen as well, always on model classes. I need to check
a newforms form and see if the same happens to them.
--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."
On Jun 28, 12:31 am, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
the only reason I didn't provide an example is that it seemed
pointless given that you can copy the exact text of a class and change
one character of the class name and that class works.