dispatch/theme/validators.py
def validate_zone(zone):
    """Checks that the given zone contains the required fields"""

    if not has_valid_id(zone):
        raise InvalidZone("%s must contain a valid 'id' attribute" % zone.__name__)

    if not has_valid_name(zone):
        raise InvalidZone("%s must contain a valid 'name' attribute" % zone.__name__)
def validate_zone(zone):
    """Checks that the given zone contains the required fields"""

    if not has_valid_id(zone):
        raise InvalidZone("%s must contain a valid 'id' attribute" % zone.__name__)

    if not has_valid_name(zone):
        raise InvalidZone("%s must contain a valid 'name' attribute" % zone.__name__)
Checks that the given zone contains the required fields