[Answer]-Django Autogenerate links with new pages

1👍

URL patterns in Django can be anything you’d like; there’s no convention. An easy way to do this is to add a permalink to your model that will calculate the format you’re looking for.

You’ll need to add a corresponding URL pattern to resolve the pattern to your view method or class as well, and how that is constructed largely depends on what you need to do with the parameters, if any you’re passing in.

See: https://docs.djangoproject.com/en/1.4/ref/models/instances/#the-permalink-decorator for an example on permalinks

Leave a comment