By the way, the book mentioned above - "Two Scoops of Django" - makes very good reading for Django in general.
On Sat, May 11, 2013 at 2:28 AM, Sithembewena Lloyd Dube <[email protected]>wrote: > Hi Phillipe, > > I think that it really depends on how modular you would like your Django > project to be. Do you want the stats generation functionality to be > separately pluggable from the pie-charting functionality? Is your > gather_data app large enough (number of models) to warrant breaking it > down? If so, perhaps you could separate the apps. If not, you might want to > just have one. > > Django apps are really Python packages. Do not worry about how you will > pass data "between" them - if they are enabled in your INSTALLED_APPS > global variable in settings.py, they will be loaded and you can import each > from the other in your views.py file or wherever you need to import them, > then call functions from each as you require and pass the necessary > arguments. > > A good place to look for this sort of advice is Daniel Greenfeld and > Audrey Roy's new book found at https://django.2scoops.org/ (see Chapter > 4: ''Fundamentals of Django App Design") . In it, they say (quote): "In > essence, each app should be tightly focused on its task. If an app can’t be > explained in a single > sentence of moderate length, or you need to say ‘and’ more than once, it > probably means the app is > too big and should be broken up. > " > > > On Sat, May 11, 2013 at 12:45 AM, Philippe Schraepen < > [email protected]> wrote: > >> Hi all, >> >> I'm new to Python and Django so don't be to hard on me please :) >> >> I'm writing a Django project which analyses your music folders, gives >> back statistics about it (like file-extentions, mp3 bitrate, number of >> unique artists,...) and generates pie charts of these stats. >> >> My project currently consists of one 'gather_data' app which gathers the >> necessary stats-data from my music libary. Now I want to create pie charts >> of this data with the help of Mathplotlib. >> >> Now here are my three questions: >> -Should I create a new 'piechart' app to create the pie charts or should >> I just add another function to my first gather_data app? >> -If I should use a different app for this, how can I let Django load the >> first 'gather_data' app, and after this load the 'piechart' app? >> -In case you guys recommend using a second app, should I move the data >> between the two apps with the help of session variables? >> >> Thanks! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/django-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Regards, > Sithu Lloyd Dube > -- Regards, Sithu Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.

