Utilize Django's REST framework to create a database or artifacts. This repo is for the back-end and speaks with the front-end that was designed for this.
Checkout the README for instructions on getting set up with the deployed front-end.
- Fork and clone this repository.
- Change into this directory
- Create and checkout a new branch.
- Run
pipenv shellto start up your virtual environment. - Run
pipenv installto install dependencies. - Create a database for this api to interact with. (if you're not using artifacts)
- Type psql to get into interactive shell
- Run CREATE DATABASE "your_database_name";
- Exit shell
- Run
python manage.py makemigrationswhen changing or adding models - Run
python manage.py migrateto incorporate those changes - Run
atom .to open the repo
This is set to run with the artifacts database.
| Action | Method | Path |
|---|---|---|
| Sign-Up | POST | /sign-up/ |
| Sign-In | POST | /sign-in/ |
| Change-Password | PATCH | /change-password/ |
| Sign-Out | DELETE | /delete/ |
| Routes | Method | Path |
|---|---|---|
| Create | POST | /items |
| Index | GET | /items |
| Show | GET | /items/<int:pk>/ |
| Update | PATCH | /items/<int:pk>/ |
| Delete | DELETE | /items/<int:pk>/ |
I began with the user routes. Using a Django-template made that part easy. Next came the model for artifacts. I decided to use choice fields and a boolean field for some properties of the model. In our class, we hadn't gone into depth about those so I wanted to give it a shot. The choice field took a long time to figure out how to use correctly, but I was proud of the result. Curl-scripts were part of the testing process. Once I had CREATE completed, the rest was simple.
I was able to read the errors and fix most of the bugs. I also utilized my cohort by asking them questions when I couldn't solve an issue.
- Python
- Django
- Pipenv
- Postgresql
- Heroku
- This build is bug-free! (As far as I can tell)
- Planning to add new models based on the item model when user selects what category to create
- Planning to add option for images for the artifacts
