try
remove_ranks = ['Field Marshall', 'Military Attache', 'Mercenary Recruiter']
Rank.objects.exclude(name__in=remove_ranks)
what does it do?
.exclude
is the opposite of .filter
name__in
is the equivalent of a IN-Statement in SQL
This should produce a sql query something along the line
Select * from rank where name not in ('Field Marshall', 'Military Attache', 'Mercenary Recruiter')