2008-8-23
| 23:41 | yashh | whats that |
| 23:41 | theY4Kman | my_class_instance.__class__.__name__ |
| 23:42 | yashh | perfect |
| 23:42 | yashh | thank you |
| 23:42 | theY4Kman | :) |
| 23:43 | hopthrisC | with a ManyToManyField with intermediate model, can i get the nifty filter_horizontal interface? |
| 23:44 | paryl | Magus: sorry, should have thought ahead: http://pastebin.com/d14f0fa9e |
| 23:44 | Magus- | well of course that won't work |
| 23:44 | Magus- | you can't use a tag in a tag |
| 23:45 | paryl | i'm just trying to wrap my head around template tags for the first time... i don't quite understand? |
| 23:45 | Magus- | the for loop is looking for a VARIABLE named mfgs |
| 23:45 | Magus- | not a tag |
| 23:45 | Magus- | you CANNOT use a tag in a tag like that |
| 23:45 | Magus- | you also can't return a queryset or object through a simple_tag |
| 23:45 | Magus- | simple_tags do something and return strings |
| 23:45 | Magus- | a full tag can edit context in its render() |
| 23:46 | Magus- | so you can do a query and insert the data into context |
| 23:46 | Magus- | django-template-utils has tags that do what you're after, you could look at them as an example |
| 23:46 | Magus- | or just use them |
| 23:46 | paryl | ok great, i'll look for that |
| 23:46 | paryl | thanks! |
Page 27 of 27
← Previous
(2,621 total)