Anonymous
any with this effect
when I open this page once, it prints 'yes' twice in the terminal
Anonymous
any with this effect
yes [16/Aug/2021 21:57:53] "GET /service/1/ HTTP/1.1" 200 9045 yes [16/Aug/2021 21:57:53] "GET /service/1/ HTTP/1.1" 200 9045
Anonymous
any with this effect
sometimes the second is late by a second
HamidReza Fekri
hi guys i have order app that views are all with API i have problem when i am not log in it makes session but after log in how to save order in data base ???
Anonymous
In url.py in app: path('service/<int:service_pk>/', views.service_obj, name= 'service'),
Maxim
In url.py in app: path('service/<int:service_pk>/', views.service_obj, name= 'service'),
and what does the browser developer console show? is there a second request?
Anonymous
and what does the browser developer console show? is there a second request?
yes [16/Aug/2021 21:57:53] "GET /service/1/ HTTP/1.1" 200 9045 yes [16/Aug/2021 21:57:53] "GET /service/1/ HTTP/1.1" 200 9045
Maxim
yes [16/Aug/2021 21:57:53] "GET /service/1/ HTTP/1.1" 200 9045 yes [16/Aug/2021 21:57:53] "GET /service/1/ HTTP/1.1" 200 9045
I did not ask the log of the server, which you have already shown and which could not have been shown for the first time I asked what the BROWSER developer console gives out
Doragonsureiyā
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Sreekanth
Is django is easy to learn pls respond...
Maxim
i work with android
above I said that it was possible not to show the server console, but now I realized that there is a hint there you get two calls precisely because the server receives two requests
игорь/igor
Is django is easy to learn pls respond...
Programming is hard in general. You will probably need a couple of month to learn Python first, not to make stupid mistakes and ask this community for help all the time just because you don't know python as a language. Then you will spend at least 2 month learning basics of django and 1 more month to create api's using drf. If you are ready, then start with some python lessons on YT or get a book.
игорь/igor
+
can you switch to browser on computer?
Maxim
can you switch to browser on computer?
not necessary the log clearly shows that each call corresponds to a separate request
HamidReza Fekri
hi guys i have order app that views are all with API i have problem when i am not log in it makes session but after log in how to save order in data base ???
Maxim
No(
https://t.me/django/174848
игорь/igor
No(
do you develop your django app on your phone?
Anonymous
https://t.me/django/174848
if you can understand why this is so, please write to me
dolly
Hi Is there any way to paas context with redirect
Maxim
if you can understand why this is so, please write to me
all I can say is that the reason is most likely external
Anonymous
Hi Is there any way to paas context with redirect
redirect('xxx:yyy', kwargs= {'zzz': xyz})
Doragonsureiyā
Anyone?
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work. Have a nice day 😊
игорь/igor
Yes)
didn't expect that.
Sanjay Krishnan
Hi Is there any way to paas context with redirect
You can use query parameters in url..but why do you want to do it?
Anonymous
Hello everybody who programming on Python and React?
dolly
You can use query parameters in url..but why do you want to do it?
Its a part of validation fir custom model where if a user login if details matches it redirects to the main page And i also want to display the username so i am using context I cant use Render because its creating a issue
dolly
No i am not using django default user model. I am using custom model
HamidReza Fekri
hi guys i have order app that views are all with API i have problem when i am not log in it makes session but after log in how to save order in data base ???
Emanuele
replace(redirect('view', {context, context})))
игорь/igor
Its a part of validation fir custom model where if a user login if details matches it redirects to the main page And i also want to display the username so i am using context I cant use Render because its creating a issue
Ok, so you are redirecting to main page and trying to pass username as a parameter? that is wrong, you don't need to do that. Just in template put {{user.username}}
dolly
replace(redirect('view', {context, context})))
Will this work return(redirext('url', {contexr})
dolly
does AUTH_USER_MODEL help you?
M not using that i am using customized model
игорь/igor
M not using that i am using customized model
This is to tell Django that you are using custom model
dolly
Okk
Behnam
How can i learn django deeply ?
Doragonsureiyā
How can i learn django deeply ?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
HamidReza Fekri
hi guys i have order app that views are all with API i have problem when i am not log in it makes session but after log in how to save order in data base ???
Anonymous
all I can say is that the reason is most likely external
I do not know why. But the problem was that in the template, in the link tag, the href attribute was filled with the value #. And because of this, all functions were called twice.🤷‍♂️
Anonymous
Hi,i have trouble adding the html template to the project,can someone help me?
Inside your startapp folder, create a folder with a name templates , inside it create another folder with name same as your project's name project / startapp / templates / project . Then you can create html file project / startapp / templates / project / layout.html please let me know if that works for you.
Demetra
hello! can I use 2 frameworks inside one project gitlab, django and flask?
Dev__master
Hi guys, can anyone know how to get the weather forecast data from NOAA, using rest api, please let me know. Thanks
Dev__master
I mean iam not able to find the rest api, from that rest api I need to get the temp, wind,wind speed, rainfall, prcp,
Dev__master
why not just find the api documentation?
Not able to find the rest api documentation for noaa
Dev__master
I spent lot of time on this
Doragonsureiyā
Not able to find the rest api documentation for noaa
Try harder until you get what you want! don't give up! 🦾
Dev__master
Okay, Thanks
Rocky
Please tell me One project using Django rest framework
Maxim
I spent lot of time on this
seriously? found it on the first link from google "noaa api"
Doragonsureiyā
Please tell me One project using Django rest framework
Adding the word Django to your Off-Topic question doesn't magically turn it to a Django related question, so move to @PythonOfftopic group and ask there.
Dev__master
seriously? found it on the first link from google "noaa api"
I found some apis but from that not getting exact output
Maxim
I found some apis but from that not getting exact output
this is their official documentation if it does not match, no one will fix it except them
Shivaprasad
Heyy anyone have django free tutorial of udemy
Shivaprasad
игорь/igor
Or amy other except YouTube
What is wrong with yt tutorials though?
Firdavs
hi, I create user and I try login it but login always equal to None. So What do I
Vaishali K
Can anyone suggest some tutorials or channels for django?
Shivaprasad
What is wrong with yt tutorials though?
I didn't find the perfect one can j suggest any
Amir
Hi guys, I'm going to consume websocket data from a wss route and send it stream in my channel using websocket-client and django channels. Does anyone know what should I do? Any help will be appreciated.
Anonymous
Hello Coder, Im new to coding and i want build the website can anyone help me to pass data from django (backend api) to react.
Anonymous
Im reading lot about django-rest-api
Alikhanov Jakhongir
Yes we can help