reusable-code

How to create a reusable toggle button in AS3?

I'm trying to make the code below reusable. I need multiple toggle buttons in my flash project. Right now the code below works on one button. If I continue and create more buttons, and follow the format below, I would need to create separate functions for each button. I would like to put the reusable code in a separate ActionScript file...

What am I doing wrong with reusable Django apps?

Almost always when I try to use a re-usable django app, I end up doing a lot of integration work and/or the end result is really messy. A common, simpler case is sending confirmation messages (with link text framework) to the user, for events that take place in the re-usable app. Take for example django-profiles - in order to show a "pr...

How to avoid duplicate models in django project ?

Hi, i'm learning django so i've many questions, and one is how i can reuse a model? i mean the models live in the application folder, but some models are exactly the same between two differents applications. So should i rewrite the model every time that i write a new app? ...