On Dec 3, 12:02 pm, Wayne Koorts <wkoo...@gmail.com> wrote: > >> > remember that an app can do a lot more than provide views. > > >> Explain this one to me. AFAICS, its just http request/response all the > >> way down and this is basically done by getting a > > > An app can expose views, indeed. It can also expose models - one of > > the most important parts of an application -, templatetags, filters, > > forms, fields, widgets etc. FWIW, the views are perhaps one of the > > less important thing an app has to offer - and obviously the most easy > > to factor out, cf genericviews. Models, OTHO, are really the core. If > > you end up writing most of your code in views, then you more than > > probably failed to identify what belongs to the model and what belongs > > to the views. The fact that "views" are a mandatory part of the > > request-response cycle doesn't mean they are the most important part > > of the app. > > Can anyone point out a section in the docs (or anywhere else actually) > the Django "app" concept? I've had a look through the docs but > haven't been able to find anything specifically about that.
This is not very well documented in official docs, and is really a bit amorphous. I like to think of an app is to Django as a Class is to Python. That it is an encapsulation of code including attributes (models) and methods (views) that provide some sort of defined value when combined with other Classes (apps) to make a project. -Preston > > Regards, > Wayne -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.