8:32 AM
jackhum has quit
8:36 AM
Y04NN joined the channel
8:43 AM
Debnet joined the channel
8:43 AM
maks25 joined the channel
8:48 AM
eMyller has quit
8:50 AM
plfiorini joined the channel
8:51 AM
hipertracker joined the channel
8:57 AM
henwas has quit
8:58 AM
Haudegen joined the channel
9:02 AM
efkin joined the channel
9:03 AM
yacek19
even when logging through admin login form backend attribute isn't added to user object
9:06 AM
Ultcyber joined the channel
9:08 AM
eperzhand has quit
9:08 AM
eperzhand joined the channel
9:09 AM
unknown_soldier joined the channel
9:13 AM
sol1x joined the channel
9:13 AM
sol1x has quit
9:14 AM
apollo13
yacek19: why would it?
9:16 AM
user.backend is __only__ set during the login
9:16 AM
not for individual views, you have to use the data from the session there
9:16 AM
yacek19
+apollo13: okay, now it seems clear, thank you
9:21 AM
VikingHoarder joined the channel
9:22 AM
jef79m has quit
9:25 AM
john2x joined the channel
9:26 AM
niki_ joined the channel
9:27 AM
csotelo joined the channel
9:27 AM
jef79m joined the channel
9:28 AM
mar77i joined the channel
9:34 AM
pyface joined the channel
9:35 AM
john2x has quit
9:35 AM
savp joined the channel
9:37 AM
SimpleName has quit
9:38 AM
dardevelin has quit
9:38 AM
dardevelin joined the channel
9:41 AM
jnoob22 joined the channel
9:46 AM
dardevelin has quit
9:46 AM
dardevelin joined the channel
9:53 AM
hipertracker joined the channel
9:56 AM
efkin joined the channel
9:57 AM
phenicie joined the channel
10:11 AM
john2x joined the channel
10:12 AM
darkryder joined the channel
10:18 AM
pares joined the channel
10:18 AM
deduped joined the channel
10:20 AM
pares
10:21 AM
jtiai
pares: Foo.object.filter(Bar__isnull=False)
10:22 AM
Lauxley
pares: Foo.objects.(bar_set__isnull=False)
10:22 AM
pares
ok, thank you both
10:22 AM
tonythomas has quit
10:23 AM
Lauxley
pares: you can set a related_name on the fk to make reverse relationships easier
10:27 AM
Nizumzen joined the channel
10:32 AM
unknown_soldier has quit
10:36 AM
sjms has quit
10:37 AM
sjms joined the channel
10:38 AM
adsworth has quit
10:46 AM
maks25 has quit
10:47 AM
chicocvenancio_ joined the channel
10:48 AM
chicocvenancio_ is now known as chicocvenancio
10:48 AM
drodger has quit
10:48 AM
mar77i joined the channel
10:51 AM
tonythomas joined the channel
10:54 AM
Itkovian joined the channel
10:54 AM
drodger joined the channel
10:54 AM
Ultcyber has quit
10:55 AM
Troy1 joined the channel
10:58 AM
Or1on joined the channel
11:04 AM
sjdines has quit
11:06 AM
chicocvenancio has quit
11:06 AM
KnownSyntax has quit
11:08 AM
eperzhand has quit
11:13 AM
mucco joined the channel
11:13 AM
username_ joined the channel
11:17 AM
eperzhand joined the channel
11:17 AM
Y04NN has quit
11:18 AM
mar77i joined the channel
11:18 AM
username_ has quit
11:19 AM
eperzhand has quit
11:19 AM
eperzhand joined the channel
11:20 AM
Ergo joined the channel
11:22 AM
netheranthem joined the channel
11:27 AM
Ariel_Calzada joined the channel
11:29 AM
chicocvenancio joined the channel
11:30 AM
eperzhand has quit
11:38 AM
slav0nic joined the channel
11:39 AM
greg_f has quit
11:40 AM
chicocvenancio has quit
11:40 AM
chicocvenancio joined the channel
11:47 AM
pwrentch joined the channel
11:48 AM
inad922 joined the channel
11:49 AM
Y04NN joined the channel
11:49 AM
the_rat joined the channel
11:52 AM
trevortwining joined the channel
11:53 AM
hipertracker joined the channel
11:58 AM
csotelo has quit
11:59 AM
chrisw joined the channel
12:00 PM
Or1on has quit
12:02 PM
fission6 joined the channel
12:03 PM
phenicie has quit
12:13 PM
dbrgn joined the channel
12:13 PM
dbrgn
is there a field lookup like __contains that checks for a set intersection?
12:14 PM
ahadi joined the channel
12:16 PM
thinkt4nk joined the channel
12:16 PM
telamont joined the channel
12:18 PM
chrismay joined the channel
12:19 PM
savp has quit
12:19 PM
or, asked differently: a user is an owner of a house which is located in a city. I want a list of all cities where a certain user owns a house.
12:19 PM
how would I do that with the django ORM?
12:21 PM
Lauxley
dbrgn: Cities.objects.filter(house_set__owner=myOwnerInstance) ?
12:21 PM
mitaka has quit
12:22 PM
the_rat has quit
12:23 PM
pyface has quit
12:23 PM
dbrgn
Lauxley: oh, it's that simple... thanks :D
12:23 PM
I didn't know that I could filter by attribute on a set, but it seems obvious now.
12:23 PM
kloudi has quit
12:25 PM
casuallancelot joined the channel
12:26 PM
maks25 joined the channel
12:27 PM
Troy1 has quit
12:27 PM
MarkTheMark has quit
12:28 PM
hipertracker has quit
12:28 PM
veduardo joined the channel
12:29 PM
kloudi joined the channel
12:30 PM
aavrug has quit
12:30 PM
spacecadetbrown joined the channel
12:31 PM
efkin joined the channel
12:32 PM
fission6 has quit
12:32 PM
the_rat joined the channel
12:32 PM
tourdownunder joined the channel
12:32 PM
tourdownunder has quit
12:33 PM
casuallancelot has quit
12:33 PM
mar77i joined the channel
12:35 PM
Looney joined the channel
12:37 PM
joshuajonah joined the channel
12:39 PM
the_rat has quit
12:39 PM
Looney
Hello people, I have two applications which have different models. I am trying to import model X of app A in my app B models.py and model Y of app B in my app A
12:40 PM
I get cannot import model A error when I makemigrations
12:40 PM
The models are not related or dependent on each other
12:41 PM
chicocvenancio has quit
12:42 PM
the_rat joined the channel
12:44 PM
dbrgn
Looney: you can reference models by string to avoid circular dependencies.
12:44 PM
(e.g. in a foreignkey field)
12:45 PM
Looney
OK, but what if I'm extending the model?
12:45 PM
dbrgn
you can extend in one way, but what's the other relation?
12:46 PM
if X extends Y then Y won't extend X.
12:46 PM
Looney
models.ForeignKey('dashboard.models.Publisher') would be correct syntax if I import dashboard
12:46 PM
I'm extending one way only
12:46 PM
dbrgn
no, I think it's "dashboard.Publisher"
12:46 PM
casuallancelot joined the channel
12:46 PM
Looney
OK, let me check and report
12:47 PM
dbrgn
12:47 PM
adsworth joined the channel