mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #30477 -- Made reverse lookup use Field.get_db_prep_value() from the target field.
This commit is contained in:
parent
76b993a117
commit
325d5d6445
3 changed files with 29 additions and 14 deletions
|
@ -67,10 +67,15 @@ class Annotation(models.Model):
|
|||
return self.name
|
||||
|
||||
|
||||
class DateTimePK(models.Model):
|
||||
date = models.DateTimeField(primary_key=True, auto_now_add=True)
|
||||
|
||||
|
||||
class ExtraInfo(models.Model):
|
||||
info = models.CharField(max_length=100)
|
||||
note = models.ForeignKey(Note, models.CASCADE, null=True)
|
||||
value = models.IntegerField(null=True)
|
||||
date = models.ForeignKey(DateTimePK, models.SET_NULL, null=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ['info']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue