[docs] Fixed stable symlink not updating when changed #2042
+3
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was the cause of #2027 (which I resolved by changing the symlink manually at the time).
With this change the manual update is not needed anymore and the
stable
symlink will be updated automatically (as intended) when a new major version of Django is released.I've tested it locally and it seems to work (it creates the symlink if it's missing, updates it if it changes, and leaves it alone otherwise). To test it:
python manage.py update_docs --lang en --force --interactive
and pick "yes" for the version that's currently the default on your local installdjangodocs/en/<version>/_built/
) and points to the version you just builtis_default
in the admin (or manually delete/recreate the symlink to point to something else), runupdate_docs
again and see that the symlink has changed.