9 karma · joined Jun 5, 2016 (10y ago) · 4 submissions
comment 3y ago · link · parent
Alternatively you can also tell the ORM to return a dictionary rather than a model instance: https://docs.djangoproject.com/en/4.1/ref/models/querysets/#...
For example, you may get a list of dictionaries with only "field1", "field2" and "field3" from a model like this:
SomeModel.objects.filter(...).values("field1", "field2", "field3")
[{"field1": "foo", "field2": "bar", "field3": "baz"}]comment 3y ago · link · parent
comment 8y ago · link · parent
You can turn 3D scenes into 2D vectors.
comment 9y ago · link · parent