Задать вопрос

Тел: +7 965 3737 888

435

Просмотров

1

Ответов

Autoload Django Models When Using ./manage.py shell

It's a pain to import all the Django models you want to use in the Python shell every time you start it. Here's how you can get IPython to autoload all your Django models for you every time you start the shell using ./manage.py shell.

Put the code in a .py file in the root of your project. Then tell IPython to load the script in ~/.ipython/ipythonrc in the "Python files to load and execute" section.

Вопрос полезен? Да0/Нет0
file_2316.py(130.0б)
None

Ответы (1):

Ответudfalkso:10.01.2008
Ответ полезен? Да0/Нет0

I've been dying for a solution to this, thanks!