[Fixed]-Django template how to read URL view keyword

1👍

You can get gigi param in your view, and then send it to the view in your context:

def myview(request, gigi):
    context = {'gigi': igigi}
    ...

EDIT:

After your edit:

class SimpleCreateView(CreateView):

    ...

    def get_context_data(self, **kwargs):
        ctx = super(SimpleCreateView, self).get_context_data(**kwargs)
        ctx.update({'gigi': self.kwargs['gigi']})
        return ctx
👤Gocht

Leave a comment