Hi Malcolm, thanks for the reply. I've tried it with the fields indented like so: http://dpaste.com/122916/
I've commented out the browser choices and status fields etc to keep the amount of code down for the moment. I now get an error that assigned_to (line15) doesn't think that the variable all_users exists. If i then comment out assigned_to the rest of the form will display. So my issue is how do I pass 'all_users' from the __init__ method to the form field lower down? Or should it be that the __init__ method initialises the form with that variable then when super() is called it build the form? Thanks again, Pete. On Feb 20, 12:30 am, Malcolm Tredinnick <malc...@pointy-stick.com> wrote: > On Mon, 2009-02-16 at 08:49 -0800, peterandall wrote: > > Hi all, > > > I'm trying to access a list of users in forms.py I'm creating two > > lists and merging them in my view (new_bug) then passing them through > > when i create the form. I was going off answers on these two existing > > topics:http://groups.google.com/group/django-users/browse_thread/thread/9dce... > > andhttp://groups.google.com/group/django-users/browse_thread/thread/809e... > > > You can see my current code here: > > http://dpaste.com/121276/ > > Based on the code you've pasted there, there's a massive indentation > error in the form code. Everything is indented so as to be part of the > __init__ method, whereas the field definitions should be at the same > level of indentation as the "def __init__" line, since they're outside > the method. > > Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---