not liking this.... as i progress through the project, my models are ALL changing, from the initial design...its like the original design which took me ages...has ended up as just a guide, and every single model has changed.
possibly due to lack of initial understanding
i thought i was leading the project...but it now seems the project is leading me
miz- has quit
lobo_d_b joined the channel
BSL has quit
fikka joined the channel
kapil___ has quit
fikka has quit
lobo_d_b has quit
jessamynsmith joined the channel
pytony has quit
fikka joined the channel
fikka has quit
Leeds joined the channel
Earlo joined the channel
Earlo has quit
pytony joined the channel
fikka joined the channel
fikka has quit
graphene has quit
graphene joined the channel
graphene has quit
graphene joined the channel
amcorreia has quit
rodorgas joined the channel
fikka joined the channel
eht_ joined the channel
fikka has quit
newdimension joined the channel
kris7ian has quit
newdimension
Does the template {$ regroup %} only work on a list of dict objects?
eribol has quit
lobo_d_b joined the channel
I have 3 context variables that are QS. Is there a way to loop through them without passing them as one object in views?
theology joined the channel
fikka joined the channel
audioburn has quit
fikka has quit
eht_ has quit
opticdel1sion joined the channel
lobo_d_b has quit
opticdelusion has quit
opticdel1sion is now known as opticdelusion
luxeve joined the channel
Meteoroid has quit
djapo joined the channel
fikka joined the channel
fikka has quit
drodger has quit
drodger joined the channel
redrapscallion joined the channel
Dunedan joined the channel
wildlander has quit
theology has quit
Dunedan_ has quit
fikka joined the channel
drodger has quit
redrapscallion
I have a one-to-one field between a Model that I have called "Profile" and the User model (see https://dpaste.de/vCWt). When I try to change the number of points, it correctly changes, but doesn't save.
From my perspective, it seems like it might be because the two models are totally separate, and although they're connected through a one-to-one relationship, I'd have to save the Profile object to actually get the points to save (and not the model used in the form)
And intuitively, it should really only be saving the TranslationRequest model, since that's the one in the form, but is there any way for me to also save the Profile model too? I don't really think I have any way to access it, although it's directly connected to the User model.
fikka has quit
drodger joined the channel
theWhisper_ joined the channel
rpkilby joined the channel
newdimension has quit
oh. nevermind, by explaining the problem clearly, I accidentally figured out the solution lol.
fikka joined the channel
rodorgas has quit
fikka has quit
mattmcc
Quack
rodorgas joined the channel
redrapscallion
mattmcc: rubber ducky programming really is too effective :(
PantelicGR joined the channel
theology joined the channel
fikka joined the channel
redrapscallion has quit
rpkilby has quit
DefB
So effective it closed his page.
fikka has quit
K-ballo has quit
jessamynsmith has quit
fikka joined the channel
jessamynsmith joined the channel
graphene has quit
fikka has quit
graphene joined the channel
maryo joined the channel
AlwaysHigh
is datetime set at utc or local timezone by default?
jessamynsmith
AlwaysHigh: should be what's in your settings, in most contexts
eb0t
hey i am using the __str__ method to return a name.
but i want the returned value to be a mixture of 2 fields eg return self.name appended to self.number
how do i do this
fikka joined the channel
can i just use return('{}{}'.format(self.name, self.number)
in fact i should maybe just try it
mattmcc
Yep.
lobo_d_b joined the channel
fikka has quit
lobo_d_b has quit
eb0t
fantastic...this django is helping to solve a lot of problems
rodorgas has quit
fikka joined the channel
FunkyBob
eb0t: could even use return f'{self.name}{self.number}' if your python is new enough :)
eb0t
ah thanks...im on python 3.5 . i havent seen that method before
fikka has quit
BPL joined the channel
FunkyBob
ah, they're new in 3.6
BSL joined the channel
eb0t
ok thanks, but it's even less code than the other method.. so it's a nice find.
fikka joined the channel
fikka has quit
BPL has quit
zeus1 has quit
rpkilby joined the channel
PantelicGR has quit
jessamynsmith has quit
PantelicGR joined the channel
hey do you guys think its a good idea to write company names to the database all in lowercase, regardless of how the user entered the name
just trying to work out if that is possibly a good move
fikka joined the channel
theology has quit
theology joined the channel
fikka has quit
UncleVasya joined the channel
theology has quit
luxeve joined the channel
fleetfox has quit
rpkilby has quit
fikka joined the channel
jessamynsmith joined the channel
miz- joined the channel
jessamynsmith has quit
fikka has quit
pere joined the channel
fikka joined the channel
mattmcc
eb0t: Probably not, business names may have specific capitalization, like using camel case (LinkedIn) that should be preserved.