Thanks Karen.
I removed the custom form from admin.py and added a constructor to the
model:
def __init__(self, *args, **kwargs):
super(BannerImage, self).__init__(*args, **kwargs)
self._meta.get_field('url')._choices = get_urls()
It seems to work now.
Keith
On Dec 9, 2:52 pm, "Karen Trace
On Tue, Dec 9, 2008 at 1:58 PM, lingrlongr <[EMAIL PROTECTED]> wrote:
>
> I have a function called get_urls that returns a list of absolute_urls
> for various models in the same project. This function is used for
> another model in a way so that when a particular model appears on the
> site, I ca
I have a function called get_urls that returns a list of absolute_urls
for various models in the same project. This function is used for
another model in a way so that when a particular model appears on the
site, I can choose which part of the site this model links to.
# utils.py
def get_urls():
3 matches
Mail list logo