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
View Bash_command_line_shortcuts.md

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
View view.py
@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 }};">
<p>
<!-- ... -->
</p>
</div>
View form.py
from werkzeug.datastructures import MultiDict
from flaskext.wtf import FlaskForm, StringField, #....
class ContactForm(FlaskForm):
email = StringField('Email', [DataRequired(), Email()])
# ...
submit = SubmitField('Submit')
def reset(self):
View view.py
@app.route('/', methods=['GET', 'POST'])
def index():
form = ContactForm()
if form.validate_on_submit():
# ... do whatever you need
form.reset()
# ...
return render_template('index.html', form=form)
You can’t perform that action at this time.