Here is my first pass at what to add in the new.html template in place of the existing for loop.
{% for language in languages %}
{% if language == config.default_language %}
<option value="{{ language }}" selected>{{ language }}</option>
{% else %}
<option value="{{ language }}">{{ language }}</option>
{% endif %}
{% endfor %}
But I know that config.default_language is wrong. Can't figure out what it should be. But I know that swapping config.default_language out for "COBOL" makes the COBOL language be the select item on page load.
PASTEY_DEFAULT_LANGUAGE
And optionally also:
PASTEY_ALLOWED_LANGUAGE
Here is my first pass at what to add in the new.html template in place of the existing for loop.
But I know that
config.default_language
is wrong. Can't figure out what it should be. But I know that swappingconfig.default_language
out for "COBOL" makes the COBOL language be the select item on page load.Originally posted by @Szeraax in https://github.com/Cesura/pastey/issues/32#issuecomment-1291064284