If the page is cacheable then, in the wild, all bets are off.
On Thu, Dec 19, 2013 at 4:14 PM, Jonathan Baker < [email protected]> wrote: > I agree with Avraham, and you can easily accomplish this by using > .order_by("?") when using the Django ORM (@see > https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.order_by > ) > > > On Thu, Dec 19, 2013 at 2:08 PM, Avraham Serour <[email protected]> wrote: > >> yes, django has session management, but why would you need to do that >> based on session? >> I mean, you could just get a different content every time you render the >> page, of course showing something in random have a chance of repeating the >> same, if you have no control on what was already shown to the current person >> if you want to be 100% that you won't show the same food for the same >> person when he reloads the page you would need to store the history and tie >> that to the user or session. >> >> but in my opinion is not worth the overhead, it is not so bad to have a >> small % of repeats >> >> >> On Thu, Dec 19, 2013 at 11:00 PM, Chen Xu <[email protected]> wrote: >> >>> I am currently working on a web page using Django to recommend people >>> food, basically when people refresh the page, it shows a different food >>> which is from the database. I am wondering if there is a way to show >>> different food every time when people refresh (people dont need to login), >>> does Django provide some sort of session? >>> >>> >>> Thanks in advance >>> >>> -- >>> ⚡ Chen Xu ⚡ >>> >>> -- >>> 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 [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/django-users. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CACac-qaKYJfARKv08Y9QUUYW27hLr6a9__K%2BY4EMi-%3D8d-z6Cg%40mail.gmail.com >>> . >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- >> 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 [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAFWa6t%2BmRgbEih9cge-ETTfX_RaSKkh8H1_ufTPR2kRXbYGMrQ%40mail.gmail.com >> . >> >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Jonathan D. Baker > Developer > http://jonathandbaker.com > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAPMFOb5j6KCTo8fcHhT6HQ11L1eXT1Z7btXsqi_W7mG65U1Xng%40mail.gmail.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAB%2BAj0uD9KCTxPrRX4JdW8d-JiX5CeE2f%3DtKe_O3XB4vx12EqA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.

