Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#19216 closed Cleanup/optimization (fixed)

Use user level installation rather than system level in advanced tutorial

Reported by: ncoghlan Owned by: timo
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The new advanced tutorial uses system level installation for simplicity in:
https://docs.djangoproject.com/en/dev/intro/reusable-apps/#using-your-own-package

This requires several of the steps to be run with administrator privileges.

It should be possible to avoid this (and make the section even simpler) just by changing the installation command in this section to:

python setup.py install --user

This obviously won't work in versions prior to 2.6, but there's no reason a beginner would be using such an old version (and if they are, lack of per-user package support is going to be the least of their problems)

Note that per-user installations can still affect the behaviour of system tools run as that user, so virtualenv is still the more robust solution. However, per-user installs also have a *lot* recommend them over system level installs (such as being usable on systems where you don't have admin access, not running downloaded code with admin privileges, as well as not affecting the behaviour seen by system services and other users of the machine).

Attachments (1)

19216.diff (3.4 KB) - added by timo 2 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 2 years ago by carljm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Cleanup/optimization

Yes, this is a great idea. Python 2.6 is the minimum supported version for Django 1.5+ anyway, so that's not even an issue. Don't know why I didn't think of this option when reviewing that doc addition (well, actually, I do know why, it's because I don't have a use for --user personally), but it's totally the right thing here.

comment:2 Changed 2 years ago by timo

  • Owner changed from nobody to timo

Changed 2 years ago by timo

comment:3 Changed 2 years ago by timo

  • Has patch set

comment:4 Changed 2 years ago by carljm

  • Triage Stage changed from Accepted to Ready for checkin

Patch looks good to me.

comment:5 Changed 2 years ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In dd0d2c0be56a28f868d501b06975984c138f4830:

Fixed #19216 - Switched to user level installation in apps tutorial.

Thanks Nick Coghlan for the suggestion.

comment:6 Changed 2 years ago by Tim Graham <timograham@…>

In 958c1d12e584dfe493697edf1083f99b1a41d1a9:

[1.5.X] Fixed #19216 - Switched to user level installation in apps tutorial.

Thanks Nick Coghlan for the suggestion.

Backport of dd0d2c0be5 from master

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