I got **django template** with **knockout.js** bindings, with list which is should be filled as one press button:

```
<ul data-bind="foreach: items">
   <li data-bind="text: title"><li>
</ul>
<button data-bind="click: fillList">Show</button>

```

and some knockout model:

```
function ItemsModel() {
    var self = this;
    self.items = ko.observableArray();

    self.fillList = function() {
        // some download data logic
        ...
    }
}

```

Functon **fillList** gets data from server. It should send request to url. I use reversed url:

```
{% url "app.views.get_items" %}

```

What is the best way to pass that **template-generated url** to **ItemsModel**, so it knows where it should get the data?

Pass it as parameter to model?

```
function ItemsModel(url_get_items) {
     ...
}

```

Maybe pass it as parameter with click event?

```
<button data-bind="click: function() { fillList('{% url "app.views.get_items" %}') }">

```

Or use submit binding instead?

```
<form action="{% url "app.views.get_items" %}" data-bind="submit: fillList">
    <button type="submit">Show</button>
</form>

```

Something else? Is there any best way?