django-nested-inline icon indicating copy to clipboard operation
django-nested-inline copied to clipboard

Uncaught TypeError: Cannot read property 'fn' of undefined

Open suzanneloures opened this issue 5 years ago • 4 comments

adding another line doesn't work autocomplete_fields. I'm using NestedTabularInline

suzanneloures avatar Jan 12 '20 23:01 suzanneloures

Can you provide an example that produces this error?

OskarPersson avatar Jan 15 '20 10:01 OskarPersson

i have the same problem, it seems that jQuery is not loaded in inlines-nested.js Screenshot 2021-05-07 at 22 45 27

"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

jevhen-ponomarenko avatar May 07 '21 20:05 jevhen-ponomarenko

@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).

categulario avatar Jul 21 '23 14:07 categulario

the proposed fix in #127 does fix it for me.

categulario avatar Jul 21 '23 14:07 categulario