All modules are now plugins. The config.py calls load_plugin for each plugin it needs (some plugins may load others automatically). Also each plugin keeps its own template folder which gets added to the template search path, so i.e. if the photo plugin is unloaded completely, the URL endpoints won't work either (with the old system, since the HTML templates still existed in the default root the endpoints would still serve pages, just without any Python logic behind them).
32 рядки
922 B
HTML
32 рядки
922 B
HTML
{% extends "layout.html" %}
|
|
{% block title %}Edit Photo{% endblock %}
|
|
{% block content %}
|
|
|
|
<h1>Edit Photo</h1>
|
|
|
|
<img src="{{ app['photo_url'] }}/{{ photo['thumb'] }}" class="portrait"><p>
|
|
|
|
<form name="edit" action="{{ url_for('photo.edit', key=key) }}" method="POST">
|
|
<input type="hidden" name="token" value="{{ csrf_token() }}">
|
|
|
|
<strong>Photo Caption:</strong><br>
|
|
<input type="text" size="40" name="caption" value="{{ photo['caption'] }}"><p>
|
|
|
|
Rotate:
|
|
<label>
|
|
<input type="radio" name="rotate" value="" checked> Leave alone
|
|
</label>
|
|
<label>
|
|
<input type="radio" name="rotate" value="left"> Left 90°
|
|
</label>
|
|
<label>
|
|
<input type="radio" name="rotate" value="right"> Right 90°
|
|
</label>
|
|
<label>
|
|
<input type="radio" name="rotate" value="180"> 180°
|
|
</label><p>
|
|
|
|
<button type="submit">Save Changes</button>
|
|
</form>
|
|
|
|
{% endblock %} |