Creating search operators for PostgreSQL Backend

I’ve built a PostgreSQL database containing Systems inventory data including location, owner, ip, host name, and port scan information. The data resides in three tables. I’ve built a simple interface with search fields for each of the columns in php. I’m trying to build a new and much improved front end in django that includes a single search bar that allows for search parameters similar to google dorks (i.e. IP: for search on the IP address field and -PORT: to exclude a specific port number). I’ve poured over django documentation time and time again and can’t seem to get anywhere with it.

I understand the question is a bit vague but if anyone can help point me in the right direction to get this working and transition from the PHP monstrosity I’ve created, I’d greatly appreciate it.

Hi, could you be more specific?
it is possible to use filters on a model used in a view.

here you have an example: