Hi,
It's probably better to handle the default in the save() method.
def save(self, **kwargs):
if not self.id:
self.id = get_entity_id()
super(Entity, self).save(**kwargs)
Or, better yet, just remove the "id = models.BigIntegerField" line
completely and let django give you a mod
if I remove the parens, when I submit to create the new entity is throws a
validation error that does not specify the field that is wrong, "Please
correct the error below."
--jerry
On Mon, Dec 15, 2014 at 6:20 AM, Daniel Roseman
wrote:
>
> On Monday, 15 December 2014 11:04:13 UTC, Gerald Klein w
On Monday, 15 December 2014 11:04:13 UTC, Gerald Klein wrote:
>
>
>
> Daniel,
> I didn't include any code as I didn't do anything unusual but if you think
> that would help here it is.I was hoping that there was some ordinary
> theoretical basis for this as I didn't do anything custom really, as
Daniel,
I didn't include any code as I didn't do anything unusual but if you think
that would help here it is.I was hoping that there was some ordinary
theoretical basis for this as I didn't do anything custom really, aside
from the id generation for the "Entity" class, which I generate the id
manu
On Monday, 15 December 2014 00:53:05 UTC, Gerald Klein wrote:
>
> HI, I have a simple contact form with an address subform in the form of
> "TabularInline" where you can add an arbitrary amount of addresses, after I
> add a contact and an address and save, when I go to add a brand new contact
>
HI, I have a simple contact form with an address subform in the form of
"TabularInline" where you can add an arbitrary amount of addresses, after I
add a contact and an address and save, when I go to add a brand new contact
and address, the address that I just added will be there and if I add the
n
6 matches
Mail list logo