Last active
January 27, 2016 05:29
-
-
Save madhukar93/56e94650d8ef943e9f46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from django.db.models import F | |
class TestModel(models.Model) | |
uid = models.IntegerField() | |
big_complicated_name = models.CharField() | |
TestModel.objects.annotate(name=F('big_complicated_name')) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment