John
I have some issues with multilevel nested API. Can you help me guys.
The mint of Linux **
Only static files
The mint of Linux **
For free with https ..gpl lisece
Anonymous
For free with https ..gpl lisece
https://lmgtfy.app/?q=host+website+on+github
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
Unknown
Hy every one
Unknown
I want to create the new project can anyone have
Unknown
Any suggestions about it ?
Bunty chhatri wala..
Any suggestions about it ?
Ecomm website..crm app..Api app..
Unknown
Ecomm website..crm app..Api app..
Thanks but I want any site where I can found topic as well as synopsis
Unknown
I am a beginner that's why
Bunty chhatri wala..
Thanks but I want any site where I can found topic as well as synopsis
Try youtube.. you'll get everything..else read a Pdf
Unknown
Oka thank u I will try
Unknown
But brother I am a beginner so I think that first I create any type of mini project,
Unknown
A blog site kind of project will be good for u
Okay bro can I get any topic related to it
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
By fetching the APIs
Anonymous
Js
Thank U mirco
Doragonsureiyā
Thank U mirco
You're welcome! 😊
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
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?
Mirco
Request.user works if user.is_authenticated as I remember. Or not?
If request user is not authenticated , request.user is AnonymousUser instance
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
How can I assign this ID to a concrete user? By IP?
Wrong method. Multiple users can have same IP
Ghorz
Simple create in in request call
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
Can anyone tell me what does serializer_class method does ?
It's not a method The method is get_serializer_class
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
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
So you mean: if "user_id" in request.user.query_params: - - make something else: request["user_id"] = uuid... request.save() And so on?
Dan
Sorry for wasting your time, bro
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
محمد دلشاد
I am getting missing 1 required positional argument:on_delete
check your models.py on foreign key relation add on_delete attribute
Sindhu
I m not getting
Sindhu
What u r saying