An application that provides a list of items within a variety of categories as well as provide a user registration and authentication system. Registered users will have the ability to post, edit and delete their own items.
Install vagrant from here
- Use preconfigured Vagrant VMs to run the app.
- To use the Vagrant virtual machine, navigate to the fullstack-nanodegree-item-catalog/vagrant directory in the terminal, then use the command vagrant up (powers on the virtual machine) followed by vagrant ssh (logs into the virtual machine).
- After logging into VM (by vagrant ssh),
cd
to/vagrant/catalog/
dir and runpython runserver.py
. - This will bring up the web server at
http://localhost:8000/
-
From local machine goto http://localhost:8000/restaurant
, this will bring up the app:
Click on restaurant link to view menu items listed in that restaurant:
The app supports social login for google
and facebook
. Use existing accounts in google
and facebook
to register w/ the restaurant menu app:
When user is logged in, user can add a new restaurant:
Owner of the Restaurant: If logged in user is the owner of the restaurant, he can add menu item in that restaurant:
Not Owner of the Restaurant: Flash message is thrown if logged in user is not the owner of the restaurant:
Logged in user can update or delete menu item if user is owner of the restaurant. If the user is not the owner of the restaurant, the dropdown link/caret is hidden on the menu item:
Logged in user can update restaurant name or delete it if user is owner of the restaurant. If user is not the owner then the Restaurant
dropdown on header is hidden for that restaurant:
The app supports two API representation type (response data type) which are application/json
and application/xml
. Set Accept
header type in the request to get desired Content-Type
.
Endpoint: /api/v1.0/restaurant
Method: GET
JSON:
Accept: application/json
XML:
Accept: application/xml
Endpoint: /api/v1.0/restaurant/<int:restaurant_id>/
Endpoint: /api/v1.0/restaurant/<int:restaurant_id>/menu
Method: GET
JSON:
Accept: application/json
XML:
Accept: application/xml
Endpoint: /api/v1.0/restaurant/<int:restaurant_id>/menu/<int:menu_id>/
Method: GET
JSON:
Accept: application/json
XML:
Accept: application/xml