Questions tagged [flask-script]
61 questions
0
votes
0 answers
Why cannot create migrations on flask?
Pycharm2018.1.4
Unable to create migrations with the execution of python manage.py db init

user10189526
- 1
- 1
0
votes
0 answers
Flask-Script invalid syntax error
I try to publish the site created by Flask on AWS.
I am trying it with the test code and confirming that there is no problem.
test code ↓
# -*- coding: utf-8 -*-
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return…

nuri
- 1
- 2
0
votes
0 answers
Flask Error Launching app using manager.run()
I have an app which runs fine inside pycharm when I run the manage file consisting of:
#!/usr/bin/env python
from app import create_app, db
from app.models import User, Role
from flask_script import Manager, Shell
from flask_migrate import Migrate,…

blountdj
- 599
- 1
- 11
- 23
0
votes
1 answer
flask_script runserver port forwarding not working
I have tried to change the host from runserver on bash inside my virtualenv which is by default localhost to 0.0.0.0 but it doesn't work.
(test)srseven@srseven-HP-15-Notebook-PC:~/Documents$ python3 /home/srseven/IdeaProjects/dbooad/dbooad.py…
user4667544
0
votes
0 answers
Flask-Script option is required before command
I want to carry out the following in Terminal:
python manage.py runserver -c True
with the code below:
manage.py:
from my_app import app
manager = Manager(app)
manager.add_option('-c', '--config', dest='config',…

Pav Sidhu
- 6,724
- 18
- 55
- 110
0
votes
2 answers
Python cannot find flask_script
I am running a basic Flask application which uses flask script, but when I move the environment from Cloud 9 to a local installation on my Mac, it stops working. I get the following error.
ImportError: No module named 'flask_script'
I am using…

NiklasR
- 473
- 6
- 19
0
votes
1 answer
merge flask_socketio into my own flask project
I developed my restful api flask project (let's call it 'MYOWN').
And then, because of some needs to implement functions like 'notification', 'chat', and so on, I tried to merge my project with simple socketIO example project.
I want to run my…

HT.Cha
- 13
- 4
0
votes
1 answer
Flask-Script loads app before running unittests
I'm using Flask-Script to run tests on my application the important bit of my manage.py file looks like this:
import unittest
from flask.ext.script import Manager
from project import app
manager = Manager(app)
@manager.command
def test():
…

hammygoonan
- 2,125
- 2
- 21
- 36
0
votes
1 answer
TypeError while adding flask script task
I'm working to modify a cookiecutter Flask app.
In the manage.py administrative module based on flask-script, I'm trying to create a new task 'create_admin' that adds a admin user .
@manager.command
def create_admin():
"""Creates the admin…

user1592380
- 34,265
- 92
- 284
- 515
0
votes
2 answers
Flask returns 404 with manager
I have a small rest application with the following structure
Basedir
- manage.py
- load_gen
- __init__.py
- app.py
- models.py
code snippet from manage.py
from load_gen import app, db
from load_gen.models import User
from…

Abgo80
- 233
- 1
- 3
- 9
0
votes
1 answer
Using Flask-Script with Apache
I'm using Flask-Script. In development, I start my app by calling ./manage.py runserver and that would make it run on port 5000.
I'm trying to deploy my app with Apache. I can't find the directive that would supply the parameter runserver to my app.

user1005909
- 1,825
- 2
- 17
- 27
0
votes
0 answers
Flask-script with argument and cron jobs
I have a flask application running with flask-script extension.
A function (with 3 arguments) is placed in my cron and ended by:
if name == "main":
manager.run()
Like mentioned in the flask-script doc - link
This function works fine when I…

jeromef
- 1
- 2
-1
votes
1 answer
Flask run script after start
Hey trying to get a script to run once flask has been started but before the first request.
Looking at @app.before_first_request method, this seems to wait for a request before running. Another possible option is using the flask_script library. Most…

Vernon
- 3
- 2
-1
votes
1 answer
I made a mistake when I was deploying projects with gunicorn
When I use gunicorn to deploy the project, I can't find the module. When I use the test environment it is normal.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
…

1am9a09e
- 31
- 1
- 4
-1
votes
1 answer
'application not registered on db instance' after user table truncation
I deleted all the info in my users table during testing. Now when I try to run a manage.py command to recreate the admin user, I get RuntimeError: application not registered on db instance and no application bound to current context. I've been…

user1592380
- 34,265
- 92
- 284
- 515