Prasanthari
Yeah but i don't know much about js😅😅
Mendes
no, why. I am seriously
I didn't help on anything and you start complimenting the group quoting me...
Mendes
The best option for those who came from the web world...
Prasanthari
Sry I thought native 😂
Prasanthari
Mendes
Flutter - Beautiful native apps in record time https://flutter.dev/?&gclid=CjwKCAiA8K7uBRBBEiwACOm4d2yzboGM1zneD4NJhoiwLbHL9m7M-eSLMTMXkbh4_g4hldfLlq-wXxoCvTUQAvD_BwE
Mendes
Flutter is the best option for those who want simplicity and don't have a billion simultaneous users...
Mendes
It goes well with Django simplicity
Prasanthari
Cool
Mendes
Django and flutter are a good combination...
Master
Hey guys can someone figure this out ....
Nothing wrong with POST. Show us your view
Master
Open pastebin for this kind of stuff...
Jay
The confirmation function is my endpoint it receives POST data then checks if transaction_response['ResultCode'] is 0 or 1 then its supposed to redirect ackodingly to the urls provided
Jay
Open pastebin for this kind of stuff...
https://pastebin.com/Vkxxw6if
Master
Pfff... You end your function at 65 line of code (returning render), so your redirect just NEVER will be executed
Master
Everything after 65 line just not executed
Jay
Pfff... You end your function at 65 line of code (returning render), so your redirect just NEVER will be executed
Sorry that line wasnt supposed to be there . But even with that line included the if statements are executed and print statement print but no redirection
Master
Sorry that line wasnt supposed to be there . But even with that line included the if statements are executed and print statement print but no redirection
Because you don't have a redirect in your function except 65 line. You have a renders, not redirects inside if...else codeblock
Jay
Posting my terminal output
cj
Jaymoh wanted to post this long code: https://hastebin.com/ixeqokumek
cj
Posting my terminal output
can you please don't do that again? use a code sharing service
Ihor 🐈
I have: • first_entity and second_entity • entities have O2O relationship • list template for first_entity and there are some properties of second entity (in template's markup looks like {{ first_entity.second_entity.<some_field> }} Question: i want to reduce queries to DB and fetch related second_entity while fetching first enities. Can .select_related('second_entity') method help me with this? Will i avoid the query for second_entity while template rendering?
Luis
I have: • first_entity and second_entity • entities have O2O relationship • list template for first_entity and there are some properties of second entity (in template's markup looks like {{ first_entity.second_entity.<some_field> }} Question: i want to reduce queries to DB and fetch related second_entity while fetching first enities. Can .select_related('second_entity') method help me with this? Will i avoid the query for second_entity while template rendering?
Put this in your projectname/settings.py LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'console': { 'class': 'logging.StreamHandler', } }, 'loggers': { 'django': { 'handlers': ['console'], 'level': 'DEBUG', 'propagate': True, }, }, }
Ihor 🐈
You can enable DEBUG mode in DJango logger and see what's happening. I think that using select_related will help.
Thank you! I thought that i had to enable some third party like django-silk or kind of to get logs, but didn’t know django has such loggers inboxed...
Ihor 🐈
Yes, I use it in all my projects
I think silk is more powerful in comparing with defaulted?
Luis
Never used it
Luis
But it will help to see what is orm querying to db
Luis
Sorry for my horrible grammar hehe
Ihor 🐈
Alek
Does anyone have this error during registration? https://stackoverflow.com/questions/58842168/django-exception-type-smtpauthenticationerror-on-the-server
Ghorz
Does anyone have this error during registration? https://stackoverflow.com/questions/58842168/django-exception-type-smtpauthenticationerror-on-the-server
host: EMAIL_HOST port: EMAIL_PORT username: EMAIL_HOST_USER password: EMAIL_HOST_PASSWORD use_tls: EMAIL_USE_TLS use_ssl: EMAIL_USE_SSL timeout: EMAIL_TIMEOUT ssl_keyfile: EMAIL_SSL_KEYFILE ssl_certfile: EMAIL_SSL_CERTFILE
Ghorz
https://docs.djangoproject.com/en/2.2/topics/email/
Anonymous
Is it possible to have "live" plotly data in django?
Anonymous
i mean live plotly graph, that's continually updated with new data from the database.. for example line graph for last 3h
Bogdan
hi everyone, please tell mi how i can use django with wordpress CMS?
Luis
i mean live plotly graph, that's continually updated with new data from the database.. for example line graph for last 3h
What about using chartjs (to create graphs) and django rest framework (rest api) to retrive data from db and feed that chartjs graphs ?
Luis
hi everyone, please tell mi how i can use django with wordpress CMS?
DJango and Wordpress? What are you trying to do ?
Luis
Thanks for helping!
Your wellcome!
Ismael
Is it possible to have "live" plotly data in django?
I made something like that using ajax calls to django backend in order to update plotly data, refreshing the graph every n seconds (this time was controlled by JavaScript Code).
Yash
A silly doubt, my views.py is print("something") def home(request) : my logic render(template) Why is print function running when I am calling only home function? Does Django runs entire views.py when called via url ?
Mirco
It depends on how you define your urlspattern
Yash
It depends on how you define your urlspattern
Like? my URL is (' ', views.home,name="home")
Mirco
Like? my URL is (' ', views.home,name="home")
So the "home" function is being called
Mirco
First question is why u wanna have that useless print ?
Yash
Actually I need an array to work with in my views.py but it resets everytime on page refresh. So what can I do to have an array which I can change when I want to?
Yash
First question is why u wanna have that useless print ?
I used print to test if code outside scope of home fn is running
Yash
In python we have lists , first Second, what's the goal of this list ?
1. Okay Lists not array (I thought it was obvious) 2. I need array for one of my logic in code
Ismael
I think you should use class based view and assign the list into an attribute of the class, then you can use in your get/post method by self.var_list
Mirco
I think you should use class based view and assign the list into an attribute of the class, then you can use in your get/post method by self.var_list
It's too early to use them If I understood well, he's still learning the basics of Django It's better to start from FBVs imho
Yash
Define it into your home function It's your view
I can't because list gets initialized on every call to home fn
Mirco
Integer
Ok, but give us examples of what u wanna get
Ismael
Then maybe the best option is to define the list in request.session or something like that depending on if he wants to persis changes or not. If not just do a copy of the variable before change it using deep_copy method
Mirco
We cannot help u if you don't give use more details
Yash
Ok, but give us examples of what u wanna get
I want an array which stays consistent and can be changed whenever I want, 1st method I used was arrayfield in postgres db which works fine. But what if I need my project in MySQL (it doesn't support arrayfiled)?
Ismael
When you sat "can be changed whenever I want" you mean in code from the view, right?
Yash
When you sat "can be changed whenever I want" you mean in code from the view, right?
Yes, it shouldn't change on page refresh which right now it is
Yash
Did you got the problem? Tried my best lol