argoneus: On my server, I have two copies of the source. That's usual.
argoneus
CapnKernel: how do you pass the env var?
oh, you are using nginx
CapnKernel
The settings.py for both is in version control, but at the bottom of settings.py, I'm loading local_settings.py. In local_settings, I put things like which DB gets used.
argoneus
yeah
but how do you tell nginx which one to load?
CapnKernel
argoneus: Remember that book I recommended? The local_settings trick is in there (along with lots of other stuff you will want to know real soon)
nginx doesn't know anything about Python or Django
argoneus
wait
local_settings isn't part of version control?
CapnKernel
nginx gets told to talk WSGI protocol on a particular unix domain socket
Correct
argoneus
doesn't that make deployment painful
CapnKernel
One reason is so that you can let other developers have access to the source, but they can't see the SECRET_KEY
bkuberek has quit
argoneus
well
what I wanted to do
CapnKernel
No. It's the only file in the whole system that's not in version control
argoneus
was pass SECRET_KEY and IS_PRODUCTION to the settings
and it will import either settings_dev or settings_prod based on that
CapnKernel
Yes. It's possible
argoneus
thing is, I read somewhere that if I SetEnv in apache, then the scripts can't see the env. vars
and I wanted someone to confirm
because the post is 3 years old
jeffisabelle joined the channel
nlh has quit
CapnKernel
argoneus: Back to what I was saying, nginx talks WSGI to a unix domain socket.
I have a program called uwsgi that listens on that socket. That's the daemon that runs python/django
Hello. I have a model whichs has a many to many field. Before the model is saved, I’d like to do some addtitional checks. Normally I’d add a contraint in postgresql but I have no idea how to do so using django’s ORM (because I can’t/shouldn’t access the database directly). I don’t want to add the check in the form because it can be bypassed in the admin, rest API, and using `myModel.objects.all().m2m.add(bad_relation)`.
josuebrunel has quit
jax joined the channel
ldgood has quit
Sir_Narwhal has quit
bluedreams has quit
areski has quit
dmitry_mikhaylov has quit
jax has quit
amizya joined the channel
aarose joined the channel
dray3 joined the channel
aarose has quit
Itkovian joined the channel
interweb has quit
dray3 has quit
Zost joined the channel
bkuberek joined the channel
neutralizer joined the channel
encod3 has quit
Zost
hi, I was wondering if there is a way to include stuff that acts like widgets in django.. So for instance, I have django-allauth installed, now I would like to display it's login form on different pages of my site. Is there a way to pack that form in a widtget or something and then just drop it on certain pages?
chachan joined the channel
Or how do you guys do that?
encod3 joined the channel
shredding has quit
Itkovian has quit
Ah, I think I found it.. googled reusable templates and there is some info
bearish joined the channel
chachan has quit
argoneus
argh
encod3 has quit
for some reason my website works with runserver, but doesn't with apache
is wsgi.py called when I do runserver?
ohhh
apache wasn't listening on the port
works now ._.
bearish has quit
kenbolton joined the channel
petraszd joined the channel
hoot joined the channel
uczekalla joined the channel
jordanmessina joined the channel
amizya has quit
petraszd
I am thinking about writing tests for django source code.
Does anyone know the link with official django source code coverage report?
Some kind of continious integration server or something?
iLoop joined the channel
iqualfragile has quit
KaczuH joined the channel
silverfix has quit
dmitry_mikhaylov joined the channel
pyface has quit
dray3 joined the channel
chachan joined the channel
bluedreams joined the channel
jordanmessina has quit
josuebrunel joined the channel
bluedreams has quit
tlux is now known as joes
joes is now known as Guest61055
Guest61055 is now known as tlux
fission6 joined the channel
Squarepy joined the channel
jordanmessina joined the channel
tlux has quit
tlux joined the channel
josuebrunel has quit
greg_f joined the channel
ojii has quit
iLoop has quit
dray3 has quit
jita joined the channel
jita
If I want to start reading Django source code, where should I start? I mean which module ?
Which bits are most interesting and important ones
Manyman_ has quit
iqualfragile joined the channel
shredding joined the channel
CapnKernel
jita: You could look for open bugs. If there's a bug in an area, that makes it seem important, I think.
faldridge has quit
faldridge joined the channel
bahamas joined the channel
tlux has quit
tlux joined the channel
jarshwah_ has quit
jita
CapnKernel: thanks, I started reading ModelBase Metaclass. Will look through the tickets too.