Django-Template : Get Variables in a Tag block !

前端 未结 4 587
有刺的猬
有刺的猬 2021-02-04 14:37

I need to retrieve an optional number saved in DB , to a custom template tag i made . which to retrieve , a variable ( a photo ID ) included in this Gallery . within the gallery

4条回答
  •  暖寄归人
    2021-02-04 15:01

    Are you sure your template tag is written properly? For example, you need to use Variable.resolve to properly get the values of variables: Passing Template Variables to the Tag

提交回复
热议问题