Задать вопрос

Тел: +7 965 3737 888

462

Просмотров

1

Ответов

Passing values to a method from a template

<p>A simple trick to let a function be called with exactly ONE argument from a Django template, by passing it via an attribute. Example:</p>
class SearchResult(object):
    @template_callable
    def highlighted(self, field):
        return self._xappy_result.highlight(field)

result = SearchResult()
result.highlighted.title

{{ result.highlighted.title }}

Вопрос полезен? Да0/Нет0
file_2320.py(579.0б)
None

Ответы (1):

Ответgvkreddyvamsi:18.04.2008
Ответ полезен? Да0/Нет0

HI,

Iam new to python and django.

Here i need to enable radio buttons on home screen depending on data stored in model database. How we can do this to get data in database and enabling radio buttons on same screen?

For example i have to choose role which is not filled already.

Plz help me.

my mail gvkreddy.reddy@gmail.com

Thanks in advance by vamsi