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')
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')