16:40 PM
frege joined the channel
16:40 PM
kininarimasu
I find it daunting because i've too re import and get bunch of objects when reopening the shell
16:41 PM
frege
is there a problem with the name account? I'm using 'account' as the name of one of my apps
16:41 PM
now I have weird import problems
16:41 PM
ubuntu_aze has quit
16:41 PM
roygbiv joined the channel
16:41 PM
joshuajonah
frege: What weird inport issues?
16:42 PM
josuebrunel joined the channel
16:42 PM
frege
from account.api.models import Account ImportError: No module named api.models
16:43 PM
I added the app name to INSTALLED_APPS
16:43 PM
brat197 joined the channel
16:44 PM
joshuajonah
frege: do you have something else called "account" in your site-packages?
16:44 PM
kyheo has quit
16:45 PM
frege
no
16:45 PM
16:45 PM
socketubs has quit
16:45 PM
bryan8392 joined the channel
16:46 PM
iivvoo
or an account.py somewhere
16:46 PM
joshuajonah
frege: that's everything in your site-packages folder?
16:46 PM
frege
ya
16:46 PM
kyheo joined the channel
16:47 PM
Leeds has quit
16:47 PM
joshuajonah
what about egg packages? Can you just look inside your env packages folder?
16:48 PM
Your editor might not be right
16:49 PM
kyheo has quit
16:50 PM
socketubs joined the channel
16:50 PM
michalmo has quit
16:51 PM
tbaxter joined the channel
16:51 PM
josuebrunel has quit
16:51 PM
cyberspace- has quit
16:51 PM
LeaChim has quit
16:51 PM
frege
joshuajonah: I fixed it by renaming the app from 'account' to 'accounts'
16:51 PM
!
16:52 PM
rando305
i've got a simple method defined in the admin class of my model. it returns bool( value). Yet it doesn't display like my other boolean fields. Is there a way to do that?
16:52 PM
frege
16:52 PM
alyphen has quit
16:52 PM
Andy80 has quit
16:53 PM
samuel joined the channel
16:53 PM
alyphen joined the channel
16:53 PM
slav0nic joined the channel
16:53 PM
cyberspace- joined the channel
16:53 PM
Silvering joined the channel
16:53 PM
joshuajonah
frege: that's just a warning
16:53 PM
rserro has quit
16:54 PM
kyheo joined the channel
16:54 PM
Andy80 joined the channel
16:54 PM
samuel
hi guys, anyone know what was the preferred pastebin for the channel?
16:54 PM
dpaste?
16:54 PM
tbaxter
dpaste is popular.
16:54 PM
samuel
as in the topic?
16:54 PM
tbaxter
not pastebin, basically.
16:55 PM
samuel
ok thanks
16:55 PM
you know why?
16:55 PM
Silvering has quit
16:55 PM
Silvering joined the channel
16:56 PM
atlasloewenherz joined the channel
16:56 PM
why we dont like pastebin now?
16:56 PM
elastix has quit
16:57 PM
solidvance
it's bloated
16:57 PM
samuel
ah ok then
16:57 PM
AlexRussia joined the channel
16:57 PM
joshuajonah
becaus it's covered in ads and complians about using an ad blocker. Also doesn't have django html highlighting
16:58 PM
scipy53
joshuajonah, I figured it out, thanks again!
16:58 PM
alyphen has quit
16:58 PM
slav0nic has quit
16:58 PM
nullie joined the channel
16:58 PM
samuel
can someone help with this please?
16:58 PM
16:58 PM
metastableB joined the channel
16:59 PM
I want the limit_choices_to to only include all quotes that do not have an order in orders
16:59 PM
is that possible?
16:59 PM
frege
joshuajonah: how do I fix that though?
16:59 PM
alyphen joined the channel
16:59 PM
slav0nic joined the channel
16:59 PM
samuel
not sure about the filter
16:59 PM
joshuajonah
samuel: do it in __init__
16:59 PM
samuel
???
16:59 PM
joshuajonah
frege: go look at the django 1.10 docs
17:00 PM
frege
17:00 PM
geetar joined the channel
17:00 PM
AlexRussia
Hello! Could somebody help me undersand how can I reference from my own model to django.contrib.auth.models.User?
17:00 PM
josuebrunel joined the channel
17:00 PM
especially if I have two fields in model which reference to the model
17:00 PM
the user model*
17:01 PM
kininarimasu has quit
17:01 PM
LeaChim joined the channel
17:01 PM
atlasloewenherz has quit
17:01 PM
samuel
AlexRussia AUTH_USER_MODEL, and AUTHENTICATION_BACKENDS in your settings
17:02 PM
17:03 PM
Meow-J joined the channel
17:03 PM
softinio
17:03 PM
tbaxter has quit
17:04 PM
softinio has left the channel
17:04 PM
samuel
softinio thanks im looking at it now
17:04 PM
softinio joined the channel
17:06 PM
oaulakh has quit
17:06 PM
Bryson joined the channel
17:07 PM
socketubs has quit
17:08 PM
AlexRussia
samuel: do you mean I must reference to the settings instead of real classes?
17:09 PM
samuel
you can extend the auth_user_model if you want
17:09 PM
thats wha you want?
17:09 PM
AlexRussia
samuel: I just want have reference inside my model to an User
17:09 PM
samuel: just see
17:09 PM
samuel: model is representing a game field
17:09 PM
samuel: which have a 2 players
17:09 PM
samuel: which are users ;)
17:10 PM
zersiax has quit
17:10 PM
frege
how do I print all the available urls from django server when I run python django runserver?
17:10 PM
dodobrain has quit
17:10 PM
joshuajonah
user = models.ForeignKey('auth.User')
17:10 PM
canton has quit
17:10 PM
user = models.ManyToManyField('auth.User')
17:10 PM
AlexRussia
joshuajonah: why manytomany?
17:10 PM
finster has left the channel
17:11 PM
joshuajonah
If you want multi0ple users per game.
17:11 PM
AlexRussia
joshuajonah: just only two
17:11 PM
joshuajonah: left and right
17:12 PM
17:12 PM
slav0nic has quit
17:12 PM
alyphen has quit
17:12 PM
cyberspace- has quit
17:14 PM
alyphen joined the channel
17:15 PM
cyberspace- joined the channel
17:16 PM
knbk
AlexRussia: you need to add a unique related_name to each ForeignKey
17:16 PM
AlexRussia
knbk: does that mean so I can reference from User to games where he's on left OR right side?
17:16 PM
knbk
frege: I believe django-extensions provides that feature
17:17 PM
AlexRussia
17:17 PM
mvt has quit
17:17 PM
josuebrunel1 joined the channel
17:18 PM
knbk
AlexRussia: only with SquareField.objects.filter(Q(left_player=user) | Q(right_player=user))
17:18 PM
AlexRussia
knbk: oh, lol, it works, as I can see
17:18 PM
knbk: what gives a related_name?
17:18 PM
karanlyons joined the channel
17:18 PM
josuebrunel1 is now known as josuebrunel
17:18 PM
alyphen has quit
17:18 PM
knbk
what do you mean?
17:19 PM
mvt joined the channel
17:19 PM
AlexRussia
knbk: I mean, related_name property set name of field with set of SquareFields in User manager/
17:19 PM
?
17:19 PM
knbk: just I am a bit didn't understand difference(why FK should have different releated names)
17:20 PM
knbk
AlexRussia: a related_name adds a property only for the reverse of that specific FK
17:20 PM
cyberspace- has quit
17:21 PM
cyberspace- joined the channel
17:21 PM
so if you have left_player=ForeignKey(..., related_name='left_games'), it won't contain the SquareFields where user is the right field
17:21 PM
s/right field/right player/
17:21 PM
AlexRussia
knbk: but can I merge?
17:21 PM
knbk: I mean, get games where user on left or right side?
17:21 PM
ASonOfGod has quit
17:22 PM
knbk: as set
17:22 PM
knbk: I mean, manager