Hey Sivaram, Here fav_color is just a a variable and you are putting the value of what is in request.session['fav_color'] into it
and request.session['fav_color'] is getting the key/value so think of it this way request { 'session' : { 'fav_color' : 'GREEN' } } you are putting GREEN in fav_color does that make sense? On Tuesday, July 9, 2013 1:41:29 AM UTC-5, Sivaram R wrote: > > I am learning django. > > I came accross the django doc about session. > > My question is for example if i am having the below models.py > > class Report(models.Model): > user = models.ForeignKey(User, null=False) > report_number = models.CharField('Incident Number', max_length=100) > device_id = models.CharField('Device Id', max_length=100) > > In doc,it is given that fav_color = request.session['fav_color'], > > Here fav_color refers to what and ['fav_color'] refers to what. > > Need clarification > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.