Django model filter for string

I have table which has string such as

id | url
1  | /myapi/1241/
2  | /myapi/
3  | /myapi/1423/
4  | /myapi/

Now I want to filter them like this below

myModel.Objects.filter(url="/myapi/****/")

Is it possible , or is there any method to do this?

Filter with the __regex lookup [Django-doc]:

myModel.Objects.filter(url__regex=r'/myapi/\d+/')
Back to Top