Skip to content

Instantly share code, notes, and snippets.

focused on AI this days

Alberto Rosado albe-rosado

focused on AI this days
Block or report user

Report or block albe-rosado

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Bash command line Shortcuts

Picked these from here

Command Editing Shortcuts

Command Note
Ctrl + a go to the start of the command line
Ctrl + e go to the end of the command line
Ctrl + k delete from cursor to the end of the command line
@app.route('/path', methods=['GET', 'POST'])
def page():
visible = 'none'
# to make the section hide or
visible = 'true'
# to be displayed
# then you can choose wheter or not show it, just changing the value of "visible"
return render_template('template.html', visible=visible)
View template.html
<div class="..." style="display: {{ visible }};">
<!-- ... -->
from werkzeug.datastructures import MultiDict
from import FlaskForm, StringField, #....
class ContactForm(FlaskForm):
email = StringField('Email', [DataRequired(), Email()])
# ...
submit = SubmitField('Submit')
def reset(self):
@app.route('/', methods=['GET', 'POST'])
def index():
form = ContactForm()
if form.validate_on_submit():
# ... do whatever you need
# ...
return render_template('index.html', form=form)
You can’t perform that action at this time.