Skip to content

Instantly share code, notes, and snippets.

@munisisazade
Created April 21, 2020 20:09
Show Gist options
  • Select an option

  • Save munisisazade/20e3bcf6641c632b9d5223a91e6c29a3 to your computer and use it in GitHub Desktop.

Select an option

Save munisisazade/20e3bcf6641c632b9d5223a91e6c29a3 to your computer and use it in GitHub Desktop.

Revisions

  1. munisisazade created this gist Apr 21, 2020.
    15 changes: 15 additions & 0 deletions example.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    from django.views import generic


    class CustomView(generic.View):
    def get_context_data(self, **kwargs):
    context = super(CustomView, self).get_context_data(**kwargs)
    context["menu"] = "menu"
    context["menu"] = "footer"
    return context

    class HomePage(generic.TemplateView, CustomView):
    def get_context_data(self, **kwargs):
    context = super(CustomView, self).get_context_data(**kwargs)
    context["data"] = "data"
    return context