0
我想用在我的模型領域之一FilerImageField
並希望用戶管理區以外的編輯,但是當我嘗試加載它,小部件無法正常工作而在瀏覽器控制檯,我得到和產生的JavaScript錯誤:Django的文件管理器FilerImageField如何使用小部件外管理
Uncaught TypeError: Cannot read property 'jQuery' of undefined
在這裏:
<script type="text/javascript" id="id_featured_image_javascript">
django.jQuery(document).ready(function(){
var plus = django.jQuery('#add_id_featured_image');
if (plus.length){
plus.remove();
}
// Delete this javascript once loaded to avoid the "add new" link duplicates it
django.jQuery('#id_featured_image_javascript').remove();
});
</script>
在我的模型的字段定義是這樣的:
article_image = FilerImageField(db_column="ARTICLE_IMAGE",
verbose_name=_('Article Image'),
related_name='IPP_ARTICLE_IMAGE')
領域似乎是這樣的:
你有任何想法,爲什麼我不能使用這個字段插件的管理之外?我需要爲此設置一些配置嗎?
謝謝:)
您好帕特里夏,我已經回答了GitHub的車票。 – Paulo
@Paulo你能發佈一個鏈接嗎? – tated
其實我跟蹤下來 - 爲那些按照順序,簡單的答案是,它不支持作爲額外的管理員上傳控件:https://github.com/divio/django-filer/issues/894 – tated