What is currently the best way / proper way to do web sockets with django. I spent a while looking into it but it seems everyone has a different approach, with many being out of date.
audio has quit
gopar joined the channel
nikojn joined the channel
Cavedude has quit
an0891
diegoviola, move as much as you can out of the elif's and put it at the bottom lol
diegoviola
lol ok
an0891
i don't know anything about websockets
diegoviola
thanks
javawolfpack has quit
stickperson joined the channel
the_rat joined the channel
Awmusic12635
darn
Debnet has quit
vinny3 has quit
an0891
maybe there's a django library for it
vinny3 joined the channel
Awmusic12635
I saw one or two, but they were horribly out of date.
saw one implementation that looked perfect in python, but it was for flask
the_rat has quit
an0891
nothing for straight python? not everything has to be django-esque
moldy
Awmusic12635: from what i hear, channels
this_is_tom joined the channel
bl0bus4r joined the channel
haber has quit
Awmusic12635
hm
moldy ill look into it thanks
diegoviola
an0891: should I move it into another function?
jessamynsmith joined the channel
I tried moving that code to the bottom but then I get "rotated is used before referencing it", etc
not sure how to deal with that
an0891
rotated is the one thing that looks unique
prob can keep that in the exif
but the output, rotated.save, output.seek and thumb_file can prob be moved out of the elifs
is it your code?
diegoviola
yep
I'm new to python though
an0891
give me a min and i'll show you what i mean
diegoviola
rotated has differen values
different
thanks
jessamynsmith has quit
glookoza
what are, in your experience, good front ends that can be integrated with django? I'd like something dynamic and stylish but my knowledge in this is very limited... I've heard of jQuery but I'm not sure on support from the browsers if it's like a great option for relatively new projects
Awmusic12635
glookoza jQuery is remarkably compatible with a wide range of browsers. But it isn't necessarily a front end. Just makes javascript a ton easier
glookoza
mhh.. and does that help me to get thiings like modals, and have dinamycity? like.. display a set of records, and the user can click on one to be able to edit it?
(I'm a HW guy trying to understand these things)
mingrammer joined the channel
this_is_tom has quit
therue joined the channel
READ10 joined the channel
stickperson has quit
an0891
diegoviola, i dunno, maybe something like this? http://dpaste.com/21FFMK8 only saves like 6 lines but there's less duplication
mingrammer has quit
cyphase joined the channel
diegoviola
cool
an0891
if x=None
how do i word it
ironfroggy joined the channel
Leeds joined the channel
"if x" is the same as "if x != None"
cnk has quit
JZA joined the channel
cnk joined the channel
this_is_tom joined the channel
glookoza, you're pretty much going to have to deal with html/css
and javascript / jquery lol
fun will occur
ironfroggy joined the channel
diegoviola
an0891: that looks better indeed, thanks
glookoza
an0891: thank you, so I won't waste my time if I learn jQuery then
an0891
no def not, jQuery is just an easier way to do javascript, gonna have to include jQuery on every page you use it on though
diegoviola
an0891: that's not quite working the same
an0891
ya you might have to tweak it lol, more of a rough idea
diegoviola
yep
I might do that later
lol
an0891: thanks for your help though ;)
an0891
np, you'll figure it out
tulioz has quit
diegoviola
:)
that's one of the "code under pressure and just make it work and make it nice later"
for me
rando305
I'm using a many-to-many field (equipment) in an exercise table. The foreign key table has two fields name, and props (which is boolean). Some of the equipmetn used is a prop. Can't I just filter directly on the field? like exercise.equipment.filter(prop=True) ?
It doesn't seem to be working. (the filter gives me a string rather than a list)
vinny3
django-formtools is some witchcraftery
rando305
it's exercise.equipment_set.filter - right?
ironfroggy joined the channel
gopar joined the channel
this_is_tom has quit
amcorreia has quit
slackorama has quit
cnk has quit
cybered2 has quit
vinny3 has quit
rodorgas joined the channel
ironfroggy joined the channel
haber joined the channel
vinny3 joined the channel
dmmoody joined the channel
cybered2 joined the channel
vinny3 has quit
vinny3 joined the channel
dmmoody has quit
idontneedanick joined the channel
ironfroggy joined the channel
phinxy has quit
rpkilby has quit
diegoviola has quit
therue joined the channel
idontneedanick has quit
rodorgas has quit
ironfroggy joined the channel
woltman joined the channel
rodorgas joined the channel
tm8522010 has quit
rpkilby joined the channel
tm8522010 joined the channel
deltaskelta joined the channel
rodorgas
I’m trying to use Django as an OAuth provider with django-oauth-toolkit, but the application (Rocket.Chat) requires an identity endpoint (/me). I gave a look on the OAuth RFC, and the /me endpoint doesn’t seem to be on specs, however it’s very common. Anyone knows more about /me endpoint in OAuth? Should it be included on django-oauth-toolkit?