Saturday, July 9, 2011

Find where a module is

Run python manage.py shell.
Import captcha.fields
help(captcha.fields) or captcha.__file__ or captcha.fields shown below
    In [3]: import captcha.fields
     
    In [4]: captcha.fields?
    Type:      module
    Base Class:     <type 'module'>
    String Form:    <module 'captcha.fields' from '/Users/jbalogh/dev/zamboni/vendor/src/django-recaptcha/captcha/fields.pyc'>
    Namespace:      Interactive
    File:      /Users/uname/dev/zamboni/vendor/src/django-recaptcha/captcha/fields.py
    Docstring:
        <no docstring> 

It's actually here: django-recaptcha already done before!!, not here. I wish I had know that the django-recaptcha existed before I did this.

No comments:

Post a Comment