{"id":20336235,"url":"https://github.com/wsvincent/lithium","last_synced_at":"2025-05-14T03:10:45.994Z","repository":{"id":37580366,"uuid":"121658961","full_name":"wsvincent/lithium","owner":"wsvincent","description":"Django starter project with 🔋","archived":false,"fork":false,"pushed_at":"2025-04-28T13:20:03.000Z","size":30656,"stargazers_count":2351,"open_issues_count":9,"forks_count":433,"subscribers_count":64,"default_branch":"main","last_synced_at":"2025-05-07T03:03:48.456Z","etag":null,"topics":["allauth","django","docker","python","starter-template","whitenoise"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wsvincent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-02-15T17:29:07.000Z","updated_at":"2025-05-07T02:32:09.000Z","dependencies_parsed_at":"2024-01-11T20:42:56.565Z","dependency_job_id":"b9b04127-ae37-4849-9935-02d58088bbf8","html_url":"https://github.com/wsvincent/lithium","commit_stats":null,"previous_names":["wsvincent/lithium","wsvincent/djangox"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsvincent%2Flithium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsvincent%2Flithium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsvincent%2Flithium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsvincent%2Flithium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wsvincent","download_url":"https://codeload.github.com/wsvincent/lithium/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254052692,"owners_count":22006716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allauth","django","docker","python","starter-template","whitenoise"],"created_at":"2024-11-14T21:01:26.409Z","updated_at":"2025-05-14T03:10:40.947Z","avatar_url":"https://github.com/wsvincent.png","language":"Python","readme":"# Lithium: A Django-Powered Boilerplate\nLithium is a batteries-included Django starter project with everything you need to start coding, including user authentication, static files, default styling, debugging, DRY forms, custom error pages, and more.\n\n\u003e This project was formerly known as _DjangoX_ but was renamed to _Lithium_ in November 2024.\n\nhttps://github.com/user-attachments/assets/8698e9dd-1794-4f96-9c3f-85add17e330b\n\n## 👋 Free Newsletter\n[Sign up for updates](https://buttondown.com/lithiumsaas) to the free and upcoming premium SaaS version!\n\n## 🚀 Features\n- Django 5.1 \u0026 Python 3.13\n- Installation via [uv](https://github.com/astral-sh/uv), [Pip](https://pypi.org/project/pip/) or [Docker](https://www.docker.com/)\n- User authentication--log in, sign up, password reset--via [django-allauth](https://github.com/pennersr/django-allauth)\n- Static files configured with [Whitenoise](http://whitenoise.evans.io/en/stable/index.html)\n- Styling with [Bootstrap v5](https://getbootstrap.com/)\n- Debugging with [django-debug-toolbar](https://github.com/jazzband/django-debug-toolbar)\n- DRY forms with [django-crispy-forms](https://github.com/django-crispy-forms/django-crispy-forms)\n- Custom 404, 500, and 403 error pages\n\n## Table of Contents\n* **[Installation](#installation)**\n  * [uv](#uv)\n  * [Pip](#pip)\n  * [Docker](#docker)\n* [Next Steps](#next-steps)\n* [Contributing](#contributing)\n* [Support](#support)\n* [License](#license)\n\n## 📖 Installation\nLithium can be installed via Pip or Docker. To start, clone the repo to your local computer and change into the proper directory.\n\n```\n$ git clone https://github.com/wsvincent/lithium.git\n$ cd lithium\n```\n\n### uv\nYou can use [uv](https://docs.astral.sh/uv/) to create a dedicated virtual environment.\n\n```\n$ uv sync\n```\n\nThen run `migrate` to configure the initial database. The command `createsuperuser` will create a new superuser account for accessing the admin. Execute the `runserver` commandt o start up the local server.\n\n```\n$ uv run manage.py migrate\n$ uv run manage.py createsuperuser\n$ uv run manage.py runserver\n# Load the site at http://127.0.0.1:8000 or http://127.0.0.1:8000/admin for the admin\n```\n\n### Pip\nTo use Pip, create a new virtual environment and then install all packages hosted in `requirements.txt`. Run `migrate` to configure the initial database. and `createsuperuser` to create a new superuser account for accessing the admin. Execute the `runserver` commandt o start up the local server.\n\n```\n(.venv) $ pip install -r requirements.txt\n(.venv) $ python manage.py migrate\n(.venv) $ python manage.py createsuperuser\n(.venv) $ python manage.py runserver\n# Load the site at http://127.0.0.1:8000 or http://127.0.0.1:8000/admin for the admin\n```\n\n### Docker\n\nTo use Docker with PostgreSQL as the database update the `DATABASES` section of `django_project/settings.py` to reflect the following:\n\n```python\n# django_project/settings.py\nDATABASES = {\n    \"default\": {\n        \"ENGINE\": \"django.db.backends.postgresql\",\n        \"NAME\": \"postgres\",\n        \"USER\": \"postgres\",\n        \"PASSWORD\": \"postgres\",\n        \"HOST\": \"db\",  # set in docker-compose.yml\n        \"PORT\": 5432,  # default postgres port\n    }\n}\n```\n\nThe `INTERNAL_IPS` configuration in `django_project/settings.py` must be also be updated:\n\n```python\n# config/settings.py\n# django-debug-toolbar\nimport socket\nhostname, _, ips = socket.gethostbyname_ex(socket.gethostname())\nINTERNAL_IPS = [ip[:-1] + \"1\" for ip in ips]\n```\n\nAnd then proceed to build the Docker image, run the container, and execute the standard commands within Docker.\n\n```\n$ docker compose up -d --build\n$ docker compose exec web python manage.py migrate\n$ docker compose exec web python manage.py createsuperuser\n# Load the site at http://127.0.0.1:8000 or http://127.0.0.1:8000/admin for the admin\n```\n\n## Next Steps\n\n- Add environment variables. There are multiple packages but I personally prefer [environs](https://pypi.org/project/environs/).\n- Add [gunicorn](https://pypi.org/project/gunicorn/) as the production web server.\n- Update the [EMAIL_BACKEND](https://docs.djangoproject.com/en/4.0/topics/email/#module-django.core.mail) and connect with a mail provider.\n- Make the [admin more secure](https://opensource.com/article/18/1/10-tips-making-django-admin-more-secure).\n- `django-allauth` supports [social authentication](https://django-allauth.readthedocs.io/en/latest/providers.html) if you need that.\n\nI cover all of these steps in tutorials and premium courses over at [LearnDjango.com](https://learndjango.com).\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! See [CONTRIBUTING.md](https://github.com/wsvincent/lithium/blob/master/CONTRIBUTING.md).\n\n## ⭐️ Support\n\nGive a ⭐️  if this project helped you!\n\n## License\n\n[The MIT License](LICENSE)\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwsvincent%2Flithium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwsvincent%2Flithium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwsvincent%2Flithium/lists"}