Skip to content

bbergerud/meta_api_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Little Lemon APIs

This repository represents the final project as part of the API course in Meta's Back-End Developer Professional Certificate. It uses Django to interact with a sqlite database.

Populating database

In the app LittleLemonAPI there is a fixtures directory that contains data for pre-populating the database tables. These data can be added to the database by running commands like the following:

>>> python manage.py loaddata groups.json

There is a users.json file, but the passwords are not correctly saved when running the loaddata command as they are not hashed when inserting.

The following files can be used to fill in the relevant data

So to load them run the following in a terminal

python manage.py loaddata category.json menuitem.json order.json orderitem.json cart.json

Testing

Tests are implemented to check that the code fullfills the grading rubric. These tests can be executed by running

>>> python manage.py test

and for testing a specific case (e.g., test_10) one can do

>>> python manage.py test LittleLemonAPI.tests.RubricTest.test_10

Here's a good resource for authenticating users when testing.

NOTE: There is an issue with test #5 in regards to logging in which requires further debugging.

Notes

Adding trailing slashes were removed in the urls.py file, but the djoser paths still end with them so there are some API inconsistencies.

About

Final project for the Meta API course on Coursera

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages