mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Fixed dtails view
This commit is contained in:
parent
c65f225612
commit
ac8789e442
1 changed files with 2 additions and 3 deletions
|
@ -129,13 +129,12 @@ class SnippetDetailView(SnippetView, DetailView):
|
||||||
# Remove blank lines
|
# Remove blank lines
|
||||||
return highlighted.replace('\n\n', '\n')
|
return highlighted.replace('\n\n', '\n')
|
||||||
|
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
snippet = self.get_object()
|
self.object = self.get_object()
|
||||||
|
|
||||||
ctx = super(SnippetDetailView, self).get_context_data(**kwargs)
|
ctx = super(SnippetDetailView, self).get_context_data(**kwargs)
|
||||||
ctx.update({
|
ctx.update({
|
||||||
'wordwrap': snippet.lexer in highlight.LEXER_WORDWRAP,
|
'wordwrap': self.object.lexer in highlight.LEXER_WORDWRAP,
|
||||||
'diff': self.get_snippet_diff(),
|
'diff': self.get_snippet_diff(),
|
||||||
})
|
})
|
||||||
return ctx
|
return ctx
|
||||||
|
|
Loading…
Reference in a new issue