def find(cls: typing.Type, tag_name: str) -> "Tag": """Get the first tag with the given name. Args: tag: The name of the tag to find Returns: The tag with the given name. """ for tag in cls.filter({"search": tag_name}): return tag raise Http404
def find(cls: typing.Type, name: str) -> "MarketingList": """Get the list with the given name. Args: name: The name of the list to find Returns: The list with the given name. """ for lst in cls.filter({"filters[name]": name}): return lst raise Http404
def find(cls: typing.Type, email: str) -> "Contact": """Find contact by email.""" for contact in cls.filter({"email": email}): return contact raise Http404