Forums

Adding smart selects?

What are the odds of adding smart selects (https://github.com/digi604/django-smart-selects) to the Batteries Included list? Would make life a lot easier.

You should be able to build a virtualenv and install it yourself. See this tutorial for an overview of the process, although bear in mind that one is targetted specifically at running Django 1.4 on PA (where the system version is 1.3). What you'll need to do is quite similar, although you'll want to install your package instead:

pip install django-smart-selects

Note: if you follow the tutorial as written, you'll get a virtualenv which is isolated from the system - i.e. you won't have access to any of the system packages. You can reinstall them into your own virtualenv (which also has the advantage that you can pick specific versions of them), but on PA this currently will only work for modules which don't require any C/C++ code to be compiled.

You can give yourself access to the system packages as well by passing the --system-site-packages option to mkvirtualenv when you create your environment. This will have the effect that code running inside the virtualenv will first look for libraries in your virtualenv but, if they're not found there, will also then look in the standard system locations.

Also we can have a look at installing smart selects.