Django shows list of model items in admin panel, but don't want to show the list but I directly want to show the detail view . How can i do this ?
Related
i am looking for to make a page or view of Model.Admin page inside my website, so users with right permission can access my custom model.admin page with all of its functions/actions.
im talking about this page:
this
I would like to have a dropdown list in the login field of authenti(fi)cation panel in Django : for admin and for a worker. Do you have any idea how to implement it?
I am trying to show the shopping Cart for only a specific user in the Django Admin template . I managed to do it in a normal views like this :
order = Order.objects.get(user=self.request.user, ordered=False)
but when trying to do the same inside the model
items = models.ManyToManyField(OrderItem.objects.get(user=settings.AUTH_USER_MODEL))
I get this error
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
What I'm trying to achieve is to only show the items that the user entered to his shopping cart instead of all the order items in the system so is there a way to filter what is shown in the admin panel based on the user
I am trying to change what is displayed when I click on a model in the django admin. For example if I have the model Book and then I go into the admin panel and click book, it will give me all the fields that I created the model with.
But I want to edit that page that shows all that data. For example, if I click on the "Book" model in the admin panel and see my fields to edit, I want to put another bit of fields on the bottom from another model. Or maybe I want to put like a "Similar Books" list. Is it possible to edit this page?
Admin customization information is here. You can do stuff like list_display or fieldsets etc.
Is it possible with django to add a custom html select to an admin page in order to modify the queryset of a specific model?
For example, I have a "Product" model and inside the Products admin page I get all the product.
I would like to have an html select in that page so that the admin can change the queryset not to show ALL the products but just part of it
Thanks