Anonymous
Integrity error Not null constraint
Anonymous
Error
Anonymous
In postman
Mirco
Integrity error Not null constraint
You're not passing to your endpoint a non-null field
Anonymous
How to solve it
Mirco
By sending also that field
Anonymous
I'm sending it
Anonymous
is there any plugin for implement drag and drop image upload on admin?
Anonymous
I resolved it
Anonymous
Dani maybe use some Javascript libraries
Михаил
Anonymous
Dynamic form can be generated with metaclasses
Hi thanks, could you share any reference link for that
Anonymous
Does anyone know is it possible to get a work without JS?
Mirco
Does anyone know is it possible to get a work without JS?
If u wanna make dynamic web apps you must know js
Anonymous
Because as I see with Django we can prepare not only backend and also frontand)
Mirco
Because as I see with Django we can prepare not only backend and also frontand)
Yep, that's one reason Django is a framework not a library
Михаил
You can assign your fields in the Form.init method
Михаил
Dynamic form does not require much of JS
Anonymous
But when I have been learning JS, I also have been learning JQuery and this library was the most interesting ivs Vue or React, Angular)
Anonymous
I love python due to his readability
Михаил
Frontend still evolves heavily
Михаил
Hi thanks, could you share any reference link for that
Or you just can define all of your fields in your form and just display what you want in the template
Михаил
If you have some fields visibility dependence, you have to use JS
Anonymous
Can anyone tell me what are the advantages of creating api with serializers rather than with forms
Андрей
Less code and flexibility, also you can use ModelViewSet(from drf) and get all CRUD api in a couple lines of code
Михаил
Can anyone tell me what are the advantages of creating api with serializers rather than with forms
Purpose difference, you can use forms and define your model methods for serializing/deserializeing, create your views, or you can go easy way and use convinient DRF which was created for this purpose.
Михаил
You don't want crack nuts with your mobile phone
Михаил
Or with your charger cable
Sander
Could anyone help me out with the following; https://stackoverflow.com/questions/57407550/update-or-create-causing-invalid-literal-for-int-with-base-10
Anonymous
@id6598477 thanks again for your wonderful guidelines . I will try to crack down it🙏
Ярик
I'll just leave it here https://github.com/shahraizali/awesome-django
Shaikha
Does anyone know how to convert uploaded html file from user, to pdf? Using drf
Mohit
how can I package my Django Project ?
Ильдар
Hi all, please tell me how can i run python script on click button. Now I'm uses subprocess.Popen("exec(open('myfile').read()), but i see 'exec' is not recognized as an internal or external command, operable program or batch file.
Mahdi
Hi all.
Mahdi
how can i solve this django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
Aswath
What is the use of class based views
cj
What is the use of class based views
to make views based in classes
Aswath
Ur answer seems pretty self explanatory but im asking for the comparison with traditional function based views
Anonymous
Less code ... Oops functionality
cj
Ur answer seems pretty self explanatory but im asking for the comparison with traditional function based views
function based views are made using functions class based views are made using classes 🤷🏻‍♂️
Rajab
how can i solve this django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
You can use try: User=User.objects.get (pk=1) ..... except User.DoesNotExist: Print ("Oops") Like this
cj
Less code ... Oops functionality
but, trust me, I saw people writing a looooooooooooooooot of useless code in their CBV 🤷🏻‍♂️
Anonymous
I know
Anonymous
Anyone have Modelviewset crud eg
Anders (izzno / gooood) 🇳🇴
Is it normal for Django Debug Toolbar to increase loadtime by seconds when you have 200+ queries ?
Anders (izzno / gooood) 🇳🇴
https://imgur.com/rMcAdHy
Anders (izzno / gooood) 🇳🇴
Loads in ms when toolbar is disabled...
cj
that's why it has to be used only in development
Anders (izzno / gooood) 🇳🇴
Anders (izzno / gooood) 🇳🇴
Or correction, it's a number not relevant to production
cj
Or correction, it's a number not relevant to production
never deploy your project to production with developing/debugging tools enabled
Anders (izzno / gooood) 🇳🇴
never deploy your project to production with developing/debugging tools enabled
No you missunderstood. The dev version has DDT enabled and takes secconds, seemingly because of the request. This is un noticable in stage/production because DDT is disabled
cj
No you missunderstood. The dev version has DDT enabled and takes secconds, seemingly because of the request. This is un noticable in stage/production because DDT is disabled
that's because DDT has to process data, maybe that's why the request time response is slow 🤷🏻‍♂️
Anders (izzno / gooood) 🇳🇴
I never noticed because i never backported the data to dev, now i wrote a program to seed the dev env with stage data (meaning LOTs more data). Then i noticed.
Igor
Hi, i need some help. i'm using channels and want to trigger my websocket when the result of a raw query maked in oracle db (not in my models) change the values, have any manner to do this?
cj
Hi, i need some help. i'm using channels and want to trigger my websocket when the result of a raw query maked in oracle db (not in my models) change the values, have any manner to do this?
not that I know... channels work together with signals at python level, if the change is at DB level, it's too low for python to notice it, unless you have something constantly polling to it 🤷🏻‍♂️
Igor
not that I know... channels work together with signals at python level, if the change is at DB level, it's too low for python to notice it, unless you have something constantly polling to it 🤷🏻‍♂️
so i need to constantly make my query over and over, compare and trigger the signals manually when its changed. Maybe i'll start a loop in 5 in 5 minutes to do this, and when it's true, send the trigger
Igor
i'm afraid to do this
cj
nvm, have you tried it yet? or are you just thinking about it wheter it's gonna work or not?
Igor
i'm doing this right now hahah
Igor
in production
cj
but who knows, maybe there's a better approach to solve that, have you gone to walk to StackOverflow yet? 🤔 people there know magic too
Igor
yes. Thanks for the attention, i'll search better approaches and test my dumb method hahaha. If i find some good result, i'll bring here latter.
Igor
if this is interesting
Flavien
Hello guy's how to connecter Django app to MySQL database ? #please help me !
cj
Hello guy's how to connecter Django app to MySQL database ? #please help me !
flavien. Here you have a useful link: https://duckduckgo.com/?q=Hello+guy%27s+how+to+connecter+Django+app+to+MySQL+database+%3F%0A%23please+help+me+%21