Ticket #7923: patchtest.diff

File patchtest.diff, 1.3 KB (added by Julian Bez, 10 years ago)
  • tests/regressiontests/admin_widgets/models.py

     
    6161>>> rel = Album._meta.get_field('band').rel
    6262>>> w = ForeignKeyRawIdWidget(rel)
    6363>>> print conditional_escape(w.render('test', band.pk, attrs={}))
    64 <input type="text" name="test" value="1" class="vForeignKeyRawIdAdminField" /><a href="../../../admin_widgets/band/" class="related-lookup" id="lookup_id_test" onclick="return showRelatedObjectLookupPopup(this);"> <img src="%(ADMIN_MEDIA_PREFIX)simg/admin/selector-search.gif" width="16" height="16" alt="Lookup" /></a>&nbsp;<strong>Linkin Park</strong>
     64<input type="text" name="test" value="1" class="vForeignKeyRawIdAdminField" /><a href="../../../admin_widgets/band/" class="related-lookup" id="lookup_id_test" onclick="return showRelatedObjectLookupPopup(this);"> <img src="%(ADMIN_MEDIA_PREFIX)simg/admin/selector-search.gif" width="16" height="16" alt="Lookup" /></a>&nbsp;<strong><a href="../../../admin_widgets/band/1/">Linkin Park</a></strong>
    6565
    6666>>> m1 = Member.objects.create(pk=1, name='Chester')
    6767>>> m2 = Member.objects.create(pk=2, name='Mike')
Back to Top