Learning Log is an online journal system that lets you keep track of information you’ve learned about particular topics. Learning log is built using the Django 5.2.x web framework.
It allows users to log the topics they’re interested in and to make journal entries as they learn about each topic. Once logged in, a user can create new topics, add new entries, and read and edit existing entries.
-
Application
- Create & edit new topics and entries
- User registration with email verification & social(GitHub) login using django-allauth
- Bootstrap4 & crispy-forms decorations
- Customizable user profile pages with bio, profile pic, & country flags
- For additional links to package resources used in this repository, see the Package Index
-
Dev/testing
- Basic module testing templates
- Bootstrap4 & crispy-forms decorations
- Customizable user profile pages with bio, profile pic, & country flags
- For additional links to package resources used in this repository, see the Package Index
-
Dev/testing
- Basic module testing templates
- Coverage reports on web
- Debug-toolbar available. See notes in
config/settings.py
for enabling. - Examples of using Factories & pytest fixtures in account app testing
- shell_plus via django-extensions package
- Nox testing sessions for latest Python 3.11, 3.12, 3.13
- Sphinx documentation generation (
nox -s docs
) - Generate Coverage reports in
htmlcov
directory (nox -s coverage
) - linting (
nox -s lint
) - pip-audit(python package vulnerability testing) (
nox -s audit
) - pytest sessions with
pytest-cov
pytest-django (
coverage run -m pytest
)
- Sphinx documentation generation (
-
run
anddrun
command menusA collection of command shortcuts/aliases for frequently used Docker, Django, and Nox commands. For a local installation, use the
run
command file. For Docker installations, use thedrun
command file. (adapted from Nick Janetakis' helpful docker-django-example) repository.You can run
./run
to get a list of commands and each command has documentation in the run file itself. This comes in handy to run various Docker commands because sometimes these commands can be a bit long to type.If you get tired of typing
./run
you can always create a shell alias withalias run=./run
in your~/.bash_aliases
or equivalent file. Then you'll be able to runrun
instead of./run
.
git clone https://github.com/kevinbowen777/learning-log.git
cd learnin-_log
- Local installation:
poetry shell
poetry install
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
- Docker installation:
docker compose up --build
docker compose build --build-arg "ENV=DEV"
(include testing/dev dependencies)docker compose build --build-arg "ENV=PROD"
docker compose exec web python manage.py migrate
docker compose exec web python manage.py createsuperuser
Additional commands:docker compose exec web python manage.py shell_plus
(loads Django shell autoloading project models & classes)docker run -it django-start-web bash
(CLI access to container)
- Browse to http://127.0.0.1:8000 or http://127.0.0.1:8000/resources/
- Pre-commit:
- To add the hook, run the following command in the poetry shell:
pre-commit install
- To update the pre-commit hooks, run the following command:
pre-commit autoupdate
- To add the hook, run the following command in the poetry shell:
- Documentation
nox -s docs-3.13
- Open browser to
docs/_build/index.html
docker compose exec web python manage.py test
coverage run -m pytest
- Nox (includes sessions for coverage, docs, lint, pyright, audit, tests)
- testing supported for Python 3.11, 3.12, 3.13
- e.g.
nox
,nox -rs lint-3.13
,nox -s tests
nox
nox -s coverage-3.12
nox -s docs-3.13
nox -rs lint-3.11
(Use the 'r' flag to reuse existing session)nox -s pyright-3.13
nox -s audit
(will run tests against all Python versions)nox -s tests
A live application demonstration:
TBD
Visit the Issues page to view currently open bug reports or open a new issue.