Skip to content
Snippets Groups Projects
Commit de7098ae authored by Felix Chadwick-Smith's avatar Felix Chadwick-Smith
Browse files

fixed get request fro add project paeg

parent 6495eb90
No related branches found
No related tags found
1 merge request!32fixed get request fro add project paeg
No preview for this file type
...@@ -13,10 +13,9 @@ ...@@ -13,10 +13,9 @@
background-size: cover; background-size: cover;
} }
</style> </style>
</head> </head>
<body class="home-page"> <body class="home-page">
<!---https://realpython.com/flask-project/#create-a-virtual-environment---> <!---https://realpython.com/flask-project/#create-a-virtual-environment--->
<nav> <nav>
<ul> <ul>
<li><a href="{{ url_for('home') }}">Home</a></li> <li><a href="{{ url_for('home') }}">Home</a></li>
...@@ -27,32 +26,36 @@ ...@@ -27,32 +26,36 @@
<li><a href="{{ url_for('contact') }}">Contact</a></li> <li><a href="{{ url_for('contact') }}">Contact</a></li>
</ul> </ul>
</nav> </nav>
<h2>Add Project</h2> <!---https://realpython.com/flask-project/#create-a-virtual-environment--->
<!---https://realpython.com/flask-project/#create-a-virtual-environment---> <div class="form-container">
<form method="POST" action="{{ url_for('add_project') }}"> <h2>Add Project</h2>
{% with messages = get_flashed_messages() %} <form method="POST" action="{{ url_for('add_project') }}">
{% if messages %} {% with messages = get_flashed_messages() %}
<ul class="messages"> {% if messages %}
{% for message in messages %} <ul class="messages">
<li>{{ message }}</li> {% for message in messages %}
{% endfor %} <li>{{ message }}</li>
</ul> {% endfor %}
</ul>
{% endif %}
{% endwith %}
{% if form %}
{{ form.csrf_token }}
<div class="form-group">
<label for="title">Project Title</label>
{{ form.title(class="form-control", placeholder="Enter project title") }}
</div>
<div class="form-group">
<label for="description">Project Description</label>
{{ form.description(class="form-control", placeholder="Enter project description") }}
</div>
<div class="form-group">
{{ form.submit(class="btn btn-primary") }}
</div>
{% endif %} {% endif %}
{% endwith %} </form>
{% if form %} </div>
{{ form.csrf_token }}
<div class="form-group">
{{ form.title.label }}
{{ form.title(class="form-control", placeholder="Enter project title") }}
</div>
<div class="form-group">
{{ form.description.label }}
{{ form.description(class="form-control", placeholder="Enter project description") }}
</div>
<div class="form-group">
{{ form.submit(class="btn btn-primary") }}
</div>
{% endif %}
</form>
</body> </body>
</html> </html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment