Django server for Travel Mate (Project: nomad)

Overview

Travel Mate Server (Project: Nomad)

Build Status

Django 2.0 server for Travel Mate

Contribute

  • For new feature request in the app, open a new feature request on the main repository
  • For reporting bug in existing APIs, open a new issue on this repository

Local setup instructions

  • Clone the project from source
git clone https://github.com/project-travel-mate/server && cd server
  • Setup virtual environment
pip install virtualenv
virtualenv venv --python=python3.6

Now activate the environment shell with:

source venv/bin/activate  # On Linux

or

venv\Scripts\activate  & :: On Windows
  • Install all dependencies
pip install -r requirements.txt

For Linux-

$ sudo -u postgres createuser nomad
$ sudo -u postgres createdb nomad

$ sudo -u postgres psql
psql=# alter user nomad with encrypted password 'pass';
psql=# grant all privileges on database nomad to nomad ;
psql=# ALTER USER nomad CREATEDB ;

For Windows-

The complete path>psql -U postgres -h localhost
Password:The one given during setup of postgres.
postgres=# create database nomad;
postgres=# create user nomad;
postgres=# alter user nomad with encrypted password 'pass';
postgres=# grant all privileges on database nomad to nomad ;
postgres=# ALTER USER nomad CREATEDB ;
  • Database migrations
python manage.py makemigrations
python manage.py migrate
  • Run Tests
python manage.py test
  • Finally! Run server
python manage.py runserver

Open localhost:8000

  • To access Django Admin
python manage.py createsuperuser

When prompted, type your username (lowercase, no spaces), email address, and password. For example, the output should look like this:

Username: nomadadmin
Email address: [email protected]
Password:
Password (again):
Superuser created successfully.
  • Re-run the server
python manage.py runserver

Open localhost:8000/admin

Working with authenticated APIs

You would need to have a registered user, with which you can generate a authentication token. Follow the following steps to generate a token (You can download Postman client to make the following POST calls) Reference: TokenAuthentication API docs

  • Make a POST call to /api/sign-up with 4 form-data body objects: email, password, firstname, lastname. You should get "Successfully registered" response with 201 status code.
  • Make a POST call to /api/sign-in with 2 form-data body objects: username (which is your email Id you used for sign up), password. You will get a token in JSON response, store it somewhere.
  • For making any subsequent request, use the above token by sending it as an "Authorization HTTP Header", eg: Authorization: Token <your token>
Comments
  • [API Request] GET API for currency convertor

    [API Request] GET API for currency convertor

    Using The Free Currency Converter API make a GET API that takes two currencies, source_currency and target_currency and make a call to the API and render the conversion rate as output

    enhancement help wanted good first issue 
    opened by prabhakar267 25
  • [API Request] Call GitHub APIs to get a list of the users who have worked on project

    [API Request] Call GitHub APIs to get a list of the users who have worked on project

    For all the repositories in the organisation Project Travel Mate, make a call to List contributors GitHub API and fetch all the users who have worked on developing various projects sorted in the order of their contributions. Include following fields for each of contributor object.

    • GitHub username
    • GitHub URL
    • Contributions
    • Projects contributed to (server / android)
    • Avatar URL
    enhancement help wanted good first issue 
    opened by prabhakar267 22
  • [API Request] Store

    [API Request] Store "checklist" information in database to sync

    Expose 2 APIs (GET and POST) to store and serve checklist information from user. Create new checklist table with following fields

    • user
    • checklist_items
    • last_updated

    On every POST call, you will get a list of all the checklist items, you can store the complete response as a field in table. For GET API, you need to return the checklist object, with above attributes

    enhancement help wanted hacktoberfest 
    opened by prabhakar267 13
  • [Feature Request] Add email field in

    [Feature Request] Add email field in "Forget password" APIs

    For forget password APIs, currently it tries to extract the user email address from request, but the call would be made to this APIs from an unauthenticated user, therefore add another field in the request for email (username)

    bug help wanted hacktoberfest 
    opened by prabhakar267 11
  • Missing images in most poular cities [BUG]

    Missing images in most poular cities [BUG]

    Describe the bug Images are missing from some items in the "most popular cities"

    To Reproduce Steps to reproduce the behavior:

    1. Go to Most popular cities

    Expected behavior Images should resolve.

    Screenshots Screenshot_20200116-225444_Travel Mate

    Device Information (please complete the following information):

    • Device: Galaxy s10+
    • OS: android 9
    • App Version: 5.6.1
    opened by lewisgarton 9
  • The currency converter does not work

    The currency converter does not work

    Description

    The feature "currency converter" available under the Utilities section does not.

    Steps to reproduce

    Utilities>Currency Converter

    What the current behaviour is?

    The converter does not convert the value provided in the desired currency. Eg. If we convert Rs.1 to bitcoin it is showing value to be 00001375, 0.000001462 etc. and the actual value is much higher to about 764586.5

    What the behaviour should?

    The converter should work.

    Would you like to work on this issue?

    Yes

    opened by ShivangiSingh17 9
  • [API Request] Places API

    [API Request] Places API

    Call Here Places API to fetch results. Cache results to serve them faster (Reference Code)

    Input Parameters

    • latitude
    • longitude
    • category_tags

    Output (a list of object, each containing following)

    • title
    • vicinity (address)
    • href (website)
    • icon
    help wanted 
    opened by prabhakar267 9
  • [Feature Request] Add ways to reach a particular location

    [Feature Request] Add ways to reach a particular location

    For eg) How to reach By air: Located at a distance of about 52 kms, Kullu-Manali airport is the nearest airport to Manali. By rail: Joginder Nagar is the nearest railway station to Manali located at a distance of about 160 kms. By road: Manali can be easily reach by road via private cabs, cars, and state-run or private buses from the nearby cities of New Delhi, Chandigarh, Pathankot, Ambala, and so on

    opened by knightcube 8
  • [API Request] API to get the list of upcoming Indian holidays

    [API Request] API to get the list of upcoming Indian holidays

    Using timeanddate.com's list of Indian holidays, generate a JSON for all the holidays in a given year.

    • Cache the response in order to avoid making repeated calls
    • Use the following structure for response (should be a list of following object):
        {
            "date": 1, 
            "day": "Monday", 
            "month": "January", 
            "name": "New Year's Day", 
            "type": "Restricted"
        },
    
    enhancement help wanted good first issue hacktoberfest 
    opened by prabhakar267 7
  • [API Request] Update Profile model to have user status

    [API Request] Update Profile model to have user status

    • Change Profile model to incorporate user status as well
    • Make changes to User serializer to show status
    • Make an API to add/update (both in single api) user status
    help wanted 
    opened by prabhakar267 7
  • [API Request] Update password

    [API Request] Update password

    POST API to update user's password. Verify if the old password is correct or not. If correct, change the password and update the user session.

    Input parameters

    • old password
    • new password

    Output

    • response code
    help wanted 
    opened by prabhakar267 7
