App design with Django and a reporting app -
i have 4 applicatiosn in 1 django site:
- people app
- car app
- holiday app
- report app
i want produce reports/charts app 1,2,3 question this...
1) stick having report views in each app /people/report, car/report
or
2) should put in report app report/car, report/people etc.
the problem option 2 have lot of model importing, meaning never independent.
in case see 3 options:
has advantage it's easier change behaviour specific chart. i'm guessing people might have different types of chart cars.
could made independent using generic foreign keys (or that).
create separate report app automatically scans other apps
charts.py
app (or similar) djangomodels.py
. way can keep specific chart configuration in app contains it's model.the generic report app contain base class extend , override specific apps.
my vote go option 3 since offers best both worlds. although might bit more complicated started, increases reusability.
Comments
Post a Comment