AxJu
just make a view
I'll take a look at that.
Alan
I'll take a look at that.
let me get this, a djago app to control other django app or that can control itself?
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?
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
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
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
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
The error /lib/python3.8/site-packages/django/apps/registry.py", line 135, in check_apps_ready raise AppRegistryNotReady("Apps aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
Paschaljet
https://linkode.org/#XFa2Pwo0CwitnkIXVVZgg7 family please help me chec this
barto
The error /lib/python3.8/site-packages/django/apps/registry.py", line 135, in check_apps_ready raise AppRegistryNotReady("Apps aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
Apparently being able to modify the setting dynamically is like hacking django I have been with this problem for several days and I suppose it is very complex 😁
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
Ghorz
Please suggest which framework is the best
Since you're here Django is the best.
shekhar
how do i hit this api in python? https://developers.google.com/fit/scenarios/read-sleep-data
Ghorz
Sorry, I meant a Django app
I hope you know what you're doing. Kinda like leaving key at the door
Ghorz
Be sure you have author_id field and do migrations
Ghorz
how do i hit this api in python? https://developers.google.com/fit/scenarios/read-sleep-data
https://www.googleapis.com/fitness/v1/users/me/sessions?startTime=2019-12-05T00:00.000Z&endTime=2019-12-17T23:59:59.999Z&activityType=72
Ghorz
Click on REST next to instructions, use Ajax or js Fetch
shekhar
Click on REST next to instructions, use Ajax or js Fetch
i'm using python but i have already changed the sart end time but i'm not getting any o/p
shekhar
https://pastebin.com/V2UJjSDN
Ghorz
Pastebin your code
shekhar
im getting this error
shekhar
Pastebin your code
wait a minute
shekhar
Pastebin your code
i was trying on auth playground but this was error there
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
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
Gil
Apparently being able to modify the setting dynamically is like hacking django I have been with this problem for several days and I suppose it is very complex 😁
Instead of hacking django, can you try hack the application? Other thing, that i havent tested.. can be: Create function that delivers this api key, out of settings I settings, point to this function, with this you aren executing the code inside, when loadinf setttings... maybe work
Ghorz
If the date has no data you get nothing
shekhar
https://developers.google.com/oauthplayground/
shekhar
If the date has no data you get nothing
can i tell me how do i write code in python for this?
shekhar
like what parameters do i need to take?
shekhar
If the date has no data you get nothing
but why is it showimg error if no data is there?
shekhar
Pastebin the error
https://pastebin.com/V2UJjSDN
Ghorz
https://pastebin.com/V2UJjSDN
You fed wrong parameter
shekhar
You fed wrong parameter
i tried in oauth playground there is nothing to pass only get request same as postman
shekhar
@Ghorz ??
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 ??
cj
guysss , We have problem ı need help pls , Project Translate problem we cant fixed anybody can support me ??
it's the 3rd day I'm reading you asking that... still you didn't explain the error you have and you didn't either show your code 🤷🏻‍♂️ how do you expect people to help you if you don't explain things?
Anonymous
Hi all,I build whataspp messaging chatbot using twilio api.instead of twilio is there any other way to create chatbot?
Scrim
i did all this things
Scrim
but my table not create itself again
Mindru
delete all tables from database