JonathanHayward JonathanHayward - 1 year ago 59
Python Question

What is the correct way to customize standard features in Pinax?

I want to make a somewhat cross-cutting change to Pinax social's behavior that at least touches representation of the user and access to forums, groups, and possibly other features.

AFAICT most of the things I would like to now change are not stored in my project; they're things pip pulled into the virtualenv based on ?requirements.txt?.

I'll happily tamper with my virtualenv if that's the best way to pursue my goals, but my suspicion is that that shouldn't be a first choice method. But I am asking this question because I don't know what the first choice method is. (Question: is it possible to override just the files I want to change, from the project rather than the virtualenv?)

From a software engineering perspective, what is the correct way to modify behavior that is governed by the contents of your project's virtualenv rather than the project directory heirarchy?


Answer Source

Short answer: The best option is a good software engineer's last choice: directly customize the code. The functionality needs to run through the middle of certain apps; I'm not quite saying that there is no way to build the kind of site I had in mind just by stacking Lego-like apps on top of each other, but I am saying there have been multiple points where a "clean" solution was not in sight, and a "dirty" solution, like a custom User, has worked well.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download