These are chat archives for django/django

27th
Oct 2017
matrixbot
@matrixbot
Oct 27 2017 02:30
@bignose:matrix.org Luke-VideoLibre (Gitter): OTTOMH, that would require either some JavaScript, or some “refresh” meta element.
Neither if which is Django specific, I think.
Luke-VideoLibre
@LukeVideo
Oct 27 2017 11:30
@matrixbot More or less what i thought. The django way being a view for posting new messages ans a views ( different page ) to see you messages.
If i understand correctly.
Luke-VideoLibre
@LukeVideo
Oct 27 2017 11:38
The thing is the context isn't updated with the new query
Stephen James
@StephenOrJames
Oct 27 2017 12:57
@LukeVideo: It might not be optimal, but one way I've seen people handle this in both Django and Flask is to, rather than return data from a valid form submission, redirect to the same view instead.
Luke-VideoLibre
@LukeVideo
Oct 27 2017 13:04
Yeah but I think it could be a little less uggly if i just build a function that builds my context.
John
@flyboy1565
Oct 27 2017 15:57
@LukeVideo , it sounds like you want to use ajax to load a new form after submission
Luke-VideoLibre
@LukeVideo
Oct 27 2017 16:40
Totally. But the strange thing is if I input messages n I get message n - 1. So if I wasn't getting the penultimate I would understand. So on submit .... The get method is called again then the message saved so my context is one message late? I do understand @flyboy1565
John
@flyboy1565
Oct 27 2017 16:40
Is your code on GitHub?
Luke-VideoLibre
@LukeVideo
Oct 27 2017 16:41
That I might need some Js magic but it seemed so close... I wonder how close I can get in pure Django.
I'll send you a link. It's not at the moment and work blablabla so I'll have to setup a simple app to illustrate that.
John
@flyboy1565
Oct 27 2017 17:07
Pure Django expects every page to load.. so you'd render the form and the messages at the same time
Stew
@Lowell130
Oct 27 2017 17:17
hello
John
@flyboy1565
Oct 27 2017 17:57
Hello @Lowell130
cs89gr
@cs89gr
Oct 27 2017 19:01
hello @flyboy1565 how are you ?
Paul A. Aranguren
@Paulguren
Oct 27 2017 19:21
Hi guys
What’s the best way or at least one way to visualize data off of a django based website
?
Numerical values mostly, into line graphs
Cristian Samaniego
@chrisRubiano
Oct 27 2017 19:23
John
@flyboy1565
Oct 27 2017 20:28
@cs89gr , I'm good, how's it going for you
Paul A. Aranguren
@Paulguren
Oct 27 2017 20:48
Thanks man @chrisRubiano
cs89gr
@cs89gr
Oct 27 2017 23:15
hello is someone here ?
Alex Zwir
@AlexZwir_twitter
Oct 27 2017 23:27
yeeaaaaa
cs89gr
@cs89gr
Oct 27 2017 23:33
hello @AlexZwir_twitter how are you ?
Alex Zwir
@AlexZwir_twitter
Oct 27 2017 23:41
fine and you man