Compare commits

...

3 Commits

Author SHA1 Message Date
Castro0o 0bd376f11d gititgnore 4 years ago
Castro0o 91508a6d73 views routes all have / at start 4 years ago
Castro0o d23e4857af changed .{{ -> {{ 4 years ago

8
.gitignore vendored

@ -4,7 +4,13 @@ venv/*
.idea/
__pycache__/
__pycache__/*
__pycache__/config.cpython-37.pyc
app/__pycache__/
app/__pycache__/*
app/__pycache__/__init__.cpython-37.pyc
app/__pycache__/views.cpython-37.pyc
app/static/dewatermark/
app/static/dewatermark/*
app/static/dewatermark/*
app/static/republish/
app/static/republish/*
*.pyc

Binary file not shown.

@ -9,8 +9,8 @@
{% for cover in covers %}
<div class="cover">
<img src=".{{ url_for('static', filename='covers/' + cover) }}"></img>
<figcaption><a href=".{{ url_for('static', filename='covers/' + cover) }}">{{ cover }}</a></figcaption>
<img src="{{ url_for('static', filename='covers/' + cover) }}"></img>
<figcaption><a href="{{ url_for('static', filename='covers/' + cover) }}">{{ cover }}</a></figcaption>
</div>
{% endfor %}

@ -5,11 +5,11 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href=".{{ url_for('static', filename='img/beau.png') }}">
<link rel="icon" href="{{ url_for('static', filename='img/beau.png') }}">
<meta name="date" content="JULY 2020">
<link rel="stylesheet" href=".{{ url_for('static', filename='css/reset.css') }}">
<link rel="stylesheet" href=".{{ url_for('static', filename='css/style.css') }}">
<script src=".{{ url_for('static', filename='js/app.js') }}"></script>
<link rel="stylesheet" href="{{ url_for('static', filename='css/reset.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<script src="{{ url_for('static', filename='js/app.js') }}"></script>
<title>{% block title %}{% endblock %}</title>
</head>

@ -6,10 +6,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="date" content="JULY 2020">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href=".{{ url_for('static', filename='css/reset.css') }}">
<link rel="stylesheet" href=".{{ url_for('static', filename='css/style.css') }}">
<script src=".{{ url_for('static', filename='js/app.js') }}"></script>
<link rel="icon" href=".{{ url_for('static', filename='img/beau.png') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/reset.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<script src="{{ url_for('static', filename='js/app.js') }}"></script>
<link rel="icon" href="{{ url_for('static', filename='img/beau.png') }}">
<title>{% block title %}{% endblock %}</title>
</head>

@ -15,9 +15,14 @@ app.secret_key = 'PiracyIsCool'
now = datetime.datetime.now()
@app.route("test")
@app.route('/test', methods=['GET'])
def test():
return redirect('.'+url_for('index'))
index = url_for('index')
about = url_for('about')
links = f"<a href='{index}'>index</a><br/><a href='{about}'>about</a>"
return links
@app.route('/', methods=['GET'])
def index():
@ -71,7 +76,7 @@ def bookrequest():
return render_template('public/upload_book.html', books=books)
# from POST /submit store data in the database and forward to the request
@app.route('submit', methods=['POST'])
@app.route('/submit', methods=['POST'])
def submit():
book = dict(title=request.form['title'], author=request.form['author'], publisher=request.form['publisher'], year=request.form['year'], extention=request.form['extention'])
table.insert(book)

Loading…
Cancel
Save