On Tuesday, 22 November 2011 22:32:04 UTC, Lee wrote:
>
> DR - thanks for your reply. I need to display the model method result
> (property) on index.html. Our index.html is heavily customized, and is
> currently just a switchboard into the database tables via links like
> this:
>
> {{ app_list.1.m
Hello Lee,
I think what we are trying to get to is when you say index page are you
talking about the admin page that lists the apps and their databases or are
you talking about the change list for a particular database. If it's the
latter then you might be able to do something with the list_di
DR - thanks for your reply. I need to display the model method result
(property) on index.html. Our index.html is heavily customized, and is
currently just a switchboard into the database tables via links like
this:
{{ app_list.1.models.21.admin_url }}
I'm hoping for a similarly simple way to sho
On Tuesday, 22 November 2011 03:13:00 UTC, Lee wrote:
>
> I've opened a hundred docs/postings and can't find the correct syntax
> for this simple task.
>
> In my model I have a method and a property to return the result of the
> method:
>
> class MyModel(models.Model)
> ...
>def get_my_property
I've opened a hundred docs/postings and can't find the correct syntax
for this simple task.
In my model I have a method and a property to return the result of the
method:
class MyModel(models.Model)
...
def get_my_property(self):
return '1234'
my_property = property(get_my_property)
5 matches
Mail list logo