Is it possible this is still broken?  I just updated to r8883 and now
some of my {% url %} tags are breaking.  I'm seeing a
TemplateSyntaxError because the argument is not being converted to a
string before being resolved.

In other words, this example is breaking:

urls.py:
  r('^view/num=(\d+)'), 'some_view'),

models.py:
  class myModel(models.Model):
    num = models.PositiveIntegerField()

    def __str__():
      return "%d" % num

some_page.html:
  {% url some_view model_number %}
where model_number is an instance of myModel

The problem here is that the urlresolver is looking for this:
'view/num=<myModel: 7>'
when it used to look for this:
'view/num=7'

Apologies if there are errors in my example, I'm typing this on-the-
fly just to illustrate the problem.  I believe this mistake was
introduced since r8580, since that's where I was before I did an
update.

Thanks,
Brian



On Sep 1, 7:03 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Mon, 2008-09-01 at 15:59 -0700, Malcolm Tredinnick wrote:
>
> > On Mon, 2008-09-01 at 15:55 -0700, Dave Lowe wrote:
> > > I wish I could find that. I've already been looking for anything like
> > > that and keep coming up empty. None of theURLvariables I'm using
> > > include '}'.
>
> > Not the variables. The regular-expression patterns. In one of your
> > urls.py files.
>
> Don't worry. I worked it out. It's fixed in r8825.
>
> Regards,
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to