Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19216 closed Cleanup/optimization (fixed)

Use user level installation rather than system level in advanced tutorial

Reported by: ncoghlan Owned by: Tim Graham
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 Tim Graham 12 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Carl Meyer, 12 years ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/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 by Tim Graham, 12 years ago

Owner: changed from nobody to Tim Graham

by Tim Graham, 12 years ago

Attachment: 19216.diff added

comment:3 by Tim Graham, 12 years ago

Has patch: set

comment:4 by Carl Meyer, 12 years ago

Triage Stage: AcceptedReady for checkin

Patch looks good to me.

comment:5 by Tim Graham <timograham@…>, 12 years ago

Resolution: fixed
Status: newclosed

In dd0d2c0be56a28f868d501b06975984c138f4830:

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

Thanks Nick Coghlan for the suggestion.

comment:6 by Tim Graham <timograham@…>, 12 years ago

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