Changes between Initial Version and Version 6 of Ticket #4306
- Timestamp:
- Jul 16, 2007, 8:17:20 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4306
- Property Version 0.96 → SVN
- Property Triage Stage Unreviewed → Accepted
-
Ticket #4306 – Description
initial v6 1 {{{ 2 #!python 1 3 class Website(models.Model): 2 4 id = models.IntegerField(primary_key=True) … … 8 10 id = models.IntegerField(primary_key=True) 9 11 site = models.ForeignKey(Website, to_field='dfp_id') 10 12 }}} 11 13 444549 is a valid dfp_id in the Website model. 12 14 15 {{{ 13 16 Report.objects.filter(site=444549) <-- Returns results. good. 14 17 Report.objects.filter(site__id=444549) <-- Returns results, but it shouldn't. 15 18 Report.objects.filter(site__dfp_id=444549) <-- No results, but it should. 16 19 }}} 17 20 130 is the valid id for a Website. 21 {{{ 18 22 Report.objects.filter(site__id=130) <- No results, no work around. 19 23 Report.objects.filter(site__name='Validname') <- Also no results. 20 24 Report.objects.filter(site__url='validurl.com') <- Also no results 25 }}}