Issue
folks.
I have a simple Django project. There's an app that receives data, processes it, and stores it in a DB. Of course, I'd like to show this data. To me, it looks more like a separate Django app. But then comes the question: What should I do with models? It looks really stupid to copy it but at the same time, it's kinda wrong to use models from one app in another.
Solution
I would not separate the display of one app's models into another app; keep it in the same app. Use views and templates in the same Django app to display the data.
If you need to display it in a really special way (intense graphing, etc) then find a display app and reference the display app in your current app.
Answered By - spencer.pinegar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.