Jd
I am using ModelSerializer but it is throwing an error as expected a 'response'
Jd
Received <class 'NoneType'>
vaseem cholakkan
Received <class 'NoneType'>
your view didnt returned any response thats why
Jd
your view didnt returned any response thats why
I understood the issue the value returned by my query is a queryset of 5 objects, if I pass all together to serializer it is erroring and returning nothing
Jd
Is there any way to over come it, right now I am looping queryset and calling serializer for each object and storing it to string
Harsha
Many =True as parameters in serializer
G
Celery + rabbit (or redis). Hello, everyone, has anyone encountered the problem that the delay method does not work as it should, when using it, the message reaches the rabbit or redis (as a message broker) and that’s all, I don’t receive an email and f-i sending a letter feels like it’s not working at all, because... the print does not output either 1 or 0 in case of successful or unsuccessful sending, as soon as you remove the delay method, everything works. Python 3.9.13, celery==5.3.0, Django==4.2.5. Windows, rabbit and redis in Docker, I run the code from Pycharm on the host machine
G
views - https://linkode.org/#mPzFBigJDuM5QLIU0vRFr1 tasks - https://linkode.org/#tpj3jmGjRhH6vm3VgRel62 init - https://linkode.org/#OHR8DULmlpldf1nReppqo6 celery.py - https://linkode.org/#cwPKwKUgrOR7x5cImEwev3
G
since this problem occurs with two message brokers, I have suspicions that the problem is in my environment and how all this is deployed and I should probably deploy everything to Debian, for example, but maybe someone had such a configuration and someone solved this problem?
F
A question how can I integrate fingerprint biometrics in Django for an application. Could someone help me, please?
Siddharth
A question how can I integrate fingerprint biometrics in Django for an application. Could someone help me, please?
https://www.section.io/engineering-education/biometric-2fa-in-a-django-application-with-typingdna/
D
RuntimeError at /signup You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to 127.0.0.1:8000/signup/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.
Muflone
How to get please help me
your answer is there
Muflone
youtube doesn't explain to read
G
just use another OS, not windows
yes, I will do that, because it seems that this is the problem
Gabriel
if you do that for every request you are going to hit two limits: secrets manager api rate limits, and db conns limits. you will need some kind of caching for the secrets [boto already has it], so you no need to fetch every time [it's crazy and expensive] and some connection pool for the db [like rds proxy or pg bouncer]
Yep, that's the solution I'm using. I use elasticache to store access information, and rds Proxy to solve the problem of opening multiple database connections. A lambda updates cache information every time the secret changes. I just omitted this information because it wasn't the focus of the conversation ✌🏾
Nithin
Could not found what error 😕
Muflone
what is should_be_unique_for_you in your code?
Doragonsureiyā
Could not found what error 😕
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Jahongir
Hello there. Has anyone written django-allauth custom? How can I handle the request sent to the callback url?
Shyam
File "C:\Users\Hp\PycharmProjects\animos\venv\Lib\site-packages\django\core\servers\basehttp.py", line 47, in get_internal_wsgi_application raise ImproperlyConfigured( django.core.exceptions.ImproperlyConfigured: WSGI application 'petmitra.wsgi.application' could not be loaded; Error importing module.
Shyam
please how to solve problem
Asukhan
Hey everyone! Can anyone please tell me, like, I've read in a couple of platforms, that it's better to deploy your API application made by DRF in a Clouds, like Cloud Run etc. I am new to it, that's why I am asking, is it so?
Asukhan
not only drf, in general API
Никита
https://linkode.org/#a7khO1uo6TM3GUdi14VG06 Hello, can anybody explain for what reason condition «token == self.reset_url_token» exists in this view? I suppose this condition always returns false, because token, before this condition, doesn’t decrypting. so set of letters can’t equals ‘reset_url_token’
A L I
I guess it checks if token is set password string, may say that it’s for permission etc
Bro can i use beautiful soup in my django project for building an api to basically scrap something whenever it's called ??
A L I
I guess you can, btw try adding celery for your web scraping things
Thanks bro why you recommend celery over beautifulsoup? And another question in which file should i do the web scrapping? Should I make a new file in my django project?
Stanislav
Stanislav
Ashok
Has anybody made HR portal
Charly
Has anybody made HR portal
Maybe. But better to ask specific questions here.
Lokesh
Has anybody made HR portal
checkout frappe.io
Lokesh
Hello there. Has anyone written django-allauth custom? How can I handle the request sent to the callback url?
you can fork and customise it… for callback there are already urls and views present, if you want something custom, you can add it in the Provider class present in provider.py
Есбол
bitwise permissions not working (but when I change order for some users working, which means for different type of users I should make in different queue) after updating django and drf some viewsets that where working like 2 years not working who faced with this problems
Никита
I guess it checks if token is set password string, may say that it’s for permission etc
But, how do you think, this condition can be safety avoided in my custom view?
F
Excuse me for a question, could someone share with me a project or documentation on how to add the fingerprint biometric record in Django, please?
Дмитрий
Hi all! Please tell me if there is a way to have a dynamic SITE_ID (settings), depending on request domain, so I can have multi site setup without parametrising it through nginx? I wrote a middleware , it’s work, but it seems that it’s not consistently working. Suggest a way. I will write code by myself. Thank you my lovely society
Jimmies San
Excuse me for a question, could someone share with me a project or documentation on how to add the fingerprint biometric record in Django, please?
you use python to do it. forget about django. do it using python. after that, you can see how to add it to the django model to store the data, to the view to do some visualisation or connect it to the JS and so on. step by step. so, just google how to do an implementation of fingerprint detection with python first.
Lokesh
Excuse me for a question, could someone share with me a project or documentation on how to add the fingerprint biometric record in Django, please?
for biometric, there must be some physical vendor you are using? are they not providing documentation?
Sleeping
in django when i send a emaip with html template it work on local host but when i deploye this it not work normal email are work but the email with html template it not anyone can help me
Prabhas
Can any one know how to connect postgressql schemas with django
G
just use another OS, not windows
yes, the problem is in Windows OS, I deployed everything to Debian and everything took off right away
Tamerlan
Hello set token for my cookie it work well in postman but in front use react when he send post to login api tokens do not set into cookie
Sleeping
Helping is easier if you share your code
thanks but i found my error i was making small mistake
Никита
Hello set token for my cookie it work well in postman but in front use react when he send post to login api tokens do not set into cookie
Hi, I’ve solved this problem, try to run react at the same domain as Django server. If your Django server start in 127.0.0.1, run react at 127.0.0.1 too Must work, if your cors configuration is correct Also, check if token presence in your post data. It’s compulsory
Sleeping
oh
Sleeping
i deployed my django on pythonanywhere and tested into local server of react but when i deployed my app on netlify the backend not working
Sleeping
and i also set cross origen to true
Sleeping
anyone can help me
Tamerlan
Do you add front domain to CORS_ALLWED_ORIGINS list into settings
Sleeping
yes in django setting
Tamerlan
yes in django setting
CSRF_TRUSTED_ORIGINS list also?
Sleeping
wait i will try
Sleeping
backend not working in reactjs
Sleeping
netifly
Никита
Hello set token for my cookie it work well in postman but in front use react when he send post to login api tokens do not set into cookie
My cors settings CORS_ALLOWED_ORIGINS = [ 'http://127.0.0.1:3000', ] CORS_ALLOW_CREDENTIALS = True CSRF_TRUSTED_ORIGINS = ['http://127.0.0.1:3000'] CSRF_COOKIE_HTTPONLY = True CSRF_COOKIE_SECURE = True SESSION_COOKIE_SECURE = True
Никита
Hello set token for my cookie it work well in postman but in front use react when he send post to login api tokens do not set into cookie
and, if you can’t solve your problem, you can start your react app at the same domain as django, if you create file .env.local in root of your react app and write in file this line -> HOST=127.0.0.1 (or domain you want) With cors config and this manipulation you can achieve desired result
Tamerlan
I think problem in the front
Tamerlan
Because into axious credantiolmust be include
Tamerlan
Никита
Because into axious credantiolmust be include
set withCredentials: true in your request
Tamerlan
Никита
and CORS_ALLOW_CREDENTIALS = True in django settings
Tamerlan
Thanks for answer