@classmethod
    def make_slug(cls, **kwargs):
        # TODO: Confirm that it's ok that we'll possible have dupes here
        # across elections since this is only based on office and primary
        # party. This is the way it was done in older code.
        slug = kwargs.get('office').slug
        primary_party = kwargs.get('primary_party')
        if primary_party:
            slug += "-%s" % primary_party.slug
        return slug
Returns a slug suitable for setting self.slug
dataset/ETHPy150Open openelections/openelections-core/openelex/models.py/Contest.make_slug