Cambio de rutas: ahora portada muestra noticias y gestión de feeds pasa a /feeds. Mejoras en navegación y backup.

This commit is contained in:
jlimolina 2025-05-26 17:50:55 +02:00
parent b3dc6a4ac2
commit d7cabbb2c6
5 changed files with 222 additions and 61 deletions

50
templates/edit_feed.html Normal file
View file

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<title>Editar Feed RSS</title>
</head>
<body>
<h1>Editar Feed</h1>
<form method="post">
<label>
Nombre del feed:<br>
<input name="nombre" placeholder="Nombre" value="{{ feed['nombre'] }}" required>
</label>
<br><br>
<label>
URL del RSS:<br>
<input name="url" placeholder="URL" value="{{ feed['url'] }}" required>
</label>
<br><br>
<label>
Categoría:<br>
<select name="categoria_id" required>
<option value="">— Elige categoría —</option>
{% for cat in categorias %}
<option value="{{ cat.id }}" {% if cat.id == feed['categoria_id'] %}selected{% endif %}>{{ cat.nombre }}</option>
{% endfor %}
</select>
</label>
<br><br>
<label>
País:<br>
<select name="pais_id" required>
<option value="">— Elige país —</option>
{% for p in paises %}
<option value="{{ p.id }}" {% if p.id == feed['pais_id'] %}selected{% endif %}>{{ p.nombre }}</option>
{% endfor %}
</select>
</label>
<br><br>
<label>
<input type="checkbox" name="activo" {% if feed['activo'] %}checked{% endif %}>
Activo
</label>
<br><br>
<button type="submit">Guardar cambios</button>
<a href="{{ url_for('index') }}">Cancelar</a>
</form>
</body>
</html>