Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#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

  1. 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.
  1. 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 Ad Timmering, 5 years ago

Component: UncategorizedDocumentation
Type: UncategorizedCleanup/optimization

comment:2 by Mariusz Felisiak, 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: UnreviewedAccepted

I agree that we can evaluate a patch in this area.

comment:3 by Ad Timmering, 5 years ago

Owner: changed from nobody to Ad Timmering
Status: newassigned

Great, I'll draft something in next 1-2 weeks.

comment:4 by Ad Timmering, 5 years ago

Has patch: set

Added a PR for suggested edit. Comments/views appreciated!

PR

Last edited 5 years ago by Mariusz Felisiak (previous) (diff)

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 1863122:

[3.0.x] Fixed #30816 -- Doc'd how to create projects with a local copy of Django.

Backport of dee687e93a2d45e9fac404be2098cc4707d31c1f from master

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 57335047:

[2.2.x] Fixed #30816 -- Doc'd how to create projects with a local copy of Django.

Backport of dee687e93a2d45e9fac404be2098cc4707d31c1f from master

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In dee687e:

Fixed #30816 -- Doc'd how to create projects with a local copy of Django.

Note: See TracTickets for help on using tickets.
Back to Top