Questions tagged [django-nested-admin]

9 questions
2
votes
1 answer

Django admin inlines: single inline for multiple foreign keys

I have a model that stores Conversations as follows: class Conversation: sender_user = models.ForeignKey("test_app.User", on_delete=models.PROTECT, related_name="conv_starter_user") recipient_user =…
blitz
  • 623
  • 5
  • 18
0
votes
0 answers

Is there a way to paginate Django's admin page that uses the django-nested-admin lib?

I have an admin page using NedstedStackedInLine, and the problem is that in the inside model, i have to many occurrences of the secondary model. Is there a way to paginate the inside models to not cause 502 error when the users tryng to access the…
0
votes
0 answers

django-nested-admin nested model initial values

I've been working with django-nested-admin for editing admin models that have foreign key relationships to other tables. Frankly it's beautiful. I love it. But I have a pair of models here I'm having a bit of trouble with. I have a Chapter,…
Ed Kramer
  • 131
  • 1
  • 12
0
votes
0 answers

Django admin restrict max inline forms by parent field

I have the following two models in Django. Model Contest has questions and Questions is another django model: class Contest(models.Model): min_questions = models.IntegerField() class Question(models.Model): contest =…
0
votes
1 answer

data of foreign keys are not saving in django admin nested inlines

I'm trying to build a list of replicable fields where the order can be interchanged. To do so I've built three different models Multicap Multitext Multimg which are Inlines of the model Multis which is an Inline of the model Delta. I'm using…
0
votes
1 answer

How deep can "django-nested-admin" have nested inlines?

django-nested-admin shows the example code which has 3 levels "TableOfContentsAdmin", "TocSectionInline" and "TocArticleInline" as shown below: # An example admin.py for a Table of Contents app from django.contrib import admin import…
0
votes
1 answer

Can "django-nested-admin" sort the top level items in select-to-change list in addition to inline items?

I could sort inline items with django-nested-admin as shown below: But, I couldn't sort the top level items in select-to-change list as shown below. (In addition, I also couldn't sort it with the combination of django-nested-admin and…
0
votes
0 answers

In django admin database I am not getting expected view

In django admin database I am not getting expected view. I am following the tutorials to make a quiz app in Django. I did exactly as shown in video but still I am not getting same output. I have attached the picture of expected view and picture of…
0
votes
1 answer

Django Nested Admin validation of nested inlines from parent forms

What I'm trying to do is assert the start_date of the child form is after the start_date of the parent form. For example, if I have the following models: class Parent(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4,…