What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-03 00:30:02
flask app.route
# Extremely simple flask application, will display 'Hello World!' on the screen when you run it # Access it by running it, then going to whatever port its running on (It'll say which port it's running on). from flask import Flask app = Flask(__name__) @a... Add solution -
Python 2022-02-02 21:31:21
flask mongoengine getting started
'''Basic setup can be done by defining MONGODB_SETTINGS on app.config and creating a MongoEngine instance.''' from flask import Flask from flask_mongoengine import MongoEngine app = Flask(__name__) app.config['MONGODB_SETTINGS'] = { "db": &... Add solution -
Python 2022-02-02 20:31:10
mongoalchemy flask
from flask import Flask from flask.ext.mongoalchemy import MongoAlchemy app = Flask(__name__) app.config['MONGOALCHEMY_DATABASE'] = 'library' db = MongoAlchemy(app) class Author(db.Document): name = db.StringField() class Book(db.Document): titl... Add solution -
Shell/Bash 2022-02-01 01:47:24
how to install wtforms on mac terminal
[Running] python -u "c:\Users\PC\Desktop\code\Flask_Blog\forms.py" Traceback (most recent call last): File "c:\Users\PC\Desktop\code\Flask_Blog\forms.py", line 1, in <module> from flask_wtf import FlaskForm ModuleNotFoundEr... Add solution -
Python 2022-01-29 21:21:15
flask example
# Extremely simple flask application, will display 'Hello World!' on the screen when you run it # Access it by running it, then going to whatever port its running on (It'll say which port it's running on). from flask import Flask app = Flask(__name__) @a... Add solution -
Python 2022-01-26 01:00:09
flask restful arguments in url
from flask import Flask, request from flask_restful import Api, Resource app = Flask(__name__) api = Api(app) # Flask mishandles boolean as string TRUTHY = ['true', 'True', 'yes'] class Item(Resource): def get(): # Get `class` list from reques... Add solution -
Python 2022-01-22 21:56:03
telegram bot python
import re from flask import Flask, request import telegram from telebot.credentials import bot_token, bot_user_name,URL global bot global TOKEN TOKEN = bot_token bot = telegram.Bot(token=TOKEN) app = Flask(__name__) @app.route('/{}'.format(TOKEN), met... Add solution -
Shell/Bash 2021-11-18 19:15:23
mongoalchemy flask
from flask import Flask from flask.ext.mongoalchemy import MongoAlchemy app = Flask(__name__) app.config['MONGOALCHEMY_DATABASE'] = 'library' db = MongoAlchemy(app) class Author(db.Document): name = db.StringField() class Book(db.Document): titl... Add solution -
Javascript 2021-11-17 23:14:11
<script src="{{ url_for('static', filename='scripts.js') }}"></script>
import flask app = flask.Flask(__name__) with app.test_request_context(): print(flask.url_for("static", filename="index.css"))Output/static/index.css Input Filesstatic/index.css Add solution
Best helpers
Joker13
+5
Remmy Kasili
+5
Anand GV
+5
Manx rat
+5
Jokim
+5
Nitro2k01
+5
Letomkov
+5
Glob Cropper
+5