It's the NextMotion application to process the data.
- python version should be 3.6
- Django 2.1
- Install python3.6
$ sudo add-apt-repository ppa:deadsnakes/ppa $ sudo apt-get update $ sudo apt-get install python3.6-dev
- Install Virtualenv
$ sudo apt-get install python3-pip $ sudo pip3 install virtualenv
-
Create the virtual envoirments with python 3.6 version and activate
$ virtualenv --python=python3.6 env $ source env/bin/activate -
Create the .env file to store the envoirment varible and it should be create in project root folder.
-
Install python dependencies, run into the project root directory.
$ pip install -r requirements.txt
-
Below is all the required envoirment variable. below are the sample value of database.
# email configuration. EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = 'enter user name' EMAIL_HOST_PASSWORD = '******' EMAIL_PORT = 587 EMAIL_USE_TLS = True
-
Go the the NextMotion project directory and migrate the db.
$ cd NextMotion $ python manage.py migrate -
Create admin user in django and runserver.
$ python manage.py createsuperuser $ python manage.py runserver
-
URL of admin panel is.
http://127.0.0.1:8000/admin/
-
Access the db console using django
$ python manage.py dbshell
-
Access the project python shell
$ python manage.py shell
-
Run the test cases.
$ python manage.py test -
I added the default sqlite db, please find below admin password and it's the basic token.
$ username = admin $ password = admin@12345 $ auth_token = 5e0f85d01c31dd826a965c48c14c60226319f6c2
-
Please find the postman collection of API into the root project directory and below are the endpoints of api.
GET api/invitations/ List all the invitations (with pagination) POST api/invitations/ Create an invitation PATCH api/invitations/<id>/ Modify the invitation with the given id DELETE api/invitations/<id>/ Delete the invitation with the given id