1.8, django-extensions, ipython notebook no models?

47 views
Skip to first unread message

Lachlan Musicman

unread,
Apr 28, 2015, 9:15:42 PM4/28/15
to django...@googlegroups.com
Hi,

Using Django 1.8, django-extensions 1.5.2, ipython 3.1.0 in a virtualenv

I can't get access to my models at all?

All of the following fail:

d = Document()

from models import *
from app.models import *
from proj.app.models import *

i am loading from within venv with

$ ./manage.py shell_plus --notebook

My settings are:

IPYTHON_ARGUMENTS = [
    '--ext', 'django_extensions.management.notebook_extension',
    '--debug',
]


My dir layout is:

.
├── fraser
│   ├── __init__.py
│   ├── settings
│   │   ├── base.py
│   │   ├── dev.py
│   │   └── __init__.py
│   ├── urls.py
│   └── wsgi.py
├── manage.py
├── texts
│   ├── admin.py
│   ├── __init__.py
│   ├── models.py
│   ├── tests.py
│   └── views.py
└── utils
    └── archive_import.ipynb

Any tips greatly appreciated.

cheers
L.


------
let's build quiet armies friends, let's march on their glass towers...let's build fallen cathedrals and make impractical plans

- GYBE

Lachlan Musicman

unread,
Apr 28, 2015, 9:21:48 PM4/28/15
to django...@googlegroups.com
Running

$ ./manage.py shell_plus --ipython

works fine - all models are imported

L.

------
let's build quiet armies friends, let's march on their glass towers...let's build fallen cathedrals and make impractical plans

- GYBE

Lachlan Musicman

unread,
Apr 28, 2015, 9:26:50 PM4/28/15
to django...@googlegroups.com
I have added

NOTEBOOK_ARGUMENTS = [
    '--ip=0.0.0.0',
    '--port=8989',
]

to my base.py

and the notebook launches on port 8989 as expected, so the settings are being read properly. Hmmm.

------
let's build quiet armies friends, let's march on their glass towers...let's build fallen cathedrals and make impractical plans

- GYBE

Reply all
Reply to author
Forward
0 new messages