I have three models: Person, Client, Member
Person is a base model, Client and Member are profiles for Person.
class Person(AbstractBaseUser, PermissionsMixin):
email = models.EmailField(
verbose_name=_('email address'),
max_length=255,
unique=True,
)
class Client
Try
def __init__(self, *args, **kwargs):
super(CustomContactForm, self).__init__(*args, **kwargs)
self.fields.keyOrder = ['name', 'reason', 'email', 'body']
On Tuesday, January 20, 2015 at 11:26:01 PM UTC+2, Tobias Dacoir wrote:
>
> I'm using django-contact-form which allows me t
>
> So pass the request
>
def __init__(self, request, *args, **kwargs):
self.request=request
super(CustomContactForm, self).__init__(*args, **kwargs)
self.fields.keyOrder = ['name', 'reason', 'email', 'body']
--
You received this message because you are subscribed to
I need to build a form field with a special select field.
Select field should have option other on which text field is shown. After
entering value in textfield, it should be validated, saved and then refered
to initial form.
How this can be done?
I'm trying to override MultiValueField and Mult
Inside view there is no forloop (unless you explicitly define it). forloop
is defined only inside for loops in templates
Actually your code is somewhat weird.
You iterate all list until last without doing anything.
It is more efficient to use slicing
email = newleave.objects.all()[-1] # this is
I need to manually save OnetoOne field. I asked this question on
stackoverflow.
More details here:
http://stackoverflow.com/questions/28262236/saving-onetoone-field-manually-in-django
Thank you.
--
You received this message because you are subscribed to the Google Groups
"Django users" grou
I solved the problem.
See
http://stackoverflow.com/questions/28262236/saving-onetoone-field-manually-in-django
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to d
7 matches
Mail list logo