[Answered ]-Django model default value in response

1👍

You can add additional value to queryset using Value expression:

from django.db.models import CharField, Value

myModel.objects.filter().values("username", "user_gender", default_city=Value('delhi', output_field=CharField()))

You can find more details about values() method here.

Leave a comment