From 8bef904c6001aa355839a50202bec377c826c7a0 Mon Sep 17 00:00:00 2001 From: Tony Narlock <tony@git-pull.com> Date: Sat, 15 Oct 2022 10:36:48 -0500 Subject: [PATCH 1/4] docs(CHANGES): Fix italicization --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 36f6831..7afa91a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,7 +3,7 @@ CHANGES master (unreleased) ------------------- -_This is where upcoming changes will be._ +*This is where upcoming changes will be.* - Remove django-south migrations folder (#138) From 36cbd06523773aa1a3410e5090ec9d4fef902f58 Mon Sep 17 00:00:00 2001 From: Tony Narlock <tony@git-pull.com> Date: Sat, 15 Oct 2022 10:32:27 -0500 Subject: [PATCH 2/4] docs(CHANGES): Note migration onramp --- CHANGES.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 7afa91a..43da8be 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,30 @@ master (unreleased) ------------------- *This is where upcoming changes will be.* +Breaking change: Missing ``DEFAULT_AUTO_FIELD`` +""""""""""""""""""""""""""""""""""""""""""""""" +This sets a ``DEFAULT_AUTO_FIELD`` to ``BigAutoField`` for robots in ``AppConfig``. Previously, +there was no app configuration or setting for this. (#134, thank you @jan-szejko-steelseries) + +Robots 5.0 included a ``BigAutoField`` migration file for django 3.2 support (see #112), +however, this caused an extra migration to be created to set ``django.db.models.AutoField`` +for certain users (see #124). + +**Breaking: Migration issues** + +New django sites should work fine. + +*Existing sites that manually created migrations for robots 5.0:* + +If you ran ``./manage.py makemigrations`` to bypass the #112 issue, you may need to resolve +this manually if a custom migration you made for robots was applied in ``django_migrations``. + +Resources: +- https://docs.djangoproject.com/en/4.1/releases/3.2/#customizing-type-of-auto-created-primary-keys +- https://docs.djangoproject.com/en/3.2/ref/settings/#std-setting-DEFAULT_AUTO_FIELD + +Maintenance +""""""""""" - Remove django-south migrations folder (#138) 5.0 (2022-01-08) From a98c7d27e1918c26f5c6e9538d23be6415e86381 Mon Sep 17 00:00:00 2001 From: Tony Narlock <tony@git-pull.com> Date: Sat, 15 Oct 2022 10:40:38 -0500 Subject: [PATCH 3/4] docs(CHANGES): Note 6.0, unreleased --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 43da8be..309ddd9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,9 @@ master (unreleased) ------------------- *This is where upcoming changes will be.* +6.0 (unreleased) +---------------- + Breaking change: Missing ``DEFAULT_AUTO_FIELD`` """"""""""""""""""""""""""""""""""""""""""""""" This sets a ``DEFAULT_AUTO_FIELD`` to ``BigAutoField`` for robots in ``AppConfig``. Previously, From e9c3c225e26c0551e3bc6e24542e55e61a9e523d Mon Sep 17 00:00:00 2001 From: Tony Narlock <tony@git-pull.com> Date: Sat, 15 Oct 2022 10:43:34 -0500 Subject: [PATCH 4/4] docs: Add notes on running tests locally See also: #136 --- docs/index.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 7f4cc96..f8e6c6d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -157,6 +157,30 @@ settings file:: This tells Django to cache the ``robots.txt`` for 24 hours (86400 seconds). The default value is ``None`` (no caching). +Developing +========== + +To run tests, create a virtualenv: + + virtualenv --python 3.10 .venv + +Source it: + + . .venv/bin/activate + + # or if you use source + source .venv/bin/activate + +Install: + + pip install -e . + pip install -r tests/requirements.txt + pip install django + +Run the tests: + + env PYTHONPATH=. DJANGO_SETTINGS_MODULE=tests.settings django-admin test robots -v2 + Bugs and feature requests =========================