I have the following view and i want to prepulate the selected Country,
City, and Languages



def details(request):
    manipulator = UserPrefs.AddManipulator()
    if request.method == 'POST':
          ...
          ...
    else:
        cacheGeo(request)
        errors = {}
        # Prepolulate country, city, languages 
        new_data = {}
        new_data['city']=request.session['geo_city']  
          new_data['country_id'] = Countries.objects.get(
name__exact=request.session['geo_country']).id
        print new_data
    # Create the FormWrapper, template, context, response.
    form = forms.FormWrapper(manipulator, new_data, errors)
    return render_to_response('accounts/register_details.html', {'form':
form,'user':request.user})


but there seams that the selection fields dont get selected.... how do i
solve this problem?

Cheers

Pat


--~--~---------~--~----~------------~-------~--~----~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to