Welcome to the Treehouse Community
Looking to learn something new?
Juan PerezCourses Plus Student 8,944 Points
Starting a Finance app in Django.
I want to start a financial app in django and I would like to ask for some recommendations from the more experience djangonauttes in here.
- How can I start this?
- Would it be better if I do the math using the templates or on external python files?
- Is there anything I should look at before tackling this project?
Can I assume that by financial you mean financial instruments as opposed to some sort of personal finance app?
My experience with both Django and finance is still limited but I have already begun doing something similar on a personal website. What exactly are you trying to achieve? Right now the most functional aspect of my site offers a trade journal to track returns of user entered trades. I do the math for that in my model which is relatively simple.
Doing math in the template seems less efficient since you may end up doing lots of calculations that only need to be done once and then stored in the database.
I want to incorporate more advanced plotting and analysis of financial data in the future but I still need to research the licensing implications of making public facing info from minutely data I've paid for.
I think it depends how expansive each of those categories will be and how much info needs to flow between them. While you certainly can import models between classes, if two apps end of sharing lots of the same info and often need to pass things between them, it might make more sense to just keep them in a single app.
But if each app is distinct they should definitely be kept separate. I think this mostly just depends on your personal preference in terms of organization. Do what seems to make the most intuitive sense to you so every time you revisit the codebase you know what's going on.