Thanks for the advice Anton,
> looks like you are using some additional layer before django.forms and
> don't just create fields directly, so you may need to extend it too.
>
>
Does anyone have any advice or references on extending my form to include
an extra field? After searching and readi
>
>
>
> I am hoping to add an additional field, "Photographers" (from the
> 'Photographer' model) to AForm so that users can select a Photographer to
> become part of an instance of the 'A' model.
>
> Does that make sense?
>
yes, you need to add field and I'm guessing that ModelChoiceField will wo
Here are my models, if you are interested:
class Photographer(models.Model):
name = models.CharField(max_length=20)
models = models.ManyToManyField('Model')
class Model(models.Model):
model = models.CharField(max_length=20, blank=False)
series = models.Fore
Hi Anton,
Thank you very much for your response. The 'fields_for_a' is generating the
form fields for the instance of the model 'A'. The author admits that it
might not be the prettiest implementation, but fully functional.
def fields_for_a(instance):
# generate a sorted dict of fields co
what is going on here:
self.base_fields = fields_for_a(self.instance) ?
On Tue, Jul 31, 2012 at 8:14 PM, Nick_B wrote:
> Hi,
>
> Have hit a huge roadblock trying to implement a custom, dynamic form into
> my django project. Although I am more familiar with using ModelForms, I
> need to use
Hi,
Have hit a huge roadblock trying to implement a custom, dynamic form into
my django project. Although I am more familiar with using ModelForms, I
need to use BaseForm to work with the structure I already have in place.
I have a dictionary of objects inside of my Model 'Photographer' that I
6 matches
Mail list logo