Kannan
Like doing some real world projects on industry
Charly
Like doing some real world projects on industry
But how we can help you with that?
ラーフル
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.
Charly
Explain brother
Did you added it to the isntalled apps in settings ?
Charly
Anyone knows? I want it asap
No urgent requests here.
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
Btw, I'm not talking about error messages, they're handled easily, I'm concerned about browser errors that pops up at each input in the user's browser
Maybe this is what are you searching for? https://www.tutorialspoint.com/form-required-attribute-with-a-custom-validation-message-in-html5
Charly
Yes please
Please what?
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ā
Hey anyone can help me in compititing my django assignment?
This group is to help you on specific issues you have on YOUR code, so you have to show the code you wrote and explain where and why you are stuck... as simple as that
Doragonsureiyā
Hey anyone can help me in compititing my django assignment?
No one can help you until you explain your difficulties.
Jack
Please what?
Any guidance on how to solve NoReverseMatch error in django
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
Ivan
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
Js code is just an example Real one looks smth like this export const collectionsAPI = createApi({ reducerPath: "collectionsAPI", baseQuery: fetchBaseQuery({ baseUrl: `${process.env.NEXT_PUBLIC_API_URL}/collections`, credentials: 'include' }),
Mirco
So locally it should work fine
Ivan
So locally it should work fine
Node side is working locally, but Django is on VPS
Mirco
Node side is working locally, but Django is on VPS
if you use Firefox you should have also more details if it fails during preflight request
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?
Sivaraj
the best practice is DO NOT use mongodb with Django
I have tasks that need to done with mongodb😅
cj
I have tasks that need to done with mongodb😅
then don't use Django, use Flask or FastAPI and a MongoDB ORM
Sivaraj
Sorry , they mentioned techstack react drf and mongodb😅
cj
Sorry , they mentioned techstack react drf and mongodb😅
things are simple: - if you are gonna use Django, then use a relational DB - if you need to use MongoDB, then don't use Django simple as that use the right tool for the right job
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
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?
Kasem
Postgres
Why? Because it is integrated with Django better than mysql?!
Mirco
Why? Because it is integrated with Django better than mysql?!
Yes, more features and postgres is much better than mysql for a lot of reasons
Kasem
Yes, more features and postgres is much better than mysql for a lot of reasons
Please, could you tell me other reasons from your experience, because I have never used postgresql before
Mirco
Please, could you tell me other reasons from your experience, because I have never used postgresql before
You just need to know that Django superpowers can be unblocked when using Postgres and that's already enough 😁 It has much more features, it's faster and so on
Charly
Any guidance on how to solve NoReverseMatch error in django
You need to verify the url you are accessing in the browser is the right one from the urls.py file
Kasem
@MaxZhurkin @pyflare Thanks 👍🏻
Maede
Hi everyone, is there a way in postgresql to find the dependent tables and columns for a record based on its id?
Doragonsureiyā
Hi everyone, is there a way in postgresql to find the dependent tables and columns for a record based on its id?
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.
Mr
Hi, can you convert some codes in django to cython to make it faster
Charly
Hi, can you convert some codes in django to cython to make it faster
that's possiblet but seems to be a pain and you won't get significant gains if you don't have heavy logic views, bottle necks are usually on DB or other resources not really your code
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.
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?
Nima
anyone how to fix these errors?
There is something with the urls.py
Charly
anyone how to fix these errors?
You don't have any URL defined for /
Charly
What do you expect to see?
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
Under what directory
Look for jazzmin in your virtual environment… all the jazzmin files are in there
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.
Charly
Which to link django to Flutter with api?
Nothing, you just call the API from your flutter app