Jump to content

geojoe

Members
  • Posts

    21
  • Joined

  • Last visited

  • Days Won

    1

geojoe last won the day on April 18 2020

geojoe had the most liked content!

geojoe's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. 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
  2. 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__)
  3. 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__)
  4. 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
  5. I still need help with the url problem
  6. 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 phppgadminlogged inclicked on schemaselected 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
  7. I changed the databases and username while I was trying to diagnose the problem Thank for the help. Please enable remote connection thanks
  8. 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
  9. Hey guys still need help on this
  10. 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
  11. And flask-session thanks
  12. Please also include psycopg2-binary to the list thanks
  13. Hi I would like you to install the psycopg2 module. postgresql wont work without it. thanks in anticipation.
×
×
  • Create New...