Questions tagged [inlines]

55 questions
0
votes
1 answer

django : boolean field mutually exclusive between child rows

First time post here :) I'm learning python and the django framework through a simple photo album app. I'm working through the admin site only for now, and django is v.2.1. There's a photo-album table and an images table. A photo album can have many…
Joe
  • 1
  • 2
0
votes
0 answers

Not working with django-nested-admin

When I try add new inline in django-nested-admin, counter js not working.
0
votes
2 answers

how to filter in django admin inlines

class StudentsTeacher(admin.TabularInline): form = StudentsTeacher model = StudentsTeacher class Teacher_Admin(admin.ModelAdmin): inlines = (StudentsTeacher,) I want add a queryset in StudentsTeacher select with a filter, but it…
shi weifei
  • 1
  • 1
  • 1
0
votes
1 answer

Multiple image upload in Django admin for a gallery

I have spent a lot of time trying different ways to upload multiple images in Django admin but I have failed miserably. I have tried django-multiupload-admin which I didn't manage to make it work and inlines is not what I am looking for. I just want…
IoanCosmin
  • 25
  • 11
0
votes
2 answers

Change TextBlock.Inlines from Backgroundworker

Is there any way to change the inlines from a BackgroundWorker? I tried the following: private void test() { var rows = GetDataGridRows(dgVarConfig); foreach (DataGridRow r in rows) { TextBlock tb =…
Tommehh
  • 872
  • 1
  • 17
  • 44
0
votes
2 answers

Display different fields inside a class inheriting StackedInline in Django admin

I need help with the following problem: Using the Django admin, I would like to hide some fields in inline depending on whether the object exists. Example equivalent to admin.ModelAdmin: class ClassAdmin(admin.ModelAdmin): ... def…
gustavo.sdo
  • 323
  • 1
  • 2
  • 13
0
votes
1 answer

Python/Django avoid save an inline

I have inlines with a boolean parameter: first. How can I edit the save method, to save only those inlines with first = False?
0
votes
1 answer

When I delete the model, How can I delete the inlines data and the uploaded file

models.py class Issue(models.Model): issueId = models.AutoField(primary_key=True) title = models.CharField(max_length = 20) year = models.IntegerField() issueDate = models.DateField() class…
0
votes
1 answer

UserProfile StackedInLine/TabularInLine redesigned

I recently extended with UserProfile so my admin.py looks like this: from django.contrib import admin from django.contrib.auth.models import User from models import UserProfile from django.contrib.auth.admin import…
dza
  • 1,478
  • 2
  • 13
  • 24
-2
votes
0 answers

How to inline-flex text in last element, but wrap only overflowing text, not whole element

I'm trying to configure a table row to wrap owerflowing text and see next: enter image description here My first cell html code is next:
1 2 3
4