Example #1
0
    def _slugify(self, seed):
        ''' set a slug for the post from its title.
        in this case it is used to work out the post's url.

        each publication subclass should have its own method.'''
        self.slug = slugify(seed,
                            instance=self,
                            slug_field='slug')
Example #2
0
    def _slugify(self, seed):
        ''' set a slug for the user from its first name.
        in this case it is used to work out the user's info page.

        each model that needs a slug should have its own method.'''
        self.slug = misc.slugify(seed,
                            instance=self,
                            slug_field='slug')