Added settings docs for Gist changes made in issue #58.

This commit is contained in:
Martin Mahner 2014-06-08 20:21:59 +02:00
parent 9f1650693b
commit ae61e6f9aa
2 changed files with 7 additions and 1 deletions

View file

@ -90,6 +90,12 @@ behavior without touching the code:
The key of the default value of ``DPASTE_EXPIRE_CHOICES``. Default:
``3600 * 24 * 30 * 12 * 100`` or simpler: ``DPASTE_EXPIRE_CHOICES[2][0]``.
``DPASTE_DEFAULT_GIST_NAME``
String. The filename used when pasting a snippet on Github Gist.
Default: ``dpaste.de_snippet.py``
``DPASTE_DEFAULT_GIST_DESCRIPTION``
String. The filename used when pasting a snippet on Github Gist.
Default: ``dpaste.de_snippet.py``
.. _lexer list: https://github.com/bartTC/dpaste/blob/master/dpaste/highlight.py#L25

View file

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