Post details using slug instead of PK in Django - 32
From this video we are going to start to solve some small situations, some small problems that we left pending in this case it is referring to what the slug is since we are not using it here, we are looking for it is by the PK which I obviously do not want because for something we configured the slug So for that nothing easier:
mystore\elements\views.py
def detail(request, slug):
element = Element.objects.get(slug=slug)
***