Skip to content

[docs] Fixed stable symlink not updating when changed #2042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bmispelon
Copy link
Member

@bmispelon bmispelon commented Apr 18, 2025

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:

  1. Run python manage.py update_docs --lang en --force --interactive and pick "yes" for the version that's currently the default on your local install
  2. Observe that the symlink was created (should be in djangodocs/en/<version>/_built/) and points to the version you just built
  3. Mark another version as is_default in the admin (or manually delete/recreate the symlink to point to something else), run update_docs again and see that the symlink has changed.

@bmispelon bmispelon marked this pull request as ready for review April 18, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants