Thank you all.My problem is solved.
On Sunday, July 30, 2023 at 11:34:43 AM UTC+6 Prashanth Patelc wrote:
> Use default django user model
>
> from django.contrib.auth.models import User
> # Create your models here.
> class Registration (models.Model):
> author = models.ForeignKey(User, on_de
I want it to look like normal model.Admin. I want add, edit and delete to
work normally. Tabularinline gets very confusing when you enter 100 pieces
of data.
I want it to work like below
[image: Ekran görüntüsü 2023-07-29 214733.png]
30 Temmuz 2023 Pazar tarihinde saat 18:51:42 UTC+2 itibarıyla
If I understand you wish to have a readonly table view which switches
inline to a 'normal' edit view.
I wonder if you could set - has_change_permission back to True in some way?
Could be handy. If you figure it out post here.
On Sunday, 30 July 2023 at 17:33:55 UTC+1 Tolga ÇAĞLAYAN wrote:
> Yes
Yes, it looks like this table. But how do I make an insertion, deletion,
edit here in the normal way. When I press the Add button, I want the page
to open to add data here. Thanks for your answer
30 Temmuz 2023 Pazar tarihinde saat 18:15:17 UTC+2 itibarıyla Parthian
şunları yazdı:
> Try this
Try this
class YourModelInline(admin.TabularInline):
model = YourModel
fields = ('fields', )
extra = 0 # looks neater without extras.
show_change_link = True # puts an icon on the left of each row to edit
the row.
def has_change_permission(self, request, obj=None):
ret
5 matches
Mail list logo