Browse Source

empty score no error page and a message

master
zeroth 5 years ago
parent
commit
cdb86d12b2
  1. BIN
      __pycache__/contextualise.cpython-35.pyc
  2. 9
      contextualise.py
  3. 4
      static/css/main.css
  4. 20
      templates/about.html
  5. 4
      templates/home.html
  6. 14
      templates/layout.html

BIN
__pycache__/contextualise.cpython-35.pyc

Binary file not shown.

9
contextualise.py

@ -167,6 +167,9 @@ def listofwords():
#THE SCORE STUFF
######################################################################################
### Add : if score is empty then add some sentence like "your score is empty"
### to be printed to the text document
@app.route("/get-file")
def get_file():
fullscore = None
@ -175,6 +178,7 @@ def get_file():
idlist = session["id"]
timelist = session["clicktime"]
veryfirstnow = session['veryfirstnow']
tadam = None
for t in timelist :
t = str(t)
@ -225,8 +229,11 @@ def get_file():
out = [(fullscore[i:i+n]) for i in range(0, len(fullscore), n)]
#joining the strings with linebreaks
tadam = '\n'.join(out)
# have a message in file if no nav has been recorded so it's less dull than error page
if tadam is None:
tadam = "This score is Null"
print(tadam)
print(tadam)
return Response(tadam,
mimetype="text/plain",

4
static/css/main.css

@ -5,10 +5,10 @@ body{
}
a{
color:red;
text-decoration: none;
/*text-decoration: none;*/
}
ul{
list-style: none;
}

20
templates/about.html

@ -1,7 +1,23 @@
{% extends "layout.html" %}
{% block content %}
<div class="about">
<h1>About me</h1>
<p>This is a portfolio site about anything that can be put in a portfolio.</p>
<h1>About</h1>
<p>Pushing scores is a two years long project initiated by De Player(*) on music notation and.....
The archive is composed of....
The concept for this archive is....
This archive was conceived and developped by.... (Cricri, Juju)
Using Flask, Jinja, Python, suboptimal brain power.
Performers for the launch... (Nick, Christine, surprise)
<br />
* De Player is a Rotterdam based polymorphic production platform for performance art, experimental music and visual arts. <br />
** Varia is
</p>
</div>
{% endblock %}

4
templates/home.html

@ -1,7 +1,7 @@
{% extends "layout.html" %}
{% block content %}
<div class="home">
<h1>THIS IS THE HOME PAGE</h1>
<p>This website was built with Python via the Flask framework.</p>
<h1>Hi!</h1>
<p>Shouldn't this be the page with all the links? Then we may remove description as a clickable link no?</p>
</div>
{% endblock %}

14
templates/layout.html

@ -2,20 +2,22 @@
<html>
<head>
<meta charset="UTF-8">
<title>PARTOUT TITRE PARTOUT</title>
<title>P.u.s.h.i.n.g.S.c.o.r.e.s</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
</head>
<body>
<header>
<div class="container">
<h1 class="logo">SUPERB</h1>
<h1 class="logo">P.u.s.h.i.n.g.S.c.o.r.e.s</h1>
<strong><nav>
<ul class="menu">
<li><a href="{{ url_for('home') }}">Home</a></li>
<li><a href="{{ url_for('home') }}">Maybe all links for home page</a></li>
<li><a href="{{ url_for('about') }}">About</a></li>
<li><a href="{{ url_for('description') }}">Description</a></li>
<li><a href="{{ url_for('listofwords') }}">List of words</a></li>
<li><a href="{{ url_for('get_file') }}">Download score</a></li>
<li><a href="{{ url_for('description') }}">Maybe we cut out this link</a></li>
<li><a href="{{ url_for('listofwords') }}">Dunno if useful?</a></li>
<li><a href="{{ url_for('get_file') }}">:-) Pushiiing</a></li>
</ul>
</nav></strong>
</div>

Loading…
Cancel
Save