Skip to content

A simple To-Do lists app with user authentication using python-django web framework.

License

Notifications You must be signed in to change notification settings

HemantSachdeva/ToDoApp

Repository files navigation

To Do App fevicon

To Do App

A simple to do list app built with Django and PostgreSQL.


Features

  • Create a user account
  • Create a to do list
  • Edit tasks in the list
  • Delete tasks from the list
  • Mark tasks as complete
  • Mark tasks as incomplete (default)
  • Logout and login to your account on any device not just the one you created it on
  • Change your user account password

Tech Stack

Deployment on localhost

  • With existing PostgreSQL database (follow this for setting up a local PostgreSQL database)
  1. Clone the repository
git clone https://github.com/HemantSachdeva/ToDoApp.git
  1. Change current directory to the cloned repository
  2. Run the following command to install all the dependencies
pip install -r requirements.txt

Prequisites: Python must be installed on your machine to run pip command.

  1. Rename the change_this_to.env file to .env and add your PostgreSQL database credentials
mv change_this_to.env .env

NOTE: Make sure the .env file is in the root directory of the cloned repository and you fill the fields correctly.

  1. Run following commands to make migrations, migrate the database, collect static file to the root and run the server
python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic
python manage.py runserver
  • With SQLite3 database

Follow all the above 1 to 3 steps.

  1. Rename the change_this_to.env file to .env and add your just add any SECRET_KEY you want for local use. (You can use any string you want and ignore other fields)

  2. Open project/settings.py and change the following lines about database

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': os.getenv('NAME'),
        'USER': os.getenv('DB_USER'),
        'PASSWORD': os.getenv('PASSWORD'),
        'HOST': os.getenv('HOST'),
        'PORT': os.getenv('DB_PORT'),
    }
}

to the following

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
}
  1. Commands to run the localhost server with SQLite3 database are same as above mentioned for PostgreSQL in Step 5.

NOTE: Everytime you run the server, login/register a new user and create a new to do list, everything will be saved in the db.sqlite3 database file. Make sure not to add the db.sqlite3 file to the your commits for public/production use.

Want to contribute to this project?

Follow the Contributing Guide


Made with ❤ by Hemant Sachdeva

About

A simple To-Do lists app with user authentication using python-django web framework.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published