From fd1bb949b5fa53df220c3ea27c77bb449912406c Mon Sep 17 00:00:00 2001 From: andrews medina Date: Thu, 16 Sep 2010 00:15:19 -0300 Subject: [PATCH] refactoring website --- cobrateam_tests.py | 14 +------------ index.py | 12 ------------ templates/base.html | 25 ++++++++++++++++++------ templates/challenges.html | 5 ----- templates/contact.html | 5 ----- templates/index.html | 41 ++++++++++++++++++++++++++++++++++----- templates/staff.html | 21 -------------------- 7 files changed, 56 insertions(+), 67 deletions(-) delete mode 100644 templates/challenges.html delete mode 100644 templates/contact.html delete mode 100644 templates/staff.html diff --git a/cobrateam_tests.py b/cobrateam_tests.py index 9205803..a31cc0f 100644 --- a/cobrateam_tests.py +++ b/cobrateam_tests.py @@ -10,19 +10,7 @@ def setUp(self): def test_index(self): request = self.app.get('/') - assert 'Dorgas Manolo' in request.data + assert 'Projects' in request.data - def test_staff(self): - request= self.app.get('/staff') - assert 'Team' in request.data - - def test_challenges(self): - request= self.app.get('/challenges') - assert 'challenges' in request.data - - def test_contact(self): - request= self.app.get('/contact') - assert 'contact' in request.data - if __name__ == '__main__': unittest.main() diff --git a/index.py b/index.py index 66ccdb0..9c82a44 100644 --- a/index.py +++ b/index.py @@ -6,17 +6,5 @@ def index(): return render_template("index.html") -@app.route("/staff") -def staff(): - return render_template("staff.html") - -@app.route("/challenges") -def challenges(): - return render_template("challenges.html") - -@app.route("/contact") -def contact(): - return render_template("contact.html") - if __name__ == "__main__": app.run(debug=True) diff --git a/templates/base.html b/templates/base.html index b5f7423..ebb8e6c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -7,17 +7,30 @@
+ + {% block content %}{% endblock %}
diff --git a/templates/challenges.html b/templates/challenges.html deleted file mode 100644 index 272ecba..0000000 --- a/templates/challenges.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "base.html" %} - -{% block content %} - challenges -{% endblock %} diff --git a/templates/contact.html b/templates/contact.html deleted file mode 100644 index 6531947..0000000 --- a/templates/contact.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "base.html" %} - -{% block content %} - contact -{% endblock %} diff --git a/templates/index.html b/templates/index.html index fc18369..ebb8e6c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,5 +1,36 @@ -{% extends "base.html" %} - -{% block content %} - Dorgas Manolo -{% endblock %} + + + CobraTeam website - CobraTeam.info + + + + +
+ + + {% block content %}{% endblock %} +
+ + + diff --git a/templates/staff.html b/templates/staff.html deleted file mode 100644 index 23015e6..0000000 --- a/templates/staff.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -

Team

- -{% endblock %}