You're welcome. Enjoy the book!
On Sun, May 12, 2013 at 9:54 PM, Philippe Schraepen < [email protected]> wrote: > Thanks for the clarification! > I'll definitely read the book! > > On Saturday, May 11, 2013 12:28:50 AM UTC, Lloyd Dube 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 django-users...@**googlegroups.com. >>> To post to this group, send email to [email protected]. >>> >>> Visit this group at >>> http://groups.google.com/**group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en> >>> . >>> For more options, visit >>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>> . >>> >>> >>> >> >> >> >> -- >> 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. > > > -- 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.

