Abstracting Gist's options

This commit is contained in:
Marco Rougeth 2014-05-05 00:02:54 -03:00
parent f094e72788
commit f7e954491c

View file

@ -209,10 +209,10 @@ def snippet_gist(request, snippet_id): # pragma: no cover
""" """
snippet = get_object_or_404(Snippet, secret_id=snippet_id) snippet = get_object_or_404(Snippet, secret_id=snippet_id)
data = { data = {
'description': 'the description for this gist', 'description': getattr(settings, 'DPASTE_DEFAULT_GIST_DESCRIPTION', 'the description for this gist'),
'public': False, 'public': False,
'files': { 'files': {
'dpaste.de_snippet.py': { getattr(settings, 'DPASTE_DEFAULT_GIST_NAME', 'dpaste.de_snippet.py'): {
'content': snippet.content, 'content': snippet.content,
} }
} }