Rajjix
yep += ( access, )
Rajjix
tuple + tuple no error tuple + str or int => server goes down
Anders (izzno / gooood) 🇳🇴
wait theres a problem
Rajjix
shit
Anders (izzno / gooood) 🇳🇴
it complaines about not having fields
Anders (izzno / gooood) 🇳🇴
it has nothing to add the += to (field does not exist in that class....)
Anders (izzno / gooood) 🇳🇴
Does it inherit meta ?=
Rajjix
but ur overriding it anyway even if it does
Rajjix
so u need another variable
Rajjix
No no
Anders (izzno / gooood) 🇳🇴
mhm...
Mirco
Does it inherit meta ?=
https://www.django-rest-framework.org/api-guide/serializers/#serializer-inheritance Could help ya You should explicitly inherit Meta
Rajjix
fields = list + (“acc”, )
Rajjix
It’s a compliment btw
Mirco
You’re an enhanced search engine when it comes to django related stuff 🚀
😂😂 Right keywords often take you to right places inside official docs
Rajjix
mhm...
waiting for an update...🧐
Anders (izzno / gooood) 🇳🇴
Im working on it
Anders (izzno / gooood) 🇳🇴
;)
Rajjix
😂😂 Right keywords often take you to right places inside official docs
that’s an underestimated skill to a lot of people
Mirco
It’s a compliment btw
Obviously I don't know everything, but by searching I always learn new stuff 🎉 and I try to help friends
Anders (izzno / gooood) 🇳🇴
its still not picking up fields..
Rajjix
you shouldn’t use +=
Mirco
that’s an underestimated skill to a lot of people
Yup! It seems stupid, but lots of people can't use search engine properly
Rajjix
fields = list + (“acc”, )
Anders (izzno / gooood) 🇳🇴
so define the tuple outside the classes ?
Rajjix
BINGOO
Rajjix
That was my whole point but i fucked up in my first answer was typing too fast, sorry xd
Anders (izzno / gooood) 🇳🇴
haha :) np works
Anders (izzno / gooood) 🇳🇴
https://pastebin.com/tjhDTxvr
Anders (izzno / gooood) 🇳🇴
But is it more readable, hehe......
Anders (izzno / gooood) 🇳🇴
But i learned a lot ;), thanks !
Mirco
use upper case , it's like a constant Follow py style code 😀
Rajjix
it looks sexy but if you want u can make a fields.py and from import
Rajjix
Looks more professional 👨‍⚖️
Anders (izzno / gooood) 🇳🇴
hm , yes...
Anders (izzno / gooood) 🇳🇴
not a bad idea ;)
Anders (izzno / gooood) 🇳🇴
now we're talking ;)
Anders (izzno / gooood) 🇳🇴
https://pastebin.com/DkrKiGRY
Rajjix
😍😍🙇‍♂️
Anders (izzno / gooood) 🇳🇴
oh man, that cleaned up the whole file, thanks a bunch, ill buy you a beer ;)
Anders (izzno / gooood) 🇳🇴
Both of you
Rajjix
😁😁 🍻
Anders (izzno / gooood) 🇳🇴
i could make a pcakage and do all the "big" fields like this and just use fields.something ... would look very nice hehe
Anders (izzno / gooood) 🇳🇴
but thats for another day ;)
Rajjix
as for me i always have a myfile in my environment directory and add a lot of variables and simple functions there specially secret keys, passes, api keys, etc
Anders (izzno / gooood) 🇳🇴
I have a file for the admin url and secret, but thats a great idea.
Anders (izzno / gooood) 🇳🇴
I made a css to mach the admin site to the django rest framwork: https://pastebin.com/RsweLHP1 With that I will go to bed.
Rajjix
thanks for sharing, i’ll check it out 👀
Anders (izzno / gooood) 🇳🇴
You dont see the buttons but you get the idea, gn and thanks for all the help,
Rajjix
gn
Fataj
hello
Anonymous
A few weeks after it's ready, I'll post the source code on github. There are still a lot of things and adjustments left. https://www.youtube.com/watch?v=r2FC0j5gxR8
Anonymous
can i redirect ajax response to another page
R
Whats the purpose of using ajax then?
Anonymous
use ajax to get data and after that i want show the data in new html page
R
I don’t see much sense in using ajax for that, take a look at link prefetch https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ
Сергей
Hello, I have model with foreign key, in request parmeters form fk model and many parameters for model with this fk, what is solved to insert those data to database with django rest framework?
Kabir
Hi guys I’m starting with django I just learnt a brief but don’t know the actual functionality. Can you recommend me some tutorials probably video tutorials
cj
Did you read what the error message is telling you?
Shubham
Ya it's related the find_all
Mirco
Both of you
💪💪💪
Shubham
Did you read what the error message is telling you?
When I put .text it shows this error but I remove it it gives me results with all html code related to given argument
cj
When I put .text it shows this error but I remove it it gives me results with all html code related to given argument
So, basically you're saying you are not reading what the error message is telling you
Shubham
Okay I will read it
Shubham
I still don't get it how to treat the list
Shubham
Please help
Anonymous
Linux folks need help
George
Linux folks need help
>multiplatform chat
Anonymous
I am having WiFi driver issue
Anonymous
On my new laptop
Anonymous
https://www.asus.com/in/Laptops/ASUS-VivoBook-15-X510UN/
George
I am having WiFi driver issue
Google it. That is offtopic
George
Linux forums are more prepared and documented than us
Anonymous
Okay do you know any Linux group
George
Just google, why are you so lazy
Anonymous
Anonymous
But I am unable to find