示例#1
0
    def generate_slug(self):
        
        siblings = self.get_siblings(False)
        # -- Make sure slug is unique
        if self.slug:
            raw_slug = self.slug
        else:
            raw_slug = self.title

        raw_slug = raw_slug.lower()
        
        unique_slugify(self, raw_slug, 'slug', siblings, "_")

        return self.slug
示例#2
0
    def generate_slug(self):

        siblings = self.get_siblings(False)
        # -- Make sure slug is unique
        if self.slug:
            raw_slug = self.slug
        else:
            raw_slug = self.title

        raw_slug = raw_slug.lower()

        unique_slugify(self, raw_slug, 'slug', siblings, "_")

        return self.slug
示例#3
0
 def generate_slug(self):
     starting_slug = '%s-%s' % (self.parent.slug, self.title)
     unique_slugify(self, starting_slug)
     return self.slug
示例#4
0
 def generate_slug(self):
     unique_slugify(self, self.title, 'slug', None)
     return self.slug
示例#5
0
 def generate_slug(self):
     starting_slug = '%s-%s'%(self.parent.slug, self.title)
     unique_slugify(self, starting_slug)
     return self.slug
示例#6
0
 def generate_slug(self):
     unique_slugify(self, self.title, 'slug', None)
     return self.slug