2016-09-19 25 views
0

我正在使用python 2.7 & django 1.10。django-parsley:uncaught error

我也使用django-parsley進行客戶端驗證。

在每一頁我在parsley.min.js文件以下錯誤:

Uncaught Error: it is not available in the catalog 

錯誤是指下面的代碼段在parsley.min.js文件:

setLocale: function(a) { 
     if ("undefined" == typeof this.catalog[a]) 
      throw new Error(a + " is not available in the catalog"); 
     return this.locale = a, 
     this 
    }, 

這是問題的一個屏幕截圖:

enter image description here

有沒有人有任何建議,爲什麼我有這個錯誤?

我已經搜索過SO &谷歌,但沒有真正的見解。

+1

您的瀏覽器不報告語言和文化http://mybrowserinfo.com/detail.asp?bhcp=1或者它沒有設置服務器端。 https://docs.djangoproject.com/en/1.10/topics/i18n/ – MatthewMartin

回答

1

檢查你的堆棧跟蹤。不知何故,setLocale被調用未定義或空字符串作爲參數,而不是'en'或類似的。