{% extends "base.html" %} {% block title %}{{ t('Code Editor') }}{% endblock %} {% block content %}

{{ t('Code Editor') }}

{{ t('Fix the application from here. Every save is checked first and the previous version is kept, so any change can be undone.') }}
{{ t('History') }}
{% if pending %}
{{ t('Python files changed since the last restart — press “Apply & restart” to make them live') }}: {% for p in pending %}{{ p.path }}{{ ', ' if not loop.last }}{% endfor %}
{% endif %}
{% for folder, items in tree|dictsort %}
{{ folder or t('(top level)') }} {% for f in items %}{{ f.rsplit('/', 1)[-1] }}{% endfor %}
{% endfor %}
{% if content is not none %}
{{ path }} {{ t('Ctrl/Cmd + S to save') }}
{% if error %}
{{ error }}
{% endif %}
{{ t('Discard changes') }}
{% else %}

{{ t('Choose a file on the left') }}

  • {{ t('Screens are in lubwise/templates (changes are live as soon as you save).') }}
  • {{ t('Logic is in lubwise/*.py and lubwise/views/*.py (changes go live after “Apply & restart”).') }}
  • {{ t('Arabic wording is in lubwise/i18n.py.') }}
  • {{ t('A file with an error is never saved. A restart only happens after the whole application loads in a test run.') }}
  • {{ t('If the site ever fails to start, run on the server') }}: python manage.py code-undo
{% if recent %}
{% for r in recent %}{% endfor %}
{{ t('Recent changes') }}{{ t('By') }}{{ t('When') }}
{{ r.path }} {% if r.note %}— {{ r.note }}{% endif %} {{ r.username or '' }}{{ r.at.replace('T', ' ') }}
{% endif %} {% endif %}
{% endblock %} {% block scripts %} {% if content is not none %} {% endif %} {% endblock %}