A demo dockerized api site for empow studios
To get this running you must first have docker installed.
Once you have docker, you can start the app by running:
docker-compose up --build --detach
(note: if this is the first time running - you will need to wait two or so minutes until the database finishes setting up before visiting localhost)
Docker will initialize 3 containers:
- An nginx container for serving static assets
- The django web application
- A postgres database instance
The docker compose also runs a django management script that creates some test posts and comments so we can test the functionality.
Once the the containers are running, you may visit http://localhost to see the running api server.
To test a soft delete, login to the site as a superuser with the following credentials
username: root
password: password
Then navigate to a specific blog post in the api browser and hit "delete". You will note that the blog post no longer shows up anywhere on the api explorer. However, the blog post will still be accessible in django admin. Go to /admin and verify that that the post shows up in the admin browser. You can also test this soft delete functionality with the post comments model.
There are also tests available under content/tests.py