AxJu
A Django app that controls the operating system itself. For example, restart the server. Similar to how a router is controlled via a web interface.
Anonymous
A simple TODO web app made using Django.
https://www.linkedin.com/posts/vishnu-teja-katta_computerscience-django-python-activity-6681306229354049536-tmVF
Shubham
hI
Shubham
https://dpaste.org/5GuP
Shubham
this is user listing API
Shubham
I want to create the api FOR vendor listing where is_seller=True
Shubham
class VendorList(generics.ListAPIView):
serializer_class = UserSerializer
def get_queryset(self):
user = self.request.user
return User.objects.filter(is_seller=True)
Shubham
I tried this , is it okay
?
Mindru
Return super().get_queryset().filter(is_seller=true) will ne better for me
Mindru
Because in case if you use another filter param it will be applied
Shubham
Okay got it
Shubham
Thanks
new
xhr.setRequestHeader('HTTP_X_REQUESTED_WITH', 'XMLHttpRequest')
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequst')
after set this header why I get request.is_ajax() method is false?
barto
hello people, a question
I am using the django-map-widgets library
I would like to change the API-KEY that is in the project's settings.py file
To the API-KEY I want to assign the value of a queryset
Django throws me an error when trying to do a queryset inside settings.py
How could I do this?
Shubham
Return super().get_queryset().filter(is_seller=true) will ne better for me
as you can see the o/p [
{
"url": "http://127.0.0.1:8000/api/users/11/",
"username": "vendor1",
"address_line_1": "shashtri market",
"address_line_2": "gadipura",
"first_name": "vendor1",
"last_name": "vendor1",
"email": "vendor1@gmail.com",
"phone": "123456789",
"image": "http://127.0.0.1:8000/media/BackgroundImages/2.jpg",
"is_seller": true,
"vendor": {
"deliverylt": "maharashtra",
"foodserved": "M",
"mess_center_name": "Jai jagdamb"
},
"customer": null
}
]
Shubham
how I can exlcude "customer": null" from view set
Shubham
its nested serializer I guess
shekhar
anyone who worked with google api?
Mirco
Doragonsureiyā
anyone who worked with google api?
Please don't ask meta questions like:
"Any user of $x here?"
"Anyone used technology $y?"
"Hello I need help on $z"
Just ask about your problem directly! With a very high amount of people here the probability that someone will help is pretty high.
Also please read: http://catb.org/~esr/faqs/smart-questions.html
shekhar
how do i read google sleep data?
shekhar
google fit sleep
Mirco
Doragonsureiyā
how do i read google sleep data?
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Bunty chhatri wala..
Show your admin.py and models.py code
barto
How can I load a model at the start of django. In the settings file?
Anonymous
author = models.Foreignkey(settings.AUTH_USER_MODEL, on_delete = models.CASCADE)
AUTH_USER_MODEL should be in your settings.py
Gil
Scrim
I deleted all migrations on my migrations folder, just keeping init. Deleted Django_migrations table. But when I try migrate again, appear Django.db.utils.ProgrammingError: column name of relation "django_content_type" does not exist
Scrim
I'm using PostgreSQL and Django 2.2.7
barto
Why?
I am using the django-map-widgets library
I would like to change the API-KEY that is in the project's settings.py file
To the API-KEY I want to assign the value of a queryset
Django throws me an error when trying to do a queryset inside settings.py
barto
Paschaljet
https://linkode.org/#XFa2Pwo0CwitnkIXVVZgg7 family please help me chec this
barto
Scrim
I deleted all migrations on my migrations folder, just keeping init. Deleted Django_migrations table. But when I try migrate again, appear Django.db.utils.ProgrammingError: column name of relation "django_content_type" does not exist
I'm using PostgreSQL and Django 2.2.7
Anonymous
barto
Ghorz
shekhar
how do i hit this api in python?
https://developers.google.com/fit/scenarios/read-sleep-data
Ghorz
Be sure you have author_id field and do migrations
Ghorz
Click on REST next to instructions, use Ajax or js Fetch
shekhar
https://pastebin.com/V2UJjSDN
Ghorz
Pastebin your code
shekhar
im getting this error
shekhar
shekhar
shekhar
https://www.googleapis.com/fitness/v1/users/me/sessions?startTime=2020-06-05T00:00.000Z&endTime=2020-06-12T23:59:59.999Z&activityType=72
Ghorz
shekhar
i hit this api by changing the date
shekhar
Your python code
i did it on auth playground till now i haven't written any code
Ghorz
If the date has no data you get nothing
shekhar
https://developers.google.com/oauthplayground/
shekhar
like what parameters do i need to take?
Ghorz
Ghorz
Ghorz
shekhar
You fed wrong parameter
i tried in oauth playground there is nothing to pass only get request same as postman
shekhar
@Ghorz ??
shekhar
isa
Anyone can help me ? I think I don't make a unique constraint but get error.
https://hastebin.com/oxifofoxer.sql
Anonymous
guysss , We have problem ı need help pls , Project Translate problem we cant fixed anybody can support me ??
isa
Anonymous
Hi all,I build whataspp messaging chatbot using twilio api.instead of twilio is there any other way to create chatbot?
Scrim
Scrim
Scrim
i did all this things
Scrim
but my table not create itself again
Mindru
delete all tables from database