There is not really enough information about your use case (which is maybe why people seem to be misunderstanding your question).
Its not really clear to me what you mean by "pass a parameter", as you have not given any indication where or how this parameter needs to be set. One way I have used to "subset" model lists in the admin is to use proxy models with model managers. You could define a filter in a new model manager that automatically filters transactions, for example, from the last 7 days. The proxy model (for example, LastWeekTransaction) can use this model manager to always show a list of the most recent Transactions. If you actually want to run interactive queries, with users entering in their own date ranges, then you'll need to move beyond the admin app (e.g. by creating a new custome 'query' app), as its purpose is essentially for CRUD, and not for reporting. On Monday, 7 July 2014 15:10:04 UTC+2, 9dev...@gmail.com wrote: > > No, it does not. I cannot pass any parameters to this function, because it > is being invoked automatically by the admin. > > class MyAdmin(admin.ModelAdmin): > list_display = ['num_of_trans'] > > How can I pass any arguments to it? > > Please, read my question carefully. > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5860bc89-01f1-40e2-ac20-4c74d5f83be1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.