Skip to content

SheCodesAus/layer_8_victory_backend_bris_2023

Repository files navigation

Contributors Forks Stargazers Issues


Logo

MentorShip

MentorShip connects professionals in the technology industry with aspiring coders.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. Contact

About The Project

MentorShip’s purpose is to make finding and choosing mentors for She Codes workshops seamless. This repository hosts the code for the back end of the website. You can find the front end repository here. The deployed DRF project can be found here

(back to top)

Built With

  • Django

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • python
  • pip
  • unrestricted execution policy (Windows requirement)

Installation

  1. Clone the repo

    git clone https://github.com/SheCodesAus/layer_8_victory_backend_bris_2023.git
  2. Create the local environment

    python -m venv venv
  3. Activate the virtual environment

    • navigate to the folder that contains the requirements.txt file
      • If you're on a windows machine, run the command
    . venv/Scripts/activate
    • If you're on a linux machine, run the command
    source venv/bin/activate
  4. Install the required libraries

    python -m pip install -r requirements.txt
  5. Make initial migrations

    cd mentorship
    python manage.py migrate
  6. Run the server

    python manage.py runserver
  • Use the url http://127.0.0.1:8000/, your favourite API Tool (e.g. Insomnia, Postman) and refer to the API Specifications to create HTTP requests
  • When you're finished press CTRL+C to quit the server
  • Deactivate the virtual environment by either using the command deactivate or terminate your terminal session.

(back to top)

API Specification

HTTP Method Url Purpose Request Body Successful Response Code Authentication
Authorization
GET events/ Return all events N/A 200 N/A to see published events. Must be authenticated as staff to see unpublished events
GET mentor-events/ Return all mentor event registrations N/A 200 N/A to see confirmed records. Must be authenticated as staff to see all. Authenticated mentors can see their own records.
GET users/ Return all users N/A 200 Bearer Token authentication.
Staff user can view list of all users. Non staff user will only return own user object.
GET skills/ Return all skills N/A 200 N/A
GET mentor-events/self Return records for own event registration records N/A 200 Bearer Token authentication.
POST events/ Create a new event event object 201 Bearer Token authentication.
Only available to staff users.
POST mentor-events/ Register mentor against event event_id, mentor_id (mentor_id only required if request is made by staff user) 201 Bearer Token authentication.
Only available to users with onboarding_status of "Ready".
POST skills/ Create a new skill skill name 201 Bearer Token authentication.
Only available to staff users.
POST users/ Create a new user user object 201 N/A for creating general mentors. Must be authenticated as a staff user if creating another staff user
POST api-token-auth/ Obtain Bearer Token for Authorisation username and password 200 N/A
PUT events/< int:pk >/ Update event event object or event field 201 Bearer Token authentication.
Only available to staff users.
PUT mentor-events/< int:pk >/ Update mentor-event record available and/or confirmed fields 201 Bearer Token authentication.
Mentors can update the available field of own record only. Staff users can update both fields for any record.
PUT users/< int:pk >/ Update user user object or user field 201 Bearer Token authentication.
Mentors can update the available field of own record only. Staff users can update both fields for any record.

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Contact

Mentorship was created by

  • Andrea del Pilar Rivera Peña
  • Jenny Waller
  • Maya Dominice
  • Oriyan Nadav
  • Rosie Maguire

If you would like to get in contact with the application creators, you can do so by emailing [email protected]

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages