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?
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 built an app that uses mysql database with Python, I would love to share some functionalities with different applications and that calls for an online database feature, kindly give me some insights over how i can move a python mysql database to online and how to make calls to it in order to facilitate for sharing of data between different applications.
I don't exactly know what you are calling a python database but there are some options here that you might want to consider
First, use heroku to host your app and heroku postgress to host your databaseOr you can use an EC2 aws machine to host your app and it's database (in case it's a custom code that you can't call from a browser using heroku)with both of these options you can access you database and the appp with the second one you can install other services such as ssh and other.
I have created a webframework in Django which functions like an interactive dashboard. There is however the problem that the webframework contains data that I can't put in an online environment, but has to stay in a local SQL storage. The webframework has to run on three computers that do not have access the command prompt, therefore I can't run a local Django project on each of the computers
Is the following possible?
Host a Django website (just a shell) with user authentication and an online database that just manages the users.
Each computer has its own local SQL storage that Django is accessing i.e. SQLlite file that is present on the desktop. In other words the SQL db that I want Django to access is not present on the hosting machine but on that of the recipient.
In this case, the worst case scenario would be that someone breaks into the webframework but can not access the files since they are only available locally.
Am I overlooking anything or is this possible? I'm aware that this is very unusual and not very pratical, but it is the only think I can think of. If there is better alternative I would be open to suggestions.
Regards
I have a python algorithm that access a huge database in my laptop. I want to create a web server to work with it. can I use django with the folder paths I have used ? like how do I communicate with it ? I want to get an image from web application and get it sent to my laptop and run algorithm on it then send result back to the webserver. would that still be possible without me changing my algorithm paths? like I use os.path to access my database folder, would I still be able to do what with django or shall I learn something else? I wanted to try django as it runs in python and I can learn it easy.
I have found out that django works fine with os.path and no problems. actually if you are programming with python then django is a great choice for server work.
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.