A bucketlist basically means that the things you would like to do or achieve before you EXPIRE
This is a responsive web application that allows you to add items to your bucketlist categories.
The application is hosted at nbm-doit
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You'll need to have the following installed in your local machine to run this application
Python
, Postgres
and GIT
-
Clone this repository
RUN
git clone https://github.com/NdagiStanley/not-by-might.git
-
CD into the directory
RUN
cd not-by-might
-
Install dependencies of the application/ project
RUN
pip install -r requirements.txt
-
Create a Postgresql database (it's best you use PGAdmin). Take note of the name, user, password and port.
-
Open the project in your preferred text editor, navigate to the settings.py which is in todo/todo/ directory and edit the fields surrounded by [] according to the following snippet starting at line 120. Fill the name, user, password and port (without the []) in the snippet
....
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '[name]',
'USER': '[user]',
'PASSWORD': '[password]',
'HOST': '127.0.0.1',
'PORT': '[port]',
}
}
....
-
Setup the application
RUN
cd todo
RUN
python manage.py makemigrations
RUN
python manage.py migrate
RUN
python manage.py collectstatic --noinput
-
Run the server
RUN
python manage.py runserver
and get to http://localhost:8000
Implement Django API in this structure:
{
"id": 1,
"name": "BucketList1",
"items": [
{
"id": 1,
"title": "I need to do X",
"date_created": "2015-08-12 11:57:23",
"date_modified": "2015-08-12 11:57:23",
"done": false
}
],
"date_created": "2015-08-12 11:57:23",
"date_modified": "2015-08-12 11:57:23",
"created_by": "1113456"
}
using
with Token Based Authentication within these rules:
EndPoint | Public Access |
---|---|
POST /auth/login | TRUE |
POST /auth/register | TRUE |
POST /bucketlists/ | FALSE |
GET /bucketlists/ | FALSE |
GET /bucketlists/< id > | FALSE |
PUT /bucketlists/< id > | FALSE |
DELETE /bucketlists/< id > | FALSE |
POST /bucketlists/< id >/items/ | FALSE |
PUT /bucketlists/< id >/items/< item_id > | FALSE |
DELETE /bucketlists/< id >/items/< item_id > | FALSE |
It's documentation is here made using DRF Docs
Have a front-end consuming the API
This has been implemented using vuejs (frontend framework)
and Bootstrap (frontend framework)
This is how to run the automated tests for this application
RUN python manage.py test
You might want to deploy this project. Well, the application is ready fro deployment to heroku. After installing heroku toolbelt; do the following (Ensure you are in the root folder):
RUN heroku local web
and go to to check it how it will look after deployment
RUN heroku login
and enter your credentials.
RUN heroku create [appname]
without the [ ] .
RUN heroku git push [branch_name]
without the [ ]. The branch_name should be master if you just cloned the repo and did not branch out.
Copyright AD-2016
Stanley Ndagi c/o Andela
Inspiration:
It's not by might that you achieve the things you do in life!