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 4 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: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@ Instruction for spin VM and destroy:
- run those commands-
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:
tiger/static
- Html files need to be locate in:
tiger/templates
9 changes: 2 additions & 7 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@ def view_messages():

@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('/log_in', methods=['GET', 'POST'])
Expand All @@ -60,4 +55,4 @@ def log_out():


if __name__ == '__main__':
app.run(host='0.0.0.0')
app.run(host='0.0.0.0', port=5000)
50 changes: 0 additions & 50 deletions home.html

This file was deleted.

File renamed without changes.
Binary file removed static/logo.jpg
Binary file not shown.
File renamed without changes
61 changes: 49 additions & 12 deletions templates/Home.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Home</title>
</head>
<body>
{% extends "layout.html" %}
{% block content %}
<h1> Hello world! </h1>
{% endblock %}
</body>
</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>
72 changes: 0 additions & 72 deletions templates/contact_us.html

This file was deleted.