def __str__(self)"""return string representation of the model ""return self text we've created class called topicwhich inherits from model-- parent class included in django that defines the basic functionality of model only two attributes are in the topic classtext and date_added the text attribute is charfield-- piece of data that' made up of charactersor text you use charfield when you want to store small amount of textsuch as namea titleor city when we define charfield attributewe have to tell django how much space it should reserve in the database here we give it max_length of characterswhich should be enough to hold most topic names the date_added attribute is datetimefield-- piece of data that will record date and time we pass the argument auto_add_now=truewhich tells django to automatically set this attribute to the current date and time whenever the user creates new topic note to see the different kinds of fields you can use in modelsee the django model field reference at fieldsyou won' need all the information right nowbut it will be extremely useful when you're developing your own apps we need to tell django which attribute to use by default when it displays information about topic django calls __str__(method to display simple representation of model here we've written __str__(method that returns the string stored in the text attribute note if you're using python you should call the __str__(method __unicode__(instead the body of the method is identical activating models to use our modelswe have to tell django to include our app in the overall project open settings py (in the learning_log/learning_log directory)and you'll see section that tells django which apps are installed in the projectsettings py --snip-installed_apps 'django contrib admin''django contrib auth''django contrib contenttypes''django contrib sessions''django contrib messages''django contrib staticfiles'--snip-