Zey
i wrote localhost but that will not work as i am deploying it
Mirco
i want to track who created and who updated the object
use the same strategy of TimeStampedModel
Mirco
okay, thanks
just create an Abstract model where you store the reference to User
Neo
just create an Abstract model where you store the reference to User
i have done like this, but i don't know how to auto populate user data into these fields class TimeStampedModel(TimeStampedModel): created_by = models.ForeignKey(User, on_delete=models.CASCADE, related_name='created_user') updated_by = models.ForeignKey(User, on_delete=models.CASCADE, related_name='updated_user') class Meta: abstract = True
Ernest
Hi everyone, how can i handle email user verification with efficiency using Django Rest Framework?
Siddharth
Hi everyone, Django rest framework cursor pagination does not support ordering = "model__value" (foreign key field refrenced with double underscore) , any solution for this problem?
Mirco
i am using django rest framework, will it works
yup, admin panel is the same Django Rest Framework is just an app of Django
Ali Vs
Hi NodeNodeFoundError
Ali Vs
Hi NodeNodeFoundError
Who know about this?
Doragonsureiyā
Who know about this?
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Ali Vs
!meta
Ok Sorry
Mirco
Anyone knows solution to this problem ?
us the order_by in the get_queryset
Siddharth
us the order_by in the get_queryset
I did used it but its compulsory to provide ordering to cursor pagination and this ordering reverses the whole output.
Mirco
I did used it but its compulsory to provide ordering to cursor pagination and this ordering reverses the whole output.
the ordering in any case defines the order of the queryset ( paginated or not )
SHERLOCK
I am following this project tutorial: https://github.com/circuitar/SensorMonitor I went through the procedure, as it is, but was shown errors at step 6. I tried running: python manage.py makemigrations, but didn't work. Can somebody help me?
Mirco
Thanks 🙂 i got solution.
Share the solution for other members 😊 This is the real goal of this group
Siddharth
Share the solution for other members 😊 This is the real goal of this group
Sure, as i want top 100 results as paginated data. so i did applied order_by on get_queryset() method like :- Model.objects.all().order_by('...')[:100] and then in ordering of cursor pagination i provided '-creation_time'. This provides me top 100 records + creation_time ordering of these 100 records. 🙂
Siddharth
So the order by as I suggested u 😊
Yess, actually i did applied this earlier also but i got this solution while talking with you 😊
Siddharth
Dishant
Can someone has used Django authentication using biometrics in his/her project?? if anyone please ping me I have been stuck nearly about 3 days in one problem
Siddharth
Did anyone used aws (amazon web services) elasticCache with django ?
Siddharth
yes, with Redis
Great, i am going to do this first time, can you pls guide me for django side.
Mirco
Great, i am going to do this first time, can you pls guide me for django side.
nothing special, the same configuration you find inside Django Cache topic
Siddharth
nothing special, the same configuration you find inside Django Cache topic
Ok then, can i ask you later if i face any problem.🙂
Mirco
CACHES = { 'default': { 'BACKEND': 'django_redis.cache.RedisCache', 'LOCATION': "<ElasticCacheAddress>", 'OPTIONS': { 'CLIENT_CLASS': 'django_redis.client.DefaultClient', } } P.S. I use django-redis
Doragonsureiyā
Thanks ☺
You're welcome! 😊
Siddharth
!yw
Also you may have hosted django on aws ?
Siddharth
yup
Great, i may need to contact you later for help 🙂. Thanks
Mirco
Great, i may need to contact you later for help 🙂. Thanks
if I have time, I will answer your questions 👍🏻
Dharmu
I am creating coin based game 1: where user may login 2: in the game there are three colors Where user can place bet on color 3: coin detucted from user wallet 4 : random winner show 5: after winner show winning coin reflected in users wallet
Shoxrux
Hello guys. How to get child node names in django rest with django mptt package
sarth
hi friends, is there any thing to handel background task like crown job for windows user, please help and suggest.
Вячеслав
Maybe celery?
Vishnu
Hello guys How can I add two additional field (phone, location) in django user model by using AbstractUser
Ted
Hello so im building a website using Django for my school project and my Admin is now no longer working please help Admin.py from django.contrib import admin from django.contrib.auth.admin import UserAdmin # Register your models here. Models.py from django.contrib.auth.models import AbstractUser from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver Terminal area: AttributeError: 'AdminSite' object has no attribute 'Home_template' [12/May/2021 13:48:47] "GET /admin/ HTTP/1.1" 500 92954
Valery
that`s all your code in admin.py?
Financial Engineer
We Analyze the stock market daily given stock tips and strategy also can we develop a trading robot using DJango
Vivek
hello can someone help me with this I just started learning: https://imgur.com/a/bppTA9y
Vivek
I dont get it, all other methods work. can you please tell what do i need to do to fix it
Valery
use Response instead JsonResponse
Hian
is possible make a query in orm as select x,y from (select ... ) z?
Valery
is possible make a query in orm as select x,y from (select ... ) z?
https://docs.djangoproject.com/en/3.2/ref/models/expressions/#subquery-expressions
Vivek
but why wasnt it accepting json response though?
Hian
is works just a column
Hian
i need more columns
Valery
but why wasnt it accepting json response though?
but why you need JsonResponse if "Response" in DRF already response in json data format?
Vivek
but why you need JsonResponse if "Response" in DRF already response in json data format?
Actually I was following a tutorial on udemy, that's why just followed. No idea how this works because just started learning. Any good resource to learn about DRF would be of great help
Vivek
Maybe you should change tutorial?) Or maybe you misunderstood something from it
I crosschecked. He did the same Idk why it worked for him and not for me. Maybe has something to do with the versions
Valery
Don`t know(
Valery
Maybe he does not using actions decorators in video
Valery
And show you how to response json data not using DRF. Just Django
Vivek
Can you please share any good resource to learn more regarding Django rest if possible?
Sea Dragon
is possible make a query in orm as select x,y from (select ... ) z?
use values or values_list in the query with respective column
Valery
Can you please share any good resource to learn more regarding Django rest if possible?
Drf docs is fine. And all over the Internet are good articles. Unfortunately I don’t know what is best tutorials on Udemy
Sea Dragon
hello can someone help me with this I just started learning: https://imgur.com/a/bppTA9y
you must return a response(http, json like this) in view, read the error message once again
Hian
i need a subquery or CTE, a second query need ordered
Vivek
you must return a response(http, json like this) in view, read the error message once again
That guy used JsonResponse for Get put post everything they worked fine but delete did not work.