Re: Admin area hyperlinks to sub categories
Hi Sandro, Thanks for the link. It looks like you had provided the link to show additional options in the action drop down on the list page. This is not what am exactly looking for. I guess my question was not clear. I will try to explain it in much better way: 1) I have 2 models called Categories and Books. The book have a foreign key to Categories model, which means more than one book can be marked under a category. 2) The user is presented with a Category link on the admin dashboard 3) When the user clicks on to it he is taken to a page where all the Categories will be listed 4) The categories listed will be an hyperlinks 5) When the user clicks on to any one of the category then he is redirected to another listing page where all books under that category will be displayed. So if the cartegory is fiction then all the books which are assigned under fiction will be displayed. So how can i link a category to book listing page. I know that there is a filter method that i can use in books listing page but i want to implement above said approach. How can it be done? I hope i have made myself clear. Thanks and Regards, Swaroop Shankar V On Wed, Apr 11, 2012 at 7:39 PM, Sandro Dutra wrote: > more: > https://docs.djangoproject.com/en/1.4/ref/contrib/admin/actions/ > > > 2012/4/11 Sandro Dutra > >> # File: admin.py >> from django.contrib import admin >> from distribute.models import Categories >> (...) >> class CategoriesAdmin(admin.ModelAdmin): >> list_display = ['category'] >> (...) >> (...) >> admin.site.register(Categories, CategoriesAdmin) >> (...) >> >> >> 2012/4/11 Swaroop Shankar V >> >>> Hi, >>> Could anyone provide me a solution please? Thanks >>> >>> Regards, >>> Swaroop Shankar V >>> >>> >>> >>> >>> On Mon, Apr 9, 2012 at 2:53 PM, Swaroop Shankar V >>> wrote: >>> Hi all, I have 2 models one is Category and another one is Book. Books will be assigned to a category. So on the admin area i want to display a link on the dashboard which will take the user to a page where all the categories will be listed. On clicking on to any of the category user should be taken to a page where the books assigned under that category is displayed. How can i accomplish the same. Thanks and Regards, Swaroop Shankar V >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To post to this group, send email to django-users@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Admin area hyperlinks to sub categories
more: https://docs.djangoproject.com/en/1.4/ref/contrib/admin/actions/ 2012/4/11 Sandro Dutra > # File: admin.py > from django.contrib import admin > from distribute.models import Categories > (...) > class CategoriesAdmin(admin.ModelAdmin): > list_display = ['category'] > (...) > (...) > admin.site.register(Categories, CategoriesAdmin) > (...) > > > 2012/4/11 Swaroop Shankar V > >> Hi, >> Could anyone provide me a solution please? Thanks >> >> Regards, >> Swaroop Shankar V >> >> >> >> >> On Mon, Apr 9, 2012 at 2:53 PM, Swaroop Shankar V wrote: >> >>> Hi all, >>> I have 2 models one is Category and another one is Book. Books will >>> be assigned to a category. So on the admin area i want to display a link on >>> the dashboard which will take the user to a page where all the categories >>> will be listed. On clicking on to any of the category user should be taken >>> to a page where the books assigned under that category is displayed. How >>> can i accomplish the same. >>> >>> Thanks and Regards, >>> >>> Swaroop Shankar V >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-users@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Admin area hyperlinks to sub categories
# File: admin.py from django.contrib import admin from distribute.models import Categories (...) class CategoriesAdmin(admin.ModelAdmin): list_display = ['category'] (...) (...) admin.site.register(Categories, CategoriesAdmin) (...) 2012/4/11 Swaroop Shankar V > Hi, > Could anyone provide me a solution please? Thanks > > Regards, > Swaroop Shankar V > > > > > On Mon, Apr 9, 2012 at 2:53 PM, Swaroop Shankar V wrote: > >> Hi all, >> I have 2 models one is Category and another one is Book. Books will >> be assigned to a category. So on the admin area i want to display a link on >> the dashboard which will take the user to a page where all the categories >> will be listed. On clicking on to any of the category user should be taken >> to a page where the books assigned under that category is displayed. How >> can i accomplish the same. >> >> Thanks and Regards, >> >> Swaroop Shankar V >> >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Admin area hyperlinks to sub categories
Hi, Could anyone provide me a solution please? Thanks Regards, Swaroop Shankar V On Mon, Apr 9, 2012 at 2:53 PM, Swaroop Shankar V wrote: > Hi all, > I have 2 models one is Category and another one is Book. Books will > be assigned to a category. So on the admin area i want to display a link on > the dashboard which will take the user to a page where all the categories > will be listed. On clicking on to any of the category user should be taken > to a page where the books assigned under that category is displayed. How > can i accomplish the same. > > Thanks and Regards, > > Swaroop Shankar V > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Admin area hyperlinks to sub categories
Hi all, I have 2 models one is Category and another one is Book. Books will be assigned to a category. So on the admin area i want to display a link on the dashboard which will take the user to a page where all the categories will be listed. On clicking on to any of the category user should be taken to a page where the books assigned under that category is displayed. How can i accomplish the same. Thanks and Regards, Swaroop Shankar V -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.