Sorry, the python indentation was wrong:

query = SiteEquipment.objects.extra(tables=['sites_site'])
if asset != '':
        query |= SiteEquipment.objects.filter(asset__icontains=asset)

if mark_sel != -1:
        query |
        =SiteEquipment.objects.filter(equipment__mark__id=mark_sel)

if eq_sel != -1:
        query |= SiteEquipment.objects.filter(equipment__id=eq_sel)

if fqdn != '':
        fqdn = '%%' + fqdn + '%%'
        query |= SiteEquipment.objects.extra(
                
where=['equipments_siteequipment.site_id=equipments_siteequipment.name || 
sites_site.name ILIKE \'%s\'' %fqdn])



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to