ModelForm isnt working

You don’t have to get by primary key. (It’s an example, not a requirement or limitation.)
You can use the get method with any valid query, as long as it retrieves one and only one row.