I am trying to create a unique slug in Django so that I can access a post via a url like this: http://www.example.com/buy-a-new-bike_Boston-MA-02111_2
The relevant m
My little code:
def save(self, *args, **kwargs): strtime = "".join(str(time()).split(".")) string = "%s-%s" % (strtime[7:], self.title) self.slug = slugify(string) super(Need, self).save()