Click "New..." then find the python binary for your virtualenv.
Yes.
b0nn
it took me an age to find a decent image upload place
theology
like, User.objects.all()[0] is always the first superuser for all of my projects FunkyBob
cebor has quit
FunkyBob
theology: pure luck
theology
oh
cebor joined the channel
FunkyBob, thanks for the info man, was really confused
FunkyBob
np
cebor has quit
b0nn
do I have to load each variable one at a time?
cebor joined the channel
FunkyBob
theology: sorting takes time/work... so don't ask the DB to do it unless you need it
b0nn
or can I bulk load them?
hamub has quit
theology
FunkyBob, right
FunkyBob
b0nn: this is why I like envdir
transit
I've never had to do more than a couple...don't know if there's a way to bulk-load them.
b0nn
FunkyBob: I've never done this before, so I have no idea what's easiest
FunkyBob
b0nn: this is also why I wrote the env tool in django-classy-settings to have a default :)
b0nn
transit, ok I'll one by one them
adu joined the channel
transit: how do I run the export commands?
transit
Example?
b0nn
export DATABASE_URL
franklyrosalind has quit
transit
You wouldn't run them, these environment variables will just be set before the interpreter gets spun up.
FunkyBob
I think I just learned something new about descriptors
transit
b0nn: I think you'll have to give a value to any vars that are purely 'export myvar'.
b0nn
ok, how do I run the second source command
which is a bash script that sets up the virtual pythonhome (etc)
transit
The second source command is effectively set up to run automatically when you choose the python binary inside it.
(inside the virtualenv)
moldy
``source /my/venv/bin/activate; python;`` is more or less the same as ``/my/venv/bin/python``
transit
_what moldy said_
moldy
so if you point eclipse that /my/venv/bin/python, that should mean you're using the virtualenv
until something goes wrong ;)
b0nn
that's not what I want
moldy
what's the problem with it?
b0nn
it can't find the modules
moldy
it should. if it doesn't, find out why.
you may need to add your project base dir onto the path as well
b0nn
so, to run it from commandline I go.. ../env/bin/activate; then make runserver
moldy
or you just do /env/bin/python manage.py runserver
b0nn
no
not at all
moldy
if that throws an error, show us the full traceback
b0nn
which one?????
dro32 has quit
moldy
the one you want help with? ;p
b0nn
transit: How do I run the ../env/bin/activate?
moldy
`activate` is not dark magic. it all it does is setup your path such that you can type `python` insead of `/env/bin/python`. stop focussing on `activate`, show us what you're droing and the full traceback
b0nn
moldy, no.
Seaninho joined the channel
moldy
ok, i'm out. good luck.
transit
You wouldn't, python myscript will run myscript in the virtualenv that you set up with the custom python interpreter.
b0nn
step away from the kb
transit
What does `make runserver` do?
b0nn
transit: in bash I would run source ../env/bin/activate
ok, so the problem is you're one step ahead
BEFORE I can run the runserver, I need to activate the environment
moldy
you don't
transit
you don't
jessamynsmith joined the channel
b0nn
then why does it error
moldy
activating the environment is *always* optional
show us the error...
exaroth joined the channel
b0nn
telling me the enviromnment isn't setup
transit
What are you running that tells you the environment isn't set up?
b0nn
moldy: ModuleNotFoundError: No module found 'foo.bar'