Skip to content

tramanhvong/Pomodoro-Timer-Django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

Pomodoro Django

A simple Pomodoro timer web app built with Django.

This repository contains a small Django project (pomodoro) with a single app home that provides user signup/login and per-user Pomodoro timers.

Quick overview

  • Django project: core
  • App: home
  • Database: SQLite (db.sqlite3)
  • Virtual environment in repository (optional): pomodoro_env/
  • Templates: home/templates/home/ (example: pomodoro.html, login.html, signup.html)

Requirements

  • Windows (instructions below use PowerShell)
  • Python 3.10+ (the project uses a virtual environment in pomodoro_env/)
  • Django 5.2.7 (used when this project was created)

Setup & Run (PowerShell)

Open PowerShell at the repository root (where manage.py lives, the folder named pomodoro in this repo structure), then:

# activate the venv (if you created/are using the one in repo)
.\pomodoro_env\Scripts\Activate.ps1

# apply migrations
python manage.py migrate

# create an admin user (optional)
python manage.py createsuperuser

# run the development server
python manage.py runserver

Then open http://127.0.0.1:8000/ in your browser.

Pomodoro Django

A simple Pomodoro timer web app built with Django.

This repository contains a small Django project (pomodoro) with a single app home that provides user signup/login and per-user Pomodoro timers.

Quick overview

  • Django project: core
  • App: home
  • Database: SQLite (db.sqlite3)
  • Virtual environment in repository (optional): pomodoro_env/
  • Templates: home/templates/home/ (example: pomodoro.html, login.html, signup.html)

Requirements

  • Windows (instructions below use PowerShell)
  • Python 3.10+ (the project uses a virtual environment in pomodoro_env/)
  • Django 5.2.7 (used when this project was created)

Setup & Run (PowerShell)

Open PowerShell at the repository root (where manage.py lives, the folder named pomodoro in this repo structure), then:

# activate the venv (if you created/are using the one in repo)
.\pomodoro_env\Scripts\Activate.ps1

# apply migrations
python manage.py migrate

# create an admin user (optional)
python manage.py createsuperuser

# run the development server
python manage.py runserver

Then open http://127.0.0.1:8000/ in your browser.

Project structure (important files)

  • pomodoro/ – Django project root (contains manage.py, db.sqlite3)
  • pomodoro/core/settings.py – Django settings (note: TEMPLATES['DIRS'] includes home/templates)
  • pomodoro/home/ – the main app
    • views.py – request handlers (renders templates in home/)
    • templates/home/ – HTML templates (pomodoro.html, login.html, signup.html)
    • static/ (if present) – static assets like CSS/JS referenced by templates

Docker / Container usage

This project includes a Dockerfile in the pomodoro/ directory and a requirements.txt file. The Dockerfile builds a minimal image that:

  • Installs Python and minimal system build deps
  • Installs Python packages from requirements.txt
  • Copies the project into the container
  • Runs migrations and collectstatic via an entrypoint script
  • Starts the app with Gunicorn on port 8000

Basic build and run (from the pomodoro/ folder):

# build the image (from inside the pomodoro folder)
docker build -t pomodoro:latest .

# run the container (maps container port 8000 -> host 8000)
docker run --rm -p 8000:8000 --name pomodoro_app pomodoro:latest

Common troubleshooting

  • TemplateDoesNotExist: ensure templates are referenced using their path under home/templates/ (for example, home/pomodoro.html) or configure TEMPLATES['DIRS'] appropriately in core/settings.py. The project expects templates under home/templates/home/.

  • Virtualenv: this repo includes a pomodoro_env/ virtual environment. If you run into package mismatch issues, recreate a fresh venv and install the required packages.

  • Static files: in development Django serves static files automatically when DEBUG = True. For production, run python manage.py collectstatic and configure static serving via your webserver.

Tests

Run the Django test suite:

python manage.py test

Add tests under home/tests.py or home/tests/.

Contributing

  • Open an issue describing the problem or feature.
  • Create a branch, make changes, and submit a pull request.

About

Pomodoro web-based application that allows customizing timer and to-do list.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors