You should probably change the order of operations in the __init__function to call the super classes __init__ function first.
Kevin On Feb 16, 8:49 am, peterandall <pet...@gmail.com> 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/ > > So i'm creating the list of users fine (all_users), passing them to > the __init__ method, I can access them and print them out fine. > > My issue is where i'm trying to build the form and get it to display > in the template nothing appears, i.e none of the form fields appear, > but i don't get any error messages. If i move all of the fields out of > the __init__ method then they display in the template, but the > 'assigned_to' field can't access the 'all_users' variable from the > __init__ method. > > I guess it comes down to me not fully understanding how to access the > information in the __init__ method and still have the form be built > with all the fields. > > Any advice would be great, or if you need me to clarify anything give > me a shout. > > Cheers, > > Pete. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---