Book Image

Learning Website Development with Django

Book Image

Learning Website Development with Django

Overview of this book

Table of Contents (18 chapters)
Learning Website Development with Django
Credits
About the Author
About the Reviewers
Preface
Index

Summary


We developed an important set of features for our project in this chapter. Friend networks are very important in helping users to socialize and share interests together. These features are common in web 2.0 applications, and now you are able to incorporate them into any Django web site.

Here is a quick summary of the Django features covered in this chapter:

  • To manually specify a name for the related attribute in a data model, pass a keyword argument called related_name to the field that creates the relationship between models.

  • You can specify several options for data models by defining a class called Meta inside the data model. Some of the possible attributes in this class are: db_table, ordering, permissions and unique_together.

  • To send an email in Django, use the send_mail function. It's available from the django.core.mail package.

  • The Django session framework provides a convenient way to store and retrieve user data across requests. The request.session object provides a dictionary...