If you already deployed your app on the server with Postgres, you probably installed the psycopg2 package to talk to the database. Click the "Start" button and your server is ready to go. Now all that is left to do is to run the app. Download it, open and move the Postgres.app to Applications folder on your Mac. The most up to date version is "Postgres.app with PostgreSQL 13" as of writing this post in December 2020. You can get the dmg file from the official site. This also assumes you don't have other versions of Postgres installed. There are more than one ways how to install this database on your machine, however downloading Postgres.app is the easiest. We will start with the Postgres part that is not Django specific. So developing this feature without Postgres database would be kind of crazy.Īnyway, let's see how to setup Postgres locally. Postgres offers powerful full-text search you can use from Django. In my case, what kind of forced me to have local PostgreSQL for one of my projects, was search. For example SQLite does not care about length of the text in columns. You can get yourself into a situation where your app works locally but does not start on the server, because there is a small difference in how these two databases work. While this setup is pretty easy (you get configuration for SQLite out of the box) it has some issues. With Django I would say it is pretty common to have SQLite as a developer database and then on the server have Postgres as "the real" production database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |