Replies: 5 comments 3 replies
-
unless your provide more information beyond just a vague description of your problem, nobody will be able to help you... post some code (or link to your git repo) and add a screenshot for a starter... |
Beta Was this translation helpful? Give feedback.
0 replies
-
These are the screenshots of the codes, please I need assistance |
Beta Was this translation helpful? Give feedback.
0 replies
This comment has been minimized.
This comment has been minimized.
-
from blog import app
from flask import render_template
@app.route("/")
def index():
return render_template ("index.html")
@app.route("/contact-us")
def contact_us():
return render_template ("contact_us.html")
@app.route("/signup")
def signup():
return render_template ("signup.html") That is for the routes {% extends 'base.html' %}
{% block header %}
<div class="container">
<header class="d-flex flex-wrap align-items-center justify-content-center justify-content-md-between py-3 mb-4 border-bottom">
<a href="{{ url_for ('index') }}" class="d-flex align-items-center col-md-3 mb-2 mb-md-0 text-dark text-decoration-none">
<img src="{{ url_for ('static', filename='img/logo.jpg') }}" height="70px" alt="">
<h5>Legit News</h5>
</a>
</header>
</div>
{% endblock %}
<!-- header done -->
<!-- contact us -->
<div class="container">
<form class="form-signup">
<h1 class="h3 mb-3 fw-normal">Fill in the Fields</h1>
<div class="row">
<div class="col-md-6">
<div class="form-floating">
<input type="text" class="form-control" id="floatingInput" placeholder="full names here">
<label for="floatingInput">First Name</label>
</div>
<br>
</div>
<div class="col-md-6">
<div class="form-floating">
<input type="text" class="form-control" id="floatingInput" placeholder="full names here">
<label for="floatingInput">Last Name</label>
</div>
<br>
</div>
<div class="form-group">
<div class="form-floating">
<input type="email" class="form-control" id="floatingInput" placeholder="name@example.com">
<label for="floatingInput">Email address</label>
</div>
<br>
</div>
<div class="form-group">
<div class="form-floating textarea">
<textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea2" style="height: 100px"></textarea>
<label for="floatingTextarea2">Comments</label>
</div>
<br>
</div>
<div class="but">
<input type="submit" class="btn btn-secondary btn-lg value="submit">
</div>
</div>
</form>
</div>
<!-- contact us done -->
<!-- footer -->
{% block footer %}{% include 'footer.html' %}{% endblock %}
<!-- footer done --> this is for one of the pages that isn't popping up above The result when it loads, renders the header and footer but not the content which is the form |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please I don't know if anyone can be of assistance to me cos I am having a challenge and I have done everything possible to solve it but still no improvements, I'm actually trying to render the templates using jinja2 the index page which is the home page is working well but other pages aren't coming up,Like the signup, login and contact us page, the header and footer renders very well but the content which is the form doesn't show or render, I have tried to do it several times for days now and i'm still getting the same results, I would be so glad if anyone can help out though, thanks.
Beta Was this translation helpful? Give feedback.
All reactions