Re: problem with permalink

2008-07-22 Thread mwebs
Yes, I tried this but the problem still exists. it s the same when I do like this: @permalink def get_url(self): return ('experiment_view', (), {'exp_id': self.id}) and the same when I do it like in the example [1]: def get_url(self): return ('experiment_view', (), {'exp_id': self.

problem with permalink

2008-07-22 Thread mwebs
Hello, I have a very strange problem with the permalink-decorator: model: def get_url(self): return permalink('experiment_view', (), {'exp_id': self.id}) urls.py: ... url(r'^(?P\d+)$', 'edit_experiment', name='experiment_view'), in my template {{exp.get_url}} returns an empty stri

Re: problem with permalink

2008-07-22 Thread Alex Koshelev
Hi. `permalink` - is a decorator [1], not an 'ordinary' function. So it can be used like this: @permalink def get_url(self): return ('experiment_view', (), {'exp_id': self.id}) [1]: http://www.djangoproject.com/documentation/model-api/#the-permalink-decorator On Jul 22, 1:30 pm, mwebs <[