Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VIEWS.PY
- from flask import render_template, request
- from core.forms import LoginForm
- from core.utils import Site
- import lxml.html
- @app.route('/', methods=['GET', 'POST'])
- def main_page():
- form = LoginForm()
- if request.method == 'POST':
- username=request.form['username']
- password=request.form['password']
- path=Site.user_path
- s=Site.login(username, password)
- url='https://link.com/index'
- user_response=Site.get_content(Site, s, url, path)
- user=', '.join([str(x) for x in user_response])
- context={
- "user": user.replace("(", "- "),
- }
- return render_template("start_page.html", context=context)
- return render_template("index.html", form=form)
- @app.route('/marks')
- def marks():
- url='https://link.com/marks'
- #Here i have a problem
- return render_template("marks.html")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement