Currently only Model Menu options allow for default assignment of a parameter
and in that case
only one is permitted.
A new class should be introduced that allows for defaults to be assigned to
both Model Menu
options and to Named Url menu options. There should be a one to many
relationship between
this new class and MenuOption with one MenuOption being allowed to have many
defaults.
The defaults model should contain the following fields (other than the primary
key) MenuOption,
url_id, value, value_type. value_type should be a choice field allowing the
user to select from
'constant' or 'model id'. This choice should obviously be restricted for named
url menu options
as they will not have a model to work from. url_id should be unique for a given
MenuOption
When it comes to generating the menu options anything specified in this
defaults model will be
used in preference over variables already gleaned from the current request url.
Finally a means of migrating from the current ModelMenuOptions will need to be
implemented
so that existing users will not lose any data when upgrading.
Original issue reported on code.google.com by greatlemer@gmail.com on 6 Aug 2009 at 1:32
Original issue reported on code.google.com by
greatlemer@gmail.com
on 6 Aug 2009 at 1:32