Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. class Base(View):
  2. title = 'abc'
  3. slug = 'abc-12'
  4. def get_context(self, request):
  5. return {'title': self.title, 'slug': self.slug }
  6.  
  7. class Logbook(Base)
  8. mode = 'read'
  9. def get_context(self, request)
  10. # call super class
  11. return super().add('mode': self.mode)
  12. # i want {'title': 'abc', 'slug': 'abc-12', mode: 'read' }
  13.  
  14. def get(self, request)
  15. context = self.get_context(request)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement