#30816 closed Cleanup/optimization (fixed)
Clarify how to test changes with an existing Django project.
Reported by: | Ad Timmering | Owned by: | Ad Timmering |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
(Adding a ticket based on this discussion on django-core-mentorship. The thread went dead and as far as I can tell no ticket was added but it seems like a useful addition to me.)
The current tutorial on "Writing your first patch for Django" walks though the process of cloning the repository, installing in a virtual environment with pip -e
and the test suite.
This sets people up to start a branch to make changes to Django and run the tests, however it is not clear on how to make a test Django project that runs with the modified Django version.
Suggested updates to documentation
- Slightly reword the section explaining to
pip -e
to explain how this sets up a virtual environment within the directory where you cloned Django - and that this becomes the environment you can start making changes and run the Django testsuite, as explain further on in the tutorial.
- Add an "admonition" box, or point to a section later in the document, to explain: "Do you want to start a test Django project that reflects the changed you have made?" explaining that you should make a different directory with a different virtual env, then pip -e /path/to/your/local/clone/django/ again, and from there go as usual with django-admin.
Change History (7)
comment:1 by , 5 years ago
Component: | Uncategorized → Documentation |
---|---|
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 5 years ago
Summary: | Add or clarify documentation for contributing to Django (running Django tests vs testing a Django project) → Clarify how to test changes with an existing Django project. |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Great, I'll draft something in next 1-2 weeks.
comment:4 by , 5 years ago
Has patch: | set |
---|
Added a PR for suggested edit. Comments/views appreciated!
I agree that we can evaluate a patch in this area.