diff options
| -rw-r--r-- | README.md | 26 | ||||
| -rw-r--r-- | bookstore_project/settings.py | 2 | ||||
| -rw-r--r-- | pyproject.toml | 1 | ||||
| -rw-r--r-- | uv.lock | 23 |
4 files changed, 51 insertions, 1 deletions
@@ -0,0 +1,26 @@ +# SEU Bookstore + +## Development + +```shell +$ uv sync +# Just like how any normal Django app +$ uv run manage.py migrate # to create db +$ uv run manage.py runserver +``` + +## Deployment + +```shell +$ uv add gunicorn +# Also add settings.py:ALLOWED_HOSTS +$ uv run gunicorn bookstore_project.wsgi:application +``` + +## Default credentials + +Check out `store/migrations/0002_create_superuser.py` for details. + +## Import samples + +`*.jsonl` are samples pulled from [Anna's Archive](https://annas-archive.li/faq) and can be imported under staff/superuser priviledge (`/book/import/`).
\ No newline at end of file diff --git a/bookstore_project/settings.py b/bookstore_project/settings.py index 7f8b1c5..67660ca 100644 --- a/bookstore_project/settings.py +++ b/bookstore_project/settings.py @@ -25,7 +25,7 @@ SECRET_KEY = "django-insecure-mpnnw2d=87-u)6+vmidshrn2)2(lt497%j+4w$4*t^nv840nwk # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ["localhost", "127.0.0.1", "0.0.0.0"] # Application definition diff --git a/pyproject.toml b/pyproject.toml index d67fc9d..fe7902f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,5 +7,6 @@ requires-python = ">=3.14" dependencies = [ "django>=6.0.1", "django-mathfilters>=1.0.0", + "gunicorn>=24.1.1", "pillow>=12.1.0", ] @@ -18,6 +18,7 @@ source = { virtual = "." } dependencies = [ { name = "django" }, { name = "django-mathfilters" }, + { name = "gunicorn" }, { name = "pillow" }, ] @@ -25,6 +26,7 @@ dependencies = [ requires-dist = [ { name = "django", specifier = ">=6.0.1" }, { name = "django-mathfilters", specifier = ">=1.0.0" }, + { name = "gunicorn", specifier = ">=24.1.1" }, { name = "pillow", specifier = ">=12.1.0" }, ] @@ -52,6 +54,27 @@ wheels = [ ] [[package]] +name = "gunicorn" +version = "24.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "packaging" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/78/0a/10739c03537ec5b131a867bf94df2e412b437696c7e5d26970e2198a80d2/gunicorn-24.1.1.tar.gz", hash = "sha256:f006d110e5cb3102859b4f5cd48335dbd9cc28d0d27cd24ddbdafa6c60929408", size = 287567, upload-time = "2026-01-24T01:15:31.359Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/96/90/cfe637677916fc6f53cd2b05d5746e249f683e1fa14c9e745a88c66f7290/gunicorn-24.1.1-py3-none-any.whl", hash = "sha256:757f6b621fc4f7581a90600b2cd9df593461f06a41d7259cb9b94499dc4095a8", size = 114920, upload-time = "2026-01-24T01:15:29.656Z" }, +] + +[[package]] +name = "packaging" +version = "26.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/65/ee/299d360cdc32edc7d2cf530f3accf79c4fca01e96ffc950d8a52213bd8e4/packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4", size = 143416, upload-time = "2026-01-21T20:50:39.064Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" }, +] + +[[package]] name = "pillow" version = "12.1.0" source = { registry = "https://pypi.org/simple" } |
