Skip to content

Instantly share code, notes, and snippets.

@insanemainframe
Created January 19, 2014 11:01
Show Gist options
  • Save insanemainframe/8503316 to your computer and use it in GitHub Desktop.
Save insanemainframe/8503316 to your computer and use it in GitHub Desktop.
class BaseBoardClass(ListView):
model = models.Board
def get_context_data(self, board_name):
context = super(BaseBoardClass,self).get_context_data(**kwargs)
board = get_object_or_404(models.Board.objects,name=board_name) if board_name or None
context['board'] = bord
return context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment