django-nested-inline
django-nested-inline copied to clipboard
Uncaught TypeError: Cannot read property 'fn' of undefined
adding another line doesn't work autocomplete_fields. I'm using NestedTabularInline
Can you provide an example that produces this error?
i have the same problem, it seems that jQuery is not loaded in inlines-nested.js
"Add" button not displayed for Unsettled artists
Error from the console:
Uncaught TypeError: $ is undefined
<anonymous> https://.../static/admin/js/inlines-nested.js:24
<anonymous> https://.../static/admin/js/inlines-nested.js:474
This doesn't happen when DEBUG=True
@OskarPersson I can reproduce the error with just the following using django 4.2
and nested_inline 0.4.6
on python 3.11
:
# models.py
from django.db import models
class Fish(models.Model):
title = models.CharField(max_length=255)
# admin.py
from django.contrib import admin
from nested_inline.admin import NestedModelAdmin
from django.db import models
from .models import Fish
@admin.register(Fish)
class FishAdmin(NestedModelAdmin):
model = Fish
set everything up then visit http://localhost:8000/admin/sample/fish/ (not even the create page) and see the browser's console (tested in firefox and chrome).
the proposed fix in #127 does fix it for me.