Got Pdb working (though still want to get django_extensions going) and
here is my problem again - how do I display an object.  It's fine if I
know what the attribute are, but how do I tell??????

> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/db/models/fields/files.py(187)pre_save()
-> file = super(FileField, self).pre_save(model_instance, add)
(Pdb) add
False
(Pdb) self
<django.db.models.fields.files.ImageField object at 0xe5e510>
(Pdb) self.name
'pic1'
(Pdb) model_instance
<Car: Car object>
(Pdb) import pprint
(Pdb) pprint.pprint(model_instance)
<Car: Car object>
(Pdb) model_instance.pic1
<ImageFieldFile: None>
(Pdb)

What else is model_instance holding - I really need to know to try and
work out why my custom widget isn't working, otherwise I'm going to
have to post yet another problem to this user groups, and I'm getting
a bit emabarresed at the number of posts I'm making :~)

On Feb 11, 9:22 pm, phoebebright <phoebebright...@gmail.com> wrote:
> OK.  Installed django extentions and can see the extra commands when I
> type python manage.py help but there seems no difference in the
> traceback screen?  Have tried putting both django_extensions and just
> extensions in the INSTALLED_APPS area, and installed Werkzeug and
> watched Eric's excellant Intro.   Have I missed something?
>
> Phoebe.
>
> On Feb 11, 8:45 pm, Lee Braiden <fallibledra...@gmail.com> wrote:
>
> > 2009/2/11 Karen Tracey <kmtra...@gmail.com>:
>
> > > On Wed, Feb 11, 2009 at 3:01 PM, phoebebright <phoebebright...@gmail.com>
> > > wrote:
>
> > >> I need to see the contents of some objects that are passed as
> > >> parameters into a function.  I can stop the function (assert false)
> > >> and look at the traceback, but it doesn't tell me the contents of the
> > >> objects.  I have tried print statemnts, pickle and pprint.  I don't
> > >> want to stray into the methods of debugging as in this thread
>
> > >>http://groups.google.com/group/django-users/browse_thread/thread/7ba4...
> > >> - deadline is tight.  I just want to output the contents of an
> > >> object!
>
> > Install django_extensions (along with werkzeug), and it'll give you an
> > interactive debugger, right in your browser.  You'll then be able to
> > assert, and examine everything just by typing its name.  Technically,
> > it's debugging, but you won't be able to tell that really :)
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to