I'm trying to update a field in the database by calling a url pattern from urls.py. The pattern is defined as follows (code slightly changed for security): 

`(r'^pref/(?P<key>\d+)/(?P<value>\d+)/$', 'client.views.update_pref'),`

key: ENABLE\_T (int value 7 as defined in constants.py)

value: 0 (boolean int for False) 

In Javascript, I've attempted to call /pref/ENABLE\_T/0 under this block of code, but it doesn't go into the `$.ajax()` function at all.

```
$.ajax('/pref/7/0/', {
    dataType: 'json',
    success: function(data) {
        alert("Success");
    },
    error: function() {
        // TODO: handle error
        alert("Preferences Error");
    }
});

```

I'd rather use ENABLE\_T instead of the 7 to call that constant. Any suggestions? Thanks!