Inline Formset Question

2009-03-10 Thread Ardesco
Hi everyone. I still consider myself to be fairly new to Django, and I was wondering if the following was possible with inline formsets in the admin: I want to create a little questionnaire app in the admin that is pre- populated with 25 questions in a specific order such that all the user has to

ifequals Decimalfield comparison

2009-01-14 Thread Ardesco
So, I have a decimalfield that can be 3 different values. In my view, I pass in a dictionary of values that contains the appropriate decimal values as keys. {% for item in booklist %} {% for key, value in numvec.items %} {{item.number}} {% ifequals item.number value %} {{value}} {% endifequals %}

Re: Split a form up in the template/view?

2008-10-22 Thread Ardesco
Thanks for the quick response! Worked like a charm. On Oct 22, 1:25 pm, Peter Bengtsson <[EMAIL PROTECTED]> wrote: > On Oct 22, 5:10 pm, Ardesco <[EMAIL PROTECTED]> wrote: > > > > > Taking an example from Chapter 7 of the Django Book: > > > from forms impor

Split a form up in the template/view?

2008-10-22 Thread Ardesco
Taking an example from Chapter 7 of the Django Book: from forms import PublisherForm def add_publisher(request): if request.method == 'POST': form = PublisherForm(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect('/add_publisher

Easy way to pre-populate a field in admin interface?

2008-10-02 Thread Ardesco
I was wondering if there was an way to do this easily. I have two scenarios I've been pondering: a) Pre-populating a field with the current username, b) pre-populating a field with the contents a user has previously typed, a sort of "history" field. I've already hacked at the editable fields to m