Cesura / pastey

A minimal, self-hosted paste platform
https://pastey.link/
BSD 3-Clause "New" or "Revised" License
106 stars 12 forks source link

Perhaps a better name would be #34

Open Warone624 opened 1 year ago

Warone624 commented 1 year ago
          Perhaps a better name would be 

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.

{% 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.

Originally posted by @Szeraax in https://github.com/Cesura/pastey/issues/32#issuecomment-1291064284