Kannan
Like doing some real world projects on industry
Charly
ラーフル
hello everyone I'm new to Django, I have frontend experience but not in the backend much, i recently learned to deploy the Django project on the digital ocean. would anyone be willing to guide me on how i should start my backend journey.
Doragonsureiyā
Krushna
I have a django project which has two apps and each app has different user model.
I wanna use SSO google-oauth2. I don't wanna to create_user in default auth User model but instead check if user exist in either app and based on that redirect to app1/app1 dashboard.
I'm currently exploring Extending the pipeline using social-auth-app-django package.
Has anyone stumbled on such scenario? If yes what did you used?
Thank you.
Amirhossein
Jack
Charly
Explain brother
Did you added it to the isntalled apps in settings ?
Charly
Doragonsureiyā
Anyone knows? I want it asap
Is it urgent?
You shouldn't be here, wasting time and poking strangers and waiting for them to do your job for you.
Search on Google/DuckDuckGo, do the research, and solve your problem yourself, nobody here will drop what they're doing to do your job, just because "it's urgent!".
Have a nice day! 😉
Charly
Jack
Charly
zmod
anyone who use Specify7 with Django? here in the room
Doragonsureiyā
anyone who use Specify7 with Django? here in the room
Please don't ask meta questions like:
- Any user of $x here?
- Anyone used technology $y?
- Hello, I need help on $z!
Just ask about your problem directly! If you don't know what to ask, please read: http://catb.org/~esr/faqs/smart-questions.html
zmod
sorry
Charly
sorry
Is not a scold. Just ask your real question
Km
Hi folks, here is an question about is it available to limit ‘annotate()’ to query each row of subquery table? Just let it query what I filter/subquery?
Since I try to subquery a foreign key model( one to many, subquery the many side) to get the latest data for each one model, then use it into main model to query with ‘Subquery()’.
What I want is to divided the main query into three items according to the fields (the value from one date minus another date) of foreign key model.
Thank you.
Ay....
Hey anyone can help me in compititing my django assignment?
Doragonsureiyā
Jack
Please what?
Any guidance on how to solve NoReverseMatch error in django
Km
Km
I assume Prefetch() can’t use with Subquery() since these two functions works individually, but broken while combine them together.
Km
And, I drop annotate() in the one model since I have no ideal how to limit it.
Ivan
Hi, I am encountering CORS errors when trying to send requests from my local frontend application to my Django backend server. Despite setting CORS_ALLOW_CREDENTIALS = True and attempting to use CORS_ALLOW_ALL_ORIGINS = True (which I later replaced with specific domains in CORS_ALLOWED_ORIGINS), I still receive CORS errors when trying to send requests with cookies.
Tech spec:
Frontend: Running locally, making requests to the Django server.
Backend: Django with the django-cors-headers package installed.
CORS settings in Django:
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
...
]
CORS_ALLOW_CREDENTIALS = True
CORS_ALLOWED_ORIGINS = [
"http://localhost:3000",
"http://127.0.0.1:3000",
]
Example of the client request:
fetch("http://example.com/api/resource", {
method: "GET",
credentials: "include",
headers: {
"Content-Type": "application/json"
}
})
Server logs show that database queries are executed without errors, but there is no information regarding CORS headers or CORS-related errors.
Access-Control-Allow-Origin headers are missing in server responses to requests that include cookies.
I will be really glad if someone can help me with this :)
Mirco
Hi, I am encountering CORS errors when trying to send requests from my local frontend application to my Django backend server. Despite setting CORS_ALLOW_CREDENTIALS = True and attempting to use CORS_ALLOW_ALL_ORIGINS = True (which I later replaced with specific domains in CORS_ALLOWED_ORIGINS), I still receive CORS errors when trying to send requests with cookies.
Tech spec:
Frontend: Running locally, making requests to the Django server.
Backend: Django with the django-cors-headers package installed.
CORS settings in Django:
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
...
]
CORS_ALLOW_CREDENTIALS = True
CORS_ALLOWED_ORIGINS = [
"http://localhost:3000",
"http://127.0.0.1:3000",
]
Example of the client request:
fetch("http://example.com/api/resource", {
method: "GET",
credentials: "include",
headers: {
"Content-Type": "application/json"
}
})
Server logs show that database queries are executed without errors, but there is no information regarding CORS headers or CORS-related errors.
Access-Control-Allow-Origin headers are missing in server responses to requests that include cookies.
I will be really glad if someone can help me with this :)
By using these snippets it won't work for sure since you accept requests only from localhost
So the JS code won't work for sure
Mirco
Mirco
So locally it should work fine
Sivaraj
I have gone through web for integrating mongodb in django. I found two methods one is using djongo engine where we can use django orm for retrieving data. Another method is using pymongo client and it's methods to retrieve data. I don't which method is best practice. Can anyone help me to integrate?
Doragonsureiyā
cj
Sivaraj
Sivaraj
Sorry , they mentioned techstack react drf and mongodb😅
Brhum
Sivaraj
Okay 😅
cj
Can you explain why?
because Django is built to be used with relational DB approach, go read this article: https://t.me/django/284745
Brhum
mahdi
guys Introduce a good course for Django
Doragonsureiyā
guys Introduce a good course for Django
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
Kasem
Which is better with Django, PostgreSQL or MySQL?
Mirco
Kasem
Postgres
Why? Because it is integrated with Django better than mysql?!
Maxim
Kasem
@MaxZhurkin @pyflare
Thanks 👍🏻
Mirco
Maede
Hi everyone, is there a way in postgresql to find the dependent tables and columns for a record based on its id?
Mr
Hi, can you convert some codes in django to cython to make it faster
Mr
Armin
Hello friends
I'm using smtp gmail for send mail in django project
everything is ok and works in localhost, but now I published my project on cpanel host and when I want to send mail in production I got error below :
SSLCertVerificationError at /auth/send-verification-code/
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'smtp.gmail.com'. (_ssl.c:1006)
can anyone help me about this?
Krishna
E-commerce project using python django
Doragonsureiyā
E-commerce project using python django
This is not a search engine. If you use this group like a search engine, unlike a search engine, you will not get any answers. Please take the the time to formulate your request clearly and remember that you're talking to humans.
Doragonsureiyā
Maxim
Amir
Hello, I want to use xhmtl2pdf to convert the page with its contents to pdf, but the characters are not displayed correctly, whether in Farsi or English.
Barry
Which to link django to Flutter with api?
Godwyn
Page not found (404)
Request Method: GET
Request URL: http://localhost:8000/
Using the URLconf defined in StudentPortal2.urls, Django tried these URL patterns, in this order:
admin/
user/
^media/(?P<path>.*)$
The empty path didn’t match any of these.
Godwyn
anyone how to fix these errors?
Charly
What do you expect to see?
Jack
Jack
Under what directory
Matin
Hi everyone, has anyone updated django from 5.0.9 to 5.1.1?
I've ran into problems with crsf trusted origins
Brown
Brown
Under what directory
Look for jazzmin in your virtual environment… all the jazzmin files are in there
Emmanuel
Doragonsureiyā
This is not a Django specific question, please delete your offtopic message.
If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.