That does indeed work, just remember you can only reload modules, not
individual classes you've imported from a module.
Mike
On 12 Jun 2008, at 09:52, Gregor Müllegger wrote:
>
> Maybe the builtin function ``reload`` might help you:
> http://docs.python.org/lib/built-in-funcs.html
>
> I have
Maybe the builtin function ``reload`` might help you:
http://docs.python.org/lib/built-in-funcs.html
I haven't tested it with django but it should work like that:
>>> from yourapp import models
>>> # Do stuff with your model
>>> # Change models sourcecode
>>> models = reload(models)
>>> # Do mor
Oops.
"For the changes to take effect, exit out of the Python shell and
enter it again with python manage.py shell. (This is the simplest way
to make code changes take effect.)"
>From http://www.djangobook.com/en/1.0/chapter05/
On Thu, Jun 12, 2008 at 1:01 PM, Gene Campbell <[EMAIL PROTECTED]>
I'm very new to Python and Django, I'm going through building some
models for the first time.
When I load the models in my shell like this
python manage.py shell
>>> from app.models import ModelClass
then make a change to the ModelClass in models.py
Now when back in the shell how do I reload th
4 matches
Mail list logo