How do I see the database for my heroku web app?
I just want to verify if users are being registered, properly, etc.
I am using Flask-SQLAlchemy Python, if that makes a difference.
You can connect directly to it using something like PGAdmin, look at the output of heroku config for your application to get your database URL which you can breakup to use in GUI tools.
Related
I am trying to deploy a Django REST API on Heroku. Normally I wouldn't have any issues with this but for this app, I am using a legacy database that exists on AWS. Is it possible for me to continue to use this remote database after deploying Django to Heroku? I have the database credentials all set up in settings.py so I would assume that it should work but I am not sure.
It should not pose any problem to connect with an database on AWS.
But be sure that the database on AWS is configured to accept external access, so that Heroku can connect.
And I would sugest that you take the credentials out of the source code and put it in the Config Vars that Heroku provide (environment variables).
Will it work? I think yes, provided you configure your project and database for external access.
Should you want it? How may queries does an average page execute? Some applications may make tens of queries for every endpoint and added wait can combine into seconds of waiting for every request.
I have a flask app with simple functionalities of a blog website codes given in below Github repo -
https://github.com/vivanks/flaskhost
It's data like user login details and blogs are stored in my system MySql-server.
On local machine it's working perfectly fine.
Now I want it to be deployed over internet.
What I tried so far is :
Heroku but problem with heroku is it need some postgressql and my whole data is stored in MySQL so I can't conver it.
Hosting flask part on Heroku and Database on 000webhost.com but 000webhost don't allow to connect to database outside of 00webhost
Hosting on http://pythonanywhere.com/ but then again failed also It don't support import MySQLdb instead it supports sqlalchemy
I want some way or something stable way through which I can export my data stored in mysql and don't have to change my code.
It would be great if you provide step by step guide.
P.S I don't have problem paying small amount
Right now I have a django website. I manage to programmatically populate the database using django commands and everything works fine.
I now want to have a dedicated server for populating the database programmatically but I do not want to give up using django commands as thei are very powerful in my opinion.
I am using aws elastic beanstalk and an rds db instance, so I know that I could simply create my scripts (the ones I use to populate the db) in pure python, but I am wondering if there is a nice way to do the same using Django.
I thought of simply setting up a new Django project that connects to the same RDS database, but this would mean that I need to copy all the models/settings every time a make a change to my main website... I did not really seem ideal.
Any thoughts?
I have a python django application that I published to heroku by connecting to github. I want some people to be able to add some information to the database from the website. If I make changes to the code, push to github and deploy the branch the database will go back to how it was at first. How can update my code for the app without changing the database?
If you host your database on a separate server, like with Amazon RDS or Heroku Postgres, and configure your code to connect to this remote host, you should have sufficient decoupling to avoid what you are talking about.
I'm having a lot of trouble with getting web2py to work on Heroku. I can't even get a basic app to work. Whenever I go to my herokuapp page, it says
Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details."
It may be a problem with the DB setup. By default web2py only supports sqlite or Google App Engine (GAE). It's probably trying to initialize sqlite databases on Heroku's read-only filesystem.
Either disable the DB code temporarily to see if this is indeed the case, or configure a connection to a supported database (MySQL, S3, etc).
Take a look at the "official" Heroku script in scripts/setup-web2py-heroku.sh
Try with a simple wsgi application first. Here is some tutorial: http://webpython.codepoint.net/wsgi_tutorial
Web2py will work without any problems if you can run simple wsgi apps.