Skip to content

Commit

Permalink
Revert "Merge pull request #15 from kilerhg/lna/refactor"
Browse files Browse the repository at this point in the history
This reverts commit f30ada5.
  • Loading branch information
kilerhg committed Sep 9, 2021
1 parent f30ada5 commit 018da50
Show file tree
Hide file tree
Showing 42 changed files with 45 additions and 46 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: gunicorn app.main:create_app
web: gunicorn app:app
Binary file removed app/__pycache__/funcoes.cpython-39.pyc
Binary file not shown.
Binary file removed app/__pycache__/main.cpython-39.pyc
Binary file not shown.
45 changes: 0 additions & 45 deletions app/main.py

This file was deleted.

File renamed without changes.
44 changes: 44 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from flask import Flask, render_template, redirect, url_for, request
import requests

import funcoes

app = Flask(__name__)

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

@app.route("/busca", methods=["GET", "POST"])
def search():
lista_livros = []
if request.method == "POST":
livro = request.form["book_name"]
lista_livros = funcoes.search_book(busca=livro)
return render_template('search.html', books=lista_livros)

@app.route("/biblioteca")
def library():
return render_template('library.html')

@app.route("/biblioteca/<int:isbn>")
def add_book_library(isbn):
print(isbn)
return render_template('library.html')

@app.route("/cadastrar")
def register():
return "Aba cadastrar"

@app.route("/login")
def login():
return "Aba login"

@app.route("/logout")
def log_out():
return "Aba logout"


if __name__ == "__main__":
app.run(debug=True)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 018da50

Please sign in to comment.