Owner
Travel Mate
A must-have app for all the people who want to travel to a new city
Travel Mate
Complete Two-Factor Authentication for Django providing the easiest integration into most Django projects.

Django Two-Factor Authentication Complete Two-Factor Authentication for Django. Built on top of the one-time password framework django-otp and Django'

Bouke Haarsma 1.3k Jan 4, 2023
Django Admin Two-Factor Authentication, allows you to login django admin with google authenticator.

Django Admin Two-Factor Authentication Django Admin Two-Factor Authentication, allows you to login django admin with google authenticator. Why Django

Iman Karimi 9 Dec 7, 2022
Django-react-firebase-auth - A web app showcasing OAuth2.0 + OpenID Connect using Firebase, Django-Rest-Framework and React

Demo app to show Django Rest Framework working with Firebase for authentication

Teshank Raut 6 Oct 13, 2022
Local server that gives you your OAuth 2.0 tokens needed to interact with the Conta Azul's API

What's this? This is a django project meant to be run locally that gives you your OAuth 2.0 tokens needed to interact with Conta Azul's API Prerequisi

Fábio David Freitas 3 Apr 13, 2022
A wagtail plugin to replace the login by an OAuth2.0 Authorization Server

Wagtail OAuth2.0 Login Plugin to replace Wagtail default login by an OAuth2.0 Authorization Server. What is wagtail-oauth2 OAuth2.0 is an authorizatio

Gandi 7 Oct 7, 2022
Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.

Welcome to django-allauth! Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (soc

Raymond Penners 7.7k Jan 1, 2023
Per object permissions for Django

django-guardian django-guardian is an implementation of per object permissions [1] on top of Django's authorization backend Documentation Online docum

null 3.3k Jan 1, 2023
A JSON Web Token authentication plugin for the Django REST Framework.

Simple JWT Abstract Simple JWT is a JSON Web Token authentication plugin for the Django REST Framework. For full documentation, visit django-rest-fram

Simple JWT 3.3k Jan 1, 2023
REST implementation of Django authentication system.

djoser REST implementation of Django authentication system. djoser library provides a set of Django Rest Framework views to handle basic actions such

Sunscrapers 2.2k Jan 1, 2023
Authentication Module for django rest auth

django-rest-knox Authentication Module for django rest auth Knox provides easy to use authentication for Django REST Framework The aim is to allow for

James McMahon 878 Jan 4, 2023
Authentication for Django Rest Framework

Dj-Rest-Auth Drop-in API endpoints for handling authentication securely in Django Rest Framework. Works especially well with SPAs (e.g React, Vue, Ang

Michael 1.1k Jan 3, 2023
Get inside your stronghold and make all your Django views default login_required

Stronghold Get inside your stronghold and make all your Django views default login_required Stronghold is a very small and easy to use django app that

Mike Grouchy 384 Nov 23, 2022
JSON Web Token Authentication support for Django REST Framework

REST framework JWT Auth Notice This project is currently unmaintained. Check #484 for more details and suggested alternatives. JSON Web Token Authenti

José Padilla 3.2k Dec 31, 2022
Awesome Django authorization, without the database

rules rules is a tiny but powerful app providing object-level permissions to Django, without requiring a database. At its core, it is a generic framew

null 1.6k Dec 30, 2022
An extension of django rest framework, providing a configurable password reset strategy

Django Rest Password Reset This python package provides a simple password reset strategy for django rest framework, where users can request password r

Anexia 363 Dec 24, 2022
This app makes it extremely easy to build Django powered SPA's (Single Page App) or Mobile apps exposing all registration and authentication related functionality as CBV's (Class Base View) and REST (JSON)

Welcome to django-rest-auth Repository is unmaintained at the moment (on pause). More info can be found on this issue page: https://github.com/Tivix/d

Tivix 2.4k Jan 3, 2023
Authentication for Django Rest Framework

Dj-Rest-Auth Drop-in API endpoints for handling authentication securely in Django Rest Framework. Works especially well with SPAs (e.g React, Vue, Ang

Michael 1.1k Jan 3, 2023
User-related REST API based on the awesome Django REST Framework

Django REST Registration User registration REST API, based on Django REST Framework. Documentation Full documentation for the project is available at

Andrzej Pragacz 399 Jan 3, 2023
JSON Web Token Authentication support for Django REST Framework

REST framework JWT Auth JSON Web Token Authentication support for Django REST Framework Overview This package provides JSON Web Token Authentication s

Styria Digital Development 178 Jan 2, 2023