ModelSelect2 field doesn't appear

2020-07-17 Thread Nathan Duy Le
Hi all! I've been losing hair trying to figure out why a ModelSelect2 field works on one ModelForm but not the other almost identical one. Please save me from going mad! In the browser's console, I'm getting the error message: jQuery.Deferred exception: $(...).select2 is not a function TypeErro

Django: How to get field value dynamically using custom template tags?

2010-11-02 Thread Duy
I recently got a problem where I need to get field's value automatically using templatetags.The idea follows which mentioned in the book "Practical Django Project 2nd Edition", but the book version is getting a list of objects where I want to get only a object's value. I want to get the site settin