Book Image

Django 1.0 Template Development

Book Image

Django 1.0 Template Development

Overview of this book

Table of Contents (17 chapters)
Django 1.0 Template Development
Credits
About the Author
About the Reviewers
Preface
Index

Comparing views and generic views


Now that we've seen both views and the generic views, you may be wondering why you would choose to use one over the other. The answer is usually found in the complexity of what you are trying to accomplish.

Don't let the simplicity of generic views fool you; entire sites have been written with only generic views. They can be much more complex than our simple examples were in this chapter, taking many additional arguments for specific functionality.

Try to use generic views when you can, and fall back to regular views when the complexity exceeds what you feel comfortable trying to do in a generic view. You may discover that what you want to do can be accomplished in a generic view, but that it's much simpler to do the same with a regular view.