This wasn't working in my case because further down the code I was
creating a new variable with the same name as the function.
Doing that I was effectively overwriting my own function.
And therefore did not have access anymore to it's __doc__ property.
Regards, Stefan
On Feb 27, 11:29 am, Ned B
Inside a function, the function is known by its own name. Just as you
can call a function recursively by name, you can access its properties
by name:
def myview(request):
""" My docstring """
help = myview.__doc__
--Ned.
motard wrote:
> Hi,
>
> Thanks for the reference.
> Ac
Hi,
Thanks for the reference.
Access to the __doc__ property of a function is always done by first
importing the function and then calling the property.
What if I want to include the docstring of a function in the context
this same function returns?
should I simply import the views module again
On Thu, Feb 26, 2009 at 7:23 AM, Stefan Tunsch wrote:
>
> Hi!
>
> I have a site that is starting to be used by a growing number of users,
> and I find myself in the need of creating some kind of user manual.
> My first thought has been to use the docstrings with which I'm
> documenting my code.
>
Hi!
I have a site that is starting to be used by a growing number of users,
and I find myself in the need of creating some kind of user manual.
My first thought has been to use the docstrings with which I'm
documenting my code.
I've seen that django comes with a Documentation option in the admi
5 matches
Mail list logo