geojoe
-
Posts
21 -
Joined
-
Last visited
-
Days Won
1
Posts posted by geojoe
-
-
i was trying to do the following and everything seems to be fine but its not working, so i was wondering if running multiple apps was possible
-
UPDATE:
I've solved the url problem and here's how
class ScriptNameStripper(Flask): def __call__(self, environ, start_response): environ['SCRIPT_NAME'] = '' return (super(ScriptNameStripper, self) .__call__(environ, start_response)) app = ScriptNameStripper(__name__)
- 1
-
Hi rik,
I had a similar issue a while back and have I just found the solution 20 mins from the time of this post (I can be very persistent when it comes to problem solving)
just add this at the top of your app.py file
class ScriptNameStripper(Flask): def __call__(self, environ, start_response): environ['SCRIPT_NAME'] = '' return (super(ScriptNameStripper, self) .__call__(environ, start_response)) app = ScriptNameStripper(__name__)
you'll have to replace app = Flask(__name__) with app = ScriptNameStripper(__name__)
-
The remote connection isn't needed anymore
And the urls start without flask.wsgi but when you return to the same page again it's there
But it's cool
-
I still need help with the url problem
-
Hi @RootAdmin I've done it
I had sequence fields created and it turns out that postgres sequences needed special privileges to work, the problem arose when i try an insert operation; it gave the following error
Error in query: ERROR: permission denied for sequence users_user_id_seq
so i did a little research and was able to fix it
here's how i did it in case someone else has the same issue:
- I opened phppgadmin
- logged in
- clicked on schema
- selected my schema (i used the default public schema)
- selected sequences
- clicked on privileges
- checked SELECT, UPDATE, DELETE for my user
and evoila it worked perfectly
thanks your service - although free - is one of the best I've ever gotten
-
I changed the databases and username while I was trying to diagnose the problem
Thank for the help.
Please enable remote connection thanks
-
Thanks for the reply.
Yes I would like access from any ip address.
The right way to connect to postgres through flask is as follows
Postgres+psycopg2://db_username:db_password@db_host:5432/db_name
In my case that would be
Postgres+psycopg2://geojoe_geoffery:donsniper123@localhost:5432/geojoe_flask
But it doesn't seem to work I think I may not have the right permissions to read from or write to the database, if it works I would be very grateful otherwise I might have to settle for the one from heroku
-
Hey guys still need help on this
-
Hi again,
I need help connecting my flask app to the postgres database on the server.
PS. I'm not trying to connect from outside although having remote access would be a bonus
username: geojoe
database: geojoe_flask-app
database user: geojoe_admin
server: Tommy
Issue 2: how do I hide the flask.wsgi from urls
e.g instead of flask.geoffery.ml/flask.wsgi/login, i want it to be flask.geoffery.ml/login
thanks in anticipation
-
Thanks a lot
-
And flask-session thanks
-
Please also include psycopg2-binary to the list thanks
-
Hi I would like you to install the psycopg2 module. postgresql wont work without it.
thanks in anticipation.
-
okay thanks
-
Hi I've been on tommy server for about a month and some parts of the interface is still loading.
Like where it says primary domain and theme, also some info about the account that's supposed to be under the right section of the main interface is missing
is this normal or should i be worried.
attached is a screen shot of the said interface
-
Thanks a lot.
Just have to figure out how to get my flask app to work with SQL.
This is the life, the experience is the life
I will be victorious.
Oh and wonderful service by the way
-
Thanks fixed my error and all seems to be well.
BUT is there a way to connect to mysql database from my local machine?
I think I might need to apply some migrations
-
here are the packages missing
Flask-Login==0.4.1Flask-Migrate==2.5.2Flask-SQLAlchemy==2.4.1 -
Hi good day,
I am current learning the flask micro framework and have built a relatively small app.
said app runs well on my local machine but returns 500 error when uploaded to the server, attached are my details.
any help will be highly appreciated.
server tommy (I got lucky)
username geojoe
website: flask.geoffery.ml
P.S. my app require some extra flask packages
a list of which can be found in requirements.txt
Can you run multiple flask apps on one account?
in Website Management and Coding
Posted
ok thanks