Skip to content

csc309-2023wi/restify-p2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Restify

An online marketplace where users can search, book, comment and rate short term lodging experiences. University of Toronto CSC309 project.

REST API Endpoint Spec

Local Development

Setup

When running on Linux, the following steps can simply be replaced by ./startup.sh

  1. Create python virtual environment

    python3.10 -m venv .venv

    This will create a virtual environment at ./.venv.

  2. Activate the virtual environment in Linux/UNIX:

    source ./.venv/bin/activate

    Or in Windows:

    .venv\Scripts\activate.bat
  3. Install required python packages:

    pip install -r requirements.txt
  4. Enter Django project and perform database migrations:

    cd django_restify
    python3.10 manage.py makemigrations
    python3.10 manage.py migrate

Running

When running on Linux, the following steps can simply be replaced by ./run.sh

  1. Activate the Python virtual environment.
  2. Run the development server:
    python3.10 ./manage.py runserver

You should be able to visit http://127.0.0.1:8000/api/ and see the following JSON response:

{
    "hello": "world"
}

All additional API endpoints will reside under the /api/ path.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published