On 1/25/07, Tom Smith <[EMAIL PROTECTED]> wrote:
...
> from whatever.models import *
> site = Site.objects.all()[0]
> site.gsearch("fields")
>
> .... now at this point, if i get an error, because I have used "from
> xxx import yyy" ... I can't reload x or y... which means I have to

Well, there are a number of things going on here.

One is that site is an object, while g is a module-- reload doesn't
affect all objects, of course.

Another is that reload() only reloads the given module, when sometimes
you've made changes in modules that the given module depends on.

IPython will ease the pain on both.  %cpaste allows you to paste in
blocks of code, and dreload() recursively reloads modules which the
given module depends on.  %cpaste is new in version 0.72; some nix
distributions are still on earlier versions.

Django's shell command uses ipython if it's available.  :)

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to