no, Scott, you should just do *this*:

In your Parrot model, you could add a property that displays your DOM
id.

class Parrot(models.Model):
    # fields

    def _domid(self):
        return ''parrotButton-%s" % self.id
    domid = property(_domid)

and use parrot.domid in your templates.

On 14 sep, 06:46, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 9/13/07, Scott Anderson <[EMAIL PROTECTED]> wrote:
>
> > What I'm hoping, however, is that this missive was moot, because you'll
> > say, "no, Scott, you should just do *this*:", followed by an elegant and
> > reasonable solution that I, as a relative newcomer to Django, have not
> > yet considered. Here's to your reply, and cheers!
>
> OK, here you go:
>
> Use another template system, either site-wide or for the cases where
> the Django template system isn't doing what you need. It's not hard to
> do this, and it opens up the possibility of using any or all of the
> vast number of Python template systems available.
>
> The Django template system, at this point, will almost certainly
> *never* include the type of functionality you're asking for, so use
> another template system that does or that's more willing to bend its
> philosophy to suit what you want. If you like the rest of the Django
> template system I'd suggest you try Jinja, which started as a fork of
> Django's template system and so is nearly feature-for-feature
> identical, but adds arbitrary Python expressions.
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of correct."


--~--~---------~--~----~------------~-------~--~----~
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