Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(sending messages) fix routes files in the app.py #157

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ Instruction for spin VM and destroy:
vagrant plugin install --plugin-version 1.0.1 fog-ovirt
vagrant plugin install vagrant-aws

#Static files:
All the static files such as: CSS, Images need to be locate in:
# Static files:

- All the static files such as: CSS, Images need to be locate in:
tiger/static
Html files need to be locate in:
- Html files need to be locate in:
tiger/templates
10 changes: 3 additions & 7 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ def connect_db(host, user, password, database):

@app.route('/')
def home():
return render_template('home.html')


@app.route('/contact_us')
def contact_us():
return render_template('/contact_us.html')
return render_template('/home.html')


@app.route('/messages_view')
Expand Down Expand Up @@ -74,7 +69,8 @@ def log_out():


if __name__ == '__main__':
app.run(host='0.0.0.0')
app.run(host='0.0.0.0', port=5000)



def check_username(username):
Expand Down
51 changes: 50 additions & 1 deletion templates/Home.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@

<!DOCTYPE html>
<html lang="he">

<head>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/cssHome.css') }}">
</head>

<body>
<header>
<a href="{{ url_for('home') }}" target=_self>
<img src="{{ url_for('static', filename='pic/logo_1.png') }}" id="homeLogo" alt="RedHat&MTA">
</a>
</header>
<nav>
<ul>
<li><a href="#Register" title="">Register</a></li>
<li><a href="#Login" title="">Login</a></li>
<li><a href="#Contact" title="">Contact</a></li>
<li><a href="#aboutUs" title="Messages">Messages</a></li>

</ul>
</nav>

<main>

<form method="get"><br>
Title:<input type="text" name="title"><br>
Enter your message<br>
<textarea rows="4" cols="40" name="content"> </textarea> <br>
Sender Name: <input type="text" name="username"><br>
<p id="time">
<script>
document.getElementById("time").innerHTML = Date();

</script><br>
</p>
<input type="submit" value="Send Message"> <input type="Reset" name="reset1" value="Reset">
</form><br>

</main>

<div class="footer">
<p>MTA Students </p>
</div>

</body>

</html>
{% extends "layout.html" %}
{% block title %} homePage {% endblock %}
{% block content %}
Expand All @@ -14,4 +63,4 @@
</p>
<input type="submit" value="Send Message"> <input type="Reset" name="reset1" value="Reset">
</form><br>
{% endblock %}
{% endblock %}