(self, slug)
Sets the canonical slug
Sets the canonical slug
Sets the canonical slug
def set_slug(self, slug):
        """Sets the canonical slug"""

        slugs = [s.slug for s in self.slugs.all()]
        if slug in slugs:
            slugs.remove(slug)

        slugs.insert(0, slug)
        self.set_slugs(slugs)
def set_slug ( self , slug ) : slugs = [ s . slug for s in self . slugs . all ( ) ] if slug in slugs : slugs . remove ( slug ) slugs . insert ( 0 , slug ) self . set_slugs ( slugs )