John
I have some issues with multilevel nested API. Can you help me guys.
The mint of Linux **
The mint of Linux **
Only static files
The mint of Linux **
For free with https ..gpl lisece
Anonymous
What is DRF? and why it is used for?
Doragonsureiyā
What is DRF? and why it is used for?
Step 1: Open a browser
Step 2: Write down https://google.com or https://duck.com and press Enter
Step 3: In the search box, write down the same words you asked here
Step 4: Read the first results
KJ
Hi guys
KJ
I am creating a django web app and I’m having this error in my HTML page;
AttributeError: list object has no attribute objects
The mint of Linux **
Unknown
Hy every one
Unknown
I want to create the new project can anyone have
Unknown
Any suggestions about it ?
Unknown
I am a beginner that's why
Bunty chhatri wala..
Unknown
Oka thank u I will try
Akhil
Unknown
But brother I am a beginner so I think that first I create any type of mini project,
Unknown
Anik8
Unknown
Rupjyoti
Hi all can you tell how to add value in excluded field in createview if form valid.
Anonymous
I used flutter to create the front end and django in the backend ok then I created API and tested API works good. how can connect API with flutter frontend
Anonymous
using JavaScript?? or something else?
Mirco
Mirco
By fetching the APIs
Anonymous
Mirco
Dan
Men, such a question: if I want an anonymous user participating in a survey and sending a numerical ID while doing it - how can I realise it ? I try to make API. It's necessary for a case when an anonymous user would see all his answers. Was thinking bout it during several days and only one thing in my mind that user model must inherit AnonymousUser and have a field named e.g. num_id. Please help with an advice or a URL. Thanks a lot
Ghorz
Ghorz
Or you create an Id on user first visit, append it to the request. Pass it into the API
Dan
Request.user works if user.is_authenticated as I remember. Or not?
Ghorz
Dan
Oh, really? I didnt know thanks, I'll try
Ghorz
Generate an Id for each request
Ghorz
Then subsequently check if an Id exist else create one. Then pass it around. I'll prefer you pass it into request.
Ghorz
Second method will be to use Javascript to create sessionStorage or Localstorage
Dan
How can I assign this ID to a concrete user? By IP?
Ghorz
That can be cleared once the user is done with participation or clear storage based on time interval or expiry
Dan
JS not my choose, it must be only django Who makes an api
Ghorz
Ghorz
Simple create in in request call
Dan
Dan
Ok, thanks
Dan
Interesting task for me bcoz never did something similar to it
Ghorz
It's quite simple
Ghorz
Write a function call that checks if an Id exist for a request. Else create an Id and pass to the request
request['user_id'] = uuid....... M
Ghorz
you can extract user_id from any request call
Ghorz
You can also write global context and add it to your context processor in settings.py
Ankush
Can anyone tell me what does serializer_class method does ?
Mirco
Mirco
Anyway the attribute and the method are used to specify the serializer for a DRF endpoint
Dan
You can rewrite it if you want to change Serializer class depending of what kind of user makes request
Dan
Sorry for wasting your time, bro
Ghorz
Ghorz
But the algorithm has to be more complex
Dan
Obviously
Akil
try python manage.py runserver
Sindhu
Try python manage.py migrate
After python manage.py runserver
Mirco
What do you mean no url or response ?
zuzuzuzu
First you have to be in the project folder brother.
zuzuzuzu
Type
ls
zuzuzuzu
And cd into directory
zuzuzuzu
If you have started a project then, either (python manage.py runserver) or (python3 manage.py runserver) would work
zuzuzuzu
Try the above.
zuzuzuzu
If already a local port is working, you can also try changing the port both 8080/8000 works fine.
Mirco
You need to provide more info
What you see after running the runserver could help
Akhil
Can we make a payment api ??
Sindhu
I am getting missing 1 required positional argument:on_delete
Sindhu
While creating models
Sindhu
Can anyone help
Sindhu
Sindhu
I m not getting
Sindhu
What u r saying