Danil
hm
Danil
i removed it
Danil
and get this error : Got AttributeError when attempting to get a value for field configuration on serializer ServiceSerializer. The serializer field might be named incorrectly and not match any attribute or key on the Service instance. Original exception text was: 'Service' object has no attribute 'configuration'.
Danil
so i need to add foreign key to the service model?
Danil
oh
Danil
i have it
Danil
on my serviceconfig model
inchidi
on my serviceconfig model
then you should nested it to serviceconfig then nested it again to service
Danil
but anyway, when i do it in shell all works correctly
Danil
i didn't test
inchidi
but anyway, when i do it in shell all works correctly
i mean this test that you call works correctly
Danil
i don't get it
Danil
what you did in your shell?
I‘ve imported serializer then I’ve printed config = ServiceSerializer()
Django Bot
>> Blogs - How to Create Custom Django Management Commands
inchidi
I‘ve imported serializer then I’ve printed config = ServiceSerializer()
yeah sure that would serialize your service instance. but the problem is you should know which Service data for each Order. usually drf know it from relationship between that data, or property
inchidi
then you should nested it to serviceconfig then nested it again to service
if you think "they should not related directly" then you can do this
inchidi
tldr: fix your model relationship or fix your nested serializer
Anonymous
Hello I am new to django and struggling to create a school website which offers services to student... Can't seem to figure out how to set up the models... The problem is I wish to set up a model which creates departments in the school ... Another which manages students and lastly a model for services... I want it such that when I create a department I can specify the type of services provided from the service model for that department. And each student in a department should have access to the services provided by the department.... Many departments can have the same service and a department can have many services... Please can someone help me out or better still point me to an example....
Combot
zeru bits (0) has increased reputation of KenJi (2)
bcrypt
Shit
Anonymous
zeru ,department and service use many_to_many-field, student and department use Foreign_key(model students)
Combot
zeru bits (0) has increased reputation of BAKE ZQ (1)
Anonymous
Let me try your suggestions
Django Bot
>> Links - ProtoAPI | Prototype APIs
Raghavendra
Hey guys anyone use Spotify API
Anonymous
Hi guys, anyone know how can I deploy my dj project in heroku?
Anonymous
or other host?
Anonymous
zeru bits (0) has increased reputation of BAKE ZQ (1)
Your suggestion works but each time I want to create a department it comes with all the services I have added in services... My problem is some departments may offer services that others do not
Sanjay Krishnan
Hi guys, anyone know how can I deploy my dj project in heroku?
You can use pythonanywhere.com for trial use
Django Bot
>> Links - 8 Tips for Containerizing Django Apps – Hacker Noon
Sebastian
Hi :) Normaly I just "debugg" with print(var). Now I decided to learn how to debugg in a better way. So I would like to do it with pycharm. As the following video show to me, it should be easy: https://blog.jetbrains.com/pycharm/2017/08/develop-django-under-the-debugger/ But when I try to debugg a test or something else, I get this Traceback:
Sebastian
Could somebody give a little advice how I could solve this issue?
Jayesh
Hey, I need help setting up django + vuejs/angular/react
Jayesh
I am new to nodejs
Django Bot
>> Links - Noel Wilson
Jayesh
You can use django-rest-framework
I know about rest framework. But how can i integrate react/angular in it?
Jayesh
I want to run both django and react/angular on same port.
Mirco
If I don't go worng, you can set a proxy rule on react configs to use the same port https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#proxying-api-requests-in-development
Mirco
Thanks. Let me try
👍🏻👍🏻👍🏻👍🏻
Anonymous
Hi guys i am a python coder and i am from iran Sadly free lanser or other rimote jobs sites baned us and our location But i am a human and need money as you I looking for any programmers jobs I will thank you if help me and if you can give me a project I have no hope for find here any python or django job
Anonymous
oh trying freelancing sites in other countries
Anonymous
esp 3rd wrld
Cool
Use VPN to surfing in other countries IP
Anonymous
Use VPN to surfing in other countries IP
This is not ture way is this ?
Django Bot
>> Links - Celery and Django and Docker: Oh My!
Django Bot
>> Links - When To Use Django (And When Not To) – Crowdbotics – Medium
Django Bot
>> Links - pydanny.com - Django environment variable setup
Django Bot
>> Links - Building Django Docker Image with Alpine – CODIUM – Medium
Django Bot
>> Links - Is Rails still relevant in 2018? | Hacker News - 9 Django Tips for Working with Databases – Haki Benita – Medium
Anonymous
Hi guys! How can I register a user from his Google account?! I want to use user Google account instead of registration form
Anonymous
GOOGLE API
What's the link of documentation?
Bositkhon
What's the link of documentation?
https://developers.google.com/identity/sign-in/web/
Combot
SAA (0) has increased reputation of Bositkhon Israil (1)
Bositkhon
Thanks
Good luck!
NRC
what is your issues with redis ?
I tried to insatll redis on win 10 using pip but it got fail on some dependant package install.. could not find the wheel for the same..
Mirco
Hi guys! How can I register a user from his Google account?! I want to use user Google account instead of registration form
https://wsvincent.com/django-allauth-tutorial-custom-user-model/ this one could help ya
Django Bot
>> Links - Django Hosting - djangoeurope.com
Danil
Hey guys! Why my serializer show id instead of for example user?
Danil
It's linked with FK
Mirco
Serializer relations - Django REST framework http://www.django-rest-framework.org/api-guide/relations/#example_2
Mirco
Hey guys! Why my serializer show id instead of for example user?
You can use a custom HyperLinkedField to show what you wanna about user linked with fk
Sanjay Krishnan
SAA you can use django-allauth for google and many other websites