Skip to content

Commit c066e18

Browse files
authored
Merge pull request #3 from my-python-projects/develop
- Pequenos ajustes
2 parents 8149feb + 4387d4f commit c066e18

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/relatorios
22
app/__pycache__
3-
app/logs
3+
app/logs
4+
*.docx

run.py renamed to app.py

File renamed without changes.

app/routes.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88
@app.route('/')
99
def index():
1010
app.logger.info('Acesso à página inicial')
11-
return render_template('index.html')
11+
12+
# Teste se já está logado
13+
isLogin = True
14+
# teste com condição if ternario
15+
return render_template('index.html' if isLogin else 'login.html')
1216

1317
@app.route('/login')
1418
def login():
19+
app.logger.info('Acesso à página Login')
1520
return render_template('login.html')
1621

1722

docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y \
1212
npm \
1313
&& rm -rf /var/lib/apt/lists/*
1414
COPY requirements.txt requirements.txt
15+
1516
RUN pip install -r requirements.txt
1617

1718
# Instalar as dependências do npm (incluindo o Vue.js)

0 commit comments

Comments
 (0)