hcliff
hcliff

Reputation: 443

Django installed apps location for classes on system path

I'm using the Django Registration class, it's great, but the last version shipped with an issue and it's no longer updated

I've installed it on my path (downloaded it then python setup.py install) then added it to my projects installed apps

I'm on debian, and It's copied itself to /usr/lib/python2.5/site-packages/registration

So far so great, but editing (hell, even deleting) has NO effect on my project

I'm guessing when you include a class in the django installed apps it's copied somewhere, but where?

As always, thanks for your time!

Upvotes: 0

Views: 717

Answers (3)

Matthew Schinckel
Matthew Schinckel

Reputation: 35599

I would suggest that you try the following workflow:

  • Create a new virtualenv for every project you start (use --no-site-packages)
  • Install all your dependencies (including django) in the project's virtualenv
  • Use pip install -e to install things you need to have an editable version of.
  • Alternatively, fork the project, and install using pip install -e hg+http://...

Upvotes: 1

TryPyPy
TryPyPy

Reputation: 6424

You could try the oldest trick ever to figure out where it's coming from:

import registration
print registration.__file__

Upvotes: 3

S.Lott
S.Lott

Reputation: 391820

I'm guessing when you include a class in the django installed apps it's copied somewhere, but where?

That's completely a wrong guess.

A better guess is that your download directory is on your Python path.

Somehow you had two copies (or more) of the module.

You've deleted some, but not all of the copies.

Keep searching on your PYTHONPATH for all the others. Search every directory in sys.path.

Note that .pth files in your site-packages directory are also part of your PATH.

Upvotes: 1

Related Questions