DEV Community

Vicente Antonio G. Reyes
Vicente Antonio G. Reyes

Posted on

Remove "%...% in urls

0

My urls in django have %.... How can I change that? At first this was ok but suddenly changed at some point in my day. My views, models and urls are as follow:

class Rant(UUIDModel, TitleSlugDescriptionModel, TimeStampedModel, models.Model)
    categories = models.ManyToManyField(Category)

    def slugify_function(self, content):
        return content.replace("_", "-").lower()

    def get_absolute_url(self):
…

Top comments (0)

Regex for lazy developers

regex for lazy devs

You know who you are. Sorry for the callout 😆