Re: What is Model Manager?
Thanks for the clarification On Wednesday, 17 April 2013 20:24:57 UTC-4, Lachlan Musicman wrote: > > On 18 April 2013 10:10, chawrote: > > Hello how are you > > Great, thanks for asking! > > > I want to explain to me what is **"Model Managers"** in django ??? and > What > > are the useful ? > > They are a different way of collecting querysets of objects. Have you > read the documentation to this end? > > https://docs.djangoproject.com/en/1.5/topics/db/managers/ > https://docs.djangoproject.com/en/dev/topics/db/managers/ > > > For instance, on my last project I had "students, subjects, courses, > grades" > > I wanted to be able to call some aspects of those quickly without > writing out the whole filter every time. So I created some filters > like these: > > Male students in Accounting under 25 years as > Student.men_account_25.all() > Male students in Accounting over 25 years as > Student.men_account_26.all() > Female students in Accounting under 25 years as > Student.women_account_25.all() > Female students in Accounting over 25 years as > Student.women_account_25.all() > > I could have gone very deep: > > Male students in Accounting over 25 years that passed last semester > and are from province X. > > I then added a .count() to the end of the call, and I had instant > enrollment statistics that were always up-to-date. > > Does that clear it up for you? > > cheers > L. > > > > -- > The new creativity is pointing, not making. Likewise, in the future, > the best writers will be the best information managers. > > > http://www.theawl.com/2013/02/an-interview-with-avant-garde-poet-kenneth-goldsmith > > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: What is Model Manager?
Thank you On Wednesday, 17 April 2013 20:26:31 UTC-4, Shawn Milochik wrote: > > https://docs.djangoproject.com/en/1.5/topics/db/managers/ > > This should explain everything. > > > On Wed, Apr 17, 2013 at 8:10 PM, chawrote: > >> Hello how are you >> I want to explain to me what is **"*Model Managers*"** in django ??? >> and What are the useful ? >> >> -- >> 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...@googlegroups.com . >> To post to this group, send email to django...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/django-users?hl=en. >> 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 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: What is Model Manager?
https://docs.djangoproject.com/en/1.5/topics/db/managers/ This should explain everything. On Wed, Apr 17, 2013 at 8:10 PM, chawrote: > Hello how are you > I want to explain to me what is **"*Model Managers*"** in django ??? and > What are the useful ? > > -- > 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?hl=en. > 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 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: What is Model Manager?
On 18 April 2013 10:10, chawrote: > Hello how are you Great, thanks for asking! > I want to explain to me what is **"Model Managers"** in django ??? and What > are the useful ? They are a different way of collecting querysets of objects. Have you read the documentation to this end? https://docs.djangoproject.com/en/1.5/topics/db/managers/ https://docs.djangoproject.com/en/dev/topics/db/managers/ For instance, on my last project I had "students, subjects, courses, grades" I wanted to be able to call some aspects of those quickly without writing out the whole filter every time. So I created some filters like these: Male students in Accounting under 25 years as Student.men_account_25.all() Male students in Accounting over 25 years as Student.men_account_26.all() Female students in Accounting under 25 years as Student.women_account_25.all() Female students in Accounting over 25 years as Student.women_account_25.all() I could have gone very deep: Male students in Accounting over 25 years that passed last semester and are from province X. I then added a .count() to the end of the call, and I had instant enrollment statistics that were always up-to-date. Does that clear it up for you? cheers L. -- The new creativity is pointing, not making. Likewise, in the future, the best writers will be the best information managers. http://www.theawl.com/2013/02/an-interview-with-avant-garde-poet-kenneth-goldsmith -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
What is Model Manager?
Hello how are you I want to explain to me what is **"*Model Managers*"** in django ??? and What are the useful ? -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.