-
Make sure you have pulled the most recent version from GitLab.
-
Go to https://www.postgresql.org/download/ and download the correct version for your computer. You now have the postgres server installed along with a program called PGadmin, which gives a nice GUI to see the status of your database. If running macOS run
brew install postgresql@15
.- If in PGadmin there is no server but you have installed postgresql you need to register a new server.
- Start PostgreSql. If using mac
run brew services start postgresql@15
orpsql
- Right click databases and then click "Register"
- Set name to DroneConesServer
- Set host to localhost
- Now we need to create a DB
- Right click databases and select create -> database
- Name it DroneConesDB
-
Install the django rest framework with
pip install djangorestframework
-
Navigate to
backend/api
and runpython manage.py makemigrations
followed bypython manage.py migrate
. If you get errors here please let me know.- Be sure postgresql is running and confirm by looking at connection status through PGadmin
- If ModuleNotFoundError: No module named 'corsheaders', try running
pip install django-cors-headers
-
run
python manage.py runserver
. You will get some output telling you the port the server is running on (usually localhost:8000). -
Since the tables are empty, you can go to
http://localhost:8000/inventory/get_inventory
to add some items by filling out the form at the bottom of the page.
As of 26 Oct
You can now perfore GET
requests from the inventory by the description, or simply get a list. You can fetch from http://localhost:8000/inventory/get_inventory
to get JSON of all items in the inventory, or http://localhost:8000/inventory/get_inventory/<description>
to get a specific item.
Make sure to pip install the following:
pip install django-cors-headers
This has code to circumvent CORs issues.
Ensure for your local machine that you set the password value (found under DATABASES) in the settings.py file found within backend/api/api/settings.py matches the password set in the database found in pgAdmin4. As of writing this, the default value of the password value is 'password'.
- Food and restaurant icons created by Freepik - Flaticon
- Drone: Modeled by Benjamin Ricks
- Binoculars icons created by smashingstocks - Flaticon
- Money icons created by vectorsmarket15 - Flaticon
- Dollar icons created by Freepik - Flaticon
- Pay icons created by Freepik - Flaticon
- Inventory icons created by IconBaandar - Flaticon
- User icons created by Freepik - Flaticon
- Drone: Modeled by Benjamin Ricks
- Hello icons created by Freepik - Flaticon
- Ice cream icons created by Freepik - Flaticon
- Drone: Modeled by Benjamin Ricks
- Featured 0: https://www.pinterest.com/pin/74872412544956633/
- Featured 1: https://www.stlmag.com/dining/the-dish-ices-plain-fancy/
- Featured 2: https://practicallyhomemade.com/strawberry-crunch-cheesecake-cones/
- Featured 3: https://pintsizedbaker.com/peanut-butter-ice-cream/
- Waffle icons created by iconixar - Flaticon
- Bowl icons created by Roundicons - Flaticon
- Ice cream cone icons created by Freepik - Flaticon
- Cone icons created by Nikita Golubev - Flaticon
- Cookie icons created by Smashicons - Flaticon
- Sprinkles icons created by Freepik - Flaticon
- Oreo icons created by LAFS - Flaticon
- Syrup icons created by Freepik - Flaticon
- Ice cream scoop (all flavors): created by Emma Lynn
Here is are a few git commands that will be used very often when collaborating
git clone [email protected]:sodo-launch-pad/raptor/raptor.git
- In order to clone the repo via SSH, you must have a functioning SSH key on the GitLab.
git checkout -b <YourBranchNameHere>
- If the specified branch doesn't exist, it will be created. The specified branch will then be checked out and all uncommitted changes will be brought to this branch
git add .
- All changes will be moved to staged
git commit -am "<Commit Message>"
- Moves all tracked files to staged and them commits them
git push --set-upstream <RemoteName> <BranchName>
- When pushing up a branch for the first time you need to establish which remote to push to. The RemoteName = origin, and BranchName is the name of the branch you have checked out and are attempting to push. This command only needs to be used the first a branch is pushed, after that
git push
can be used.
- When pushing up a branch for the first time you need to establish which remote to push to. The RemoteName = origin, and BranchName is the name of the branch you have checked out and are attempting to push. This command only needs to be used the first a branch is pushed, after that
git push
- Will push all your local and committed changes to the remote repo.
It is important to know that it is impossible to push to master. The master branch is considered production ready, so the only way to change/add code are through merge requests. Pushing up a new branch will automatically give a prompt to create a merge request on GitLab. Merge requests can also be manually created on GitLab. Once created, merge requests can be reviewed and then merged by the current team lead on GitLab. Add the current team lead to the Assignee so they will be notified of the request, and add the current sprint as the Milestone so it will be tracked properly.
Through the GitLab merge requests page, the team lead can add comments and suggestions to the code. You do not need to create multiple merge requests if changes need to be made. Pushing up changes to the branch associated with the merge request will automatically update the request. Once code is deemed sufficeint, the team lead can click the merge button on GitLab and the code will be merged with master. Merging two branches that are not master can also be done this way, but it is not required.