The problem that I see with adding that specific method is that someone might then want to add get_all_related_model_modules, or get_all_related_model_verbose_names or any number of things that can be found in _meta currently.
I think that the solution here is to bring your logic out of the template and into the view, where you could get the required information without the added complexity that you're suggesting. On Mar 30, 4:08 pm, jurian <[EMAIL PROTECTED]> wrote: > I'm quite new to Django source so I wanted to get some advice on some > additions I tought of making to the code base. > > My final goal is to get a list of names of the models related to a > certain model (perhaps there is a very simple way of doing this I > don't know of). > > First I though of adding a 'get_all_related_models' method to > django.db.models.options, but then I realized that I won't be able to > access the '_meta' attribute from the page templates, so I though of > changing it to 'get_all_related_model_names'. > > Please let me know if I'm on the right track, or if I'm totally > missing something here. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
