0

I was curious how I copy over site-packages stuff like for instance in django-filer I used a pip install for it installed it to:

/usr/local/lib/python2.7/site-packages/filer

Which is fine, but the stuff inside that filer folder (like under /static/filer/css are things I would like to change on a specific to my project basis).

I think I read where Django takes what it finds first, so if I moved the stuff in the above URL (specifically the css) to my local django project it would use this filers css I put there as it would encounter that first compared to what is in site packages, is this anywhere near correct?

Really the whole reason for this is in because in the above plugin, there is a nasty CSS bug I think I can fix myself if I had access to the code and my program knew to used said code I tweak to test and then fully use when available fix and all.

Codejoy
  • 3,722
  • 13
  • 59
  • 99
  • Why not fork the library, fix the bug then make a pull request? Then your project can use the now-improved version on PyPI and *everyone else using it benefits too*. – jonrsharpe Jun 07 '16 at 21:55

1 Answers1

1

You could simply create a virtual environment which is completely isolated: http://docs.python-guide.org/en/latest/dev/virtualenvs/


virtualenv

virtualenv is a tool to create isolated Python environments. virtualenv creates a folder which contains all the necessary executables to use the packages that a Python project would need.

Install virtualenv via pip:

$ pip install virtualenv

Basic Usage

Create a virtual environment for a project:

$ cd my_project_folder
$ virtualenv venv
j4hangir
  • 2,532
  • 1
  • 13
  • 14
  • Oh i see that virtualenv is cool it downloads the stuff right to there for just that environment. Slick. I will use that, fix the bug then do as jonrhsarpe suggests once I have a fix. Thanks guys! – Codejoy Jun 07 '16 at 22:04