ARS
I tried online db but Vercel sometimes crashed
ARS
Yup
مريم خالد
i have 3 models let assume Model A ,B,C , c contain a foreginkey for both A, B ,my question was how can i add data inside A,B using model c and their foreign key
ARS
Thanks man. I'll do
Doragonsureiyā
Thanks man. I'll do
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
ARS
Yes. That's what the term is. Thanks
ARS
And I need to upload pictures to other site and link it here?
مريم خالد
i tried but i got this error TypeError at /api/add/newinput The fields option must be a list or tuple or "all". Got str.
مريم خالد
yes
مريم خالد
okay , thank you
مريم خالد
http://linkode.org/#DYen82tCayNe2Su0p1Cse1
🧌
Good Night
ARS
DicSerializer
مريم خالد
DicSerializer
yes , and when i inserted it as dict , it give me error not a valid string
ARS
ARS
Or the field name which is in your case is: arb
ARS
Or eng
مريم خالد
Or eng
do you mean like this eng = EngSerializer(eng.objects.all,many=True)
ARS
Yup
مريم خالد
Yup
it makes the project crash
ARS
I have to open my computer.
مريم خالد
NameError: name 'eng' is not defined
مريم خالد
taht is the error
مريم خالد
thank you , i appreciate your help
ARS
NameError: name 'eng' is not defined
because you don't have a field name eng in the DictModel
ARS
Can you please send me the models.py
مريم خالد
مريم خالد
Can you please send me the models.py
https://linkode.org/#jUrMXxJGJ7Ggx54QTtO3v4
virtualenv
Hi. I am using Google calendar API. I implemented the flow and run the script of this page: https://developers.google.com/calendar/create-events A token.json file will be saved but does not include refresh_token. Anyone knows what's the problem?
ARS
https://linkode.org/#jUrMXxJGJ7Ggx54QTtO3v4
So I figured out that in the models.py you called related_to with id field but when you are returning in serilaizer there's no such field as 'id'
ARS
Just return : 'all'
ARS
__all.....
ARS
In fields
ARS
Of the parent serializers
مريم خالد
Of the parent serializers
i will try it thankyou
ARS
https://blog.devgenius.io/nested-serializers-in-django-rest-framework-6b36bf011074
Victor
Hi, everyone! One question: How can i migrate a new index in a large table? I'm using CONCURRENTLY and atomic = False already.
Victor
Do you have any tips?
مريم خالد
https://blog.devgenius.io/nested-serializers-in-django-rest-framework-6b36bf011074
i was able to fix the error at the end using https://stackoverflow.com/questions/41394761/the-create-method-does-not-support-writable-nested-fields-by-default
Afshin👀
hello why am I see this error File "E:\Web\tutorial\django\myweb\accounts\views.py", line 60, in activateEmail 'user': user.username,
Kauê
hello why am I see this error File "E:\Web\tutorial\django\myweb\accounts\views.py", line 60, in activateEmail 'user': user.username,
The error you are encountering is related to the activateEmail function in your code. It seems that the function is not defined or imported correctly, which results in a NameError when trying to execute it. To fix this issue, you should make sure that the activateEmail function is properly defined and accessible within your Django project. Here are a few steps to help you resolve the error: Check the views.py file located at E:\Web\tutorial\django\myweb\accounts\views.py and verify that the activateEmail function is defined within this file. Ensure that the function name is spelled correctly and that it has the correct parameters and implementation. If the activateEmail function is defined in a different file, make sure you import it correctly in your views.py file. You can use the from module_name import activateEmail syntax to import the function. Replace module_name with the actual module or file name where the function is defined. Double-check the spelling and capitalization of the function name. Python is case-sensitive, so make sure you use the exact name and casing when calling the function. By resolving the issue with the activateEmail function, you should be able to fix the error you're seeing in your code.
Afshin👀
I need get user detail from database by email but I can not find the username of user or first name and lastname why
Afshin👀
when I write and print this code username = user.username I get this as object <django.db.models.query_utils.DeferredAttribute object at 0x0000019373EA3290>
Afshin👀
the output of this code users = User.objects.filter(email=email) why this <QuerySet []> I can not fix it
Afshin👀
usernamem of user
Afshin👀
username
Денис
.first()
Денис
After filter
Afshin👀
I write it but it does not work
Afshin👀
ok i try it
Muflone
check if you received the email address used for filtering
Денис
You request to database returns no results, because user with that email does not exist
Tԋҽ Gɾҽαƚ
Can you please help me, I would like to implement a try-except to each field of a form made from a model class. The form that I have created inherits from Modelform, in which I am making use of a meta class. My model class has a name and phone number, how it would create its try-excepts, where it would create them, and then how it would call them in the form. Could you explain me step by step. Thanks 🙏
Alessandro
What exactly are you trying to do? Verify fields? Use clear_<field> methods
Tԋҽ Gɾҽαƚ
Clear()
And if I share you my repository, maybe you help me better 🥺?
Alessandro
Show your code
Tԋҽ Gɾҽαƚ
Show your code
Ok, one moment
Afshin👀
I fix it Thanks
bijeesh
Online assessment project in Django
Dare
Hii
Dare
I have one small task in Django, can anyone help me please
Doragonsureiyā
I have one small task in Django, can anyone help me please
No one can help you until you explain your difficulties.
Charly
No you are talking to a bot. And help is provided here only
Dare
Iam beginner in Django and i have received an assessment on django rest api for internship
Dare
One min sharing details
Charly
And what's your question? We are not going to help to cheat
Dare
Can you teach me how it's done like tutorial
Dare
Thus It will help me to start learn django
Dare
Iam good with python not django so am starting from scratch