Autocomplete helpers get_app_name() and get_model_name() remove empty strings from
the split URL parts list before extracting the relevant part.

This eliminates issues when using URLs with a trailing "/".