Anonymous
Got it!! Thanks..
mubin
hi there, can anyone explain, or send an article about details of deploying a Django project into pythonanywhere.com? And especially with emphasis on django-cors-headers and Django rest framework. thanks.
Charly
hi there, can anyone explain, or send an article about details of deploying a Django project into pythonanywhere.com? And especially with emphasis on django-cors-headers and Django rest framework. thanks.
Start with their documentation. And there is nothing special of these libraries you should not deploy in a different way just because of these libraries.
mubin
Start with their documentation. And there is nothing special of these libraries you should not deploy in a different way just because of these libraries.
ok dude, is just reading documentations enough? if so, could you say some tips to how to master that better and faster.
Charly
ok dude, is just reading documentations enough? if so, could you say some tips to how to master that better and faster.
Depends on your knowledge you may need to read more sources if you don't understad it.
G G
Hi can anyone suggest what will be the good resources to learn django and practice using any sources to become a good developer in django
Doragonsureiyā
Hi can anyone suggest what will be the good resources to learn django and practice using any sources to become a good developer in django
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
G G
Thank you
G G
!djangotut
But what is this ? I dont find it
G G
Sorry
Charly
But what is this ? I dont find it
That was the command for the bot to show you the link, is the next message
G G
Ok thanks
G G
For the reply
mubin
i got into a problem with my react app, i've connected my react to django api but i can only GET, and not able to do other methods( DELETE, PUT, POST ), can anyone help me out?
mubin
Why not? Backend is rejecting or what?
i messed around a lot with chatgpt, but wasn't helpful, let me send you details.
Charly
i messed around a lot with chatgpt, but wasn't helpful, let me send you details.
I hope you learn that ChatGPT is useless if you don't have the basic knowledge.
mubin
I hope you learn that ChatGPT is useless if you don't have the basic knowledge.
i have basic knowledge, but see: Uncaught runtime errors: × ERROR Request failed with status code 404 AxiosError: Request failed with status code 404 at settle (http://localhost:3000/static/js/bundle.js:48745:12) at XMLHttpRequest.onloadend (http://localhost:3000/static/js/bundle.js:47430:66) the problem wasn't from django backend, : [08/Nov/2023 21:40:54] "DELETE /api/students/3 HTTP/1.1" 404 2355 but it refuses to connect. any idea why?
mubin
It shows 404, like if you don't have a view for it
how is that possible? so you think the problem is from fetching api or what
Charly
how is that possible? so you think the problem is from fetching api or what
I told you, seems you don't have a view or url for it
cj
i know
so, you know what to check and fix, right?
cj
wait a sec
*searches what 404 means*
mubin
i'm trying to find out why not found, despite the fact i have.
mubin
problem solved thanks guys.
Willi@m.
I'm writing code but instead: def booking(request, flight_id): if request.method == 'POST': flight = Flights.objects.get(id=flight_id) passenger = Passengers.objects.get(id=int(request.POST["passenger"])) Passengers.flight.add(flight) return HttpResponseRedirect(reverse('detailed', args=(flight.id,))) but instead of adding data to database it's raising this error: ValueError at /2/booking``` The view flights.views.booking didn't return an HttpResponse object. It returned None instead. Any support please?
Willi@m.
Seems you didin't send a POST request so the view returned None
Is there anything I should change in that code?
Charly
Is there anything I should change in that code?
No, you should send a POST request
Willi@m.
Patrick
How do we solve frozen importlib_bootstrap error
ㅤMeraj
How do we solve frozen importlib_bootstrap error
Do you get this error when you want to use manage.py??
N.A.developer
Hello everyone
N.A.developer
How to create trip application on django
N.A.developer
How I am fast learning Django. Do you have any methods for me
Charly
How to create trip application on django
You need to design your application and I mean define your requirements split in in modules and smaller thigns you can handle
N.A.developer
Maybe you have any methods to learn django. I need your help please
Charly
Which models me need
We don't know only you know what functionalities your app will have
N.A.developer
Practice, practice and practice.
I understand but any site or books do you have any advice for me
Doragonsureiyā
I understand but any site or books do you have any advice for me
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
N.A.developer
Which youtube channel is good for me
Charly
Which youtube channel is good for me
I don't recommend videos. The link I sent are more than good
Charly
Ok. I watched any videos Django
So... asking for advice and ignoring it...
N.A.developer
nyctophile
Hi guys! Can you advice documentary tutorials for rest framework
Dino
I am just about to start django any suggestions
Dino
Abt how to go through
Doragonsureiyā
I am just about to start django any suggestions
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Charly
Yeah,how can I solve it
Show the FULL error
ㅤMeraj
Yeah,how can I solve it
Are you using this code in the correct folder? I mean, are you in the folder of manage.py?
izzatillo adxamov
izzatillo adxamov
and have you activated venv
Kumar Shreyansh
Hi, i have a very specific doubt. I have finished my first industry application in django. My dev environment is based on Ubuntu. And the website is deployed on the company server. When accessing the website from chrome on ubuntu in incognito mode, it works perfectly, but when doing the same on chrome incog on windows, it starts failing. I am not able to figure out why that is happening. I will be very grateful for any leads on this. Django version is 4.2, also using bootstrap v5 and latest jQuery for behaviours and UI
Anonymous
Can you help me? Entry_set doesn't work in my project. AttributeError: 'Articles' doesn't has attribute 'entry_set'.
Anonymous
Show the models via pastebin.org
Tomorrow, in my country there's 🌙 now
Anurag K
After user login using django authentication, when i refersh the home page it shows CSRF verification failed Request aborted. Can anybody help me to solve this problem
Ahmed
I am a newbie in Django
Ahmed
I am a newbie in Django
I created a function in an app and gave it the URLs, and when I try to run the server, it gives me the original page without what I wrote in the function.Why is this happening?
Prashant
Hello Devs, This is my first Django project which I have to put live soon but when I have tried to put it on a live server and switch debug = false my static files(mainly CSS files) are not running. please can someone help me to get out of this?
mubin
not css files.
(₤ام͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـیر͠
Davide
Good morning, can someone help me with a form to filter a query set ? My problem is that I have a model A related to a model B and this model is also related with model C. I need to filter result from model A with fields from model B and C. Tried with django_filters but there is no way to use fields from the model B and C. Now I'm trying to use a forms to filter a queryset but i cannot find a way to filter with the fields from the other to models. Can someone help me ?