can i use the listview which the django-admin used im my tempate

19 views
Skip to first unread message

刘夏

unread,
Mar 5, 2017, 4:59:29 AM3/5/17
to django...@googlegroups.com
can i use the listview which the django-admin used im my tempate?



发自我的小米手机

Andréas Kühne

unread,
Mar 5, 2017, 9:03:48 AM3/5/17
to django...@googlegroups.com
Hi,

I don't really understand what you mean, but there is a ListView in the generic views package. To use that all you really need to do is to tell the listview class what model you are using. For example:

class UserList(ListView):
    model = User


Regards,

Andréas

2017-03-05 9:46 GMT+01:00 刘夏 <liuxia1...@qq.com>:
can i use the listview which the django-admin used im my tempate?



发自我的小米手机

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1r8nrgiuljvspqcct5jrkv0g.1488703561559%40email.android.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages