hamax/django-serverpush — Issue #1: Passing additional arguments to a view
Author: vivekdurai
Created: 2012-02-12 06:17:47+00:00
State: open

I have a view like the following

```python
def delete(request,slug):
objects = Article.objects.filter(user=request.user)
msg = ""
for d in objects:
if d.lookup== slug:
d.delete()
msg = "deleted %s" % d.name
return HttpResponse({'msg':msg,'lookup':slug}, mimetype='application/json')

def delete_update(request,slug):
return [{'name':'delete', 'model':Article, 'params':{'pk':request.user.id}, 'data':{'lookup':'object.lookup'}}]
```

client.js:

```javascript
$(document).bind('serverpush_delete', function(event, data) {
alert(data.lookup);
});
```
What am I doing wrong? what does the delete_object_update view pass? how do I use the slug variable?