Spaces:
Sleeping
Sleeping
| {% extends 'base.html' %} | |
| {% block content %} | |
| <div class="container"> | |
| <h2 class="my-4">Projects</h2> | |
| <form id="project-form" method="POST" class="mb-4"> | |
| <div class="mb-3"> | |
| <label for="name" class="form-label">Project Name</label> | |
| <input type="text" class="form-control" id="name" name="name" required> | |
| </div> | |
| <div class="mb-3"> | |
| <label for="description" class="form-label">Description</label> | |
| <textarea class="form-control" id="description" name="description" required></textarea> | |
| </div> | |
| <div class="mb-3"> | |
| <label for="budget" class="form-label">Budget</label> | |
| <input type="number" class="form-control" id="budget" name="budget" step="0.01" required> | |
| </div> | |
| <button type="submit" class="btn btn-primary">Add Project</button> | |
| </form> | |
| <h3>Project List</h3> | |
| <table class="table table-striped"> | |
| <thead> | |
| <tr> | |
| <th>Name</th> | |
| <th>Description</th> | |
| <th>Budget</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| {% for project in projects %} | |
| <tr> | |
| <td>{{ project.name }}</td> | |
| <td>{{ project.description }}</td> | |
| <td>${{ project.budget }}</td> | |
| </tr> | |
| {% endfor %} | |
| </tbody> | |
| </table> | |
| </div> | |
| {% endblock %} |