Hi Rakhee,
Could you try following ? :
icatid = models.BigIntegerField(db_column='ICatID') makedate =
models.DateTimeField(db_column='MakeDate') revdate =
models.DateTimeField(db_column='RevDate', blank=True, null=True) makeid =
models.BigAutoField(db_column='MakeId') class Meta: unique_togeth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On Tue, Oct 16, 2018 at 10:55:48PM -0700, Rakhee Menon wrote:
> Hi Everyone,
>
> I have a scenario where one field needs to be a primary key and another
> field needs to be an AutoFieldand Autofield requires a condition
> primary_key = true
>
As I saw earlier, Django does not allow you to have two rows as autofield,
you can make your own save method for model. Ex. get first of
YourModel.objects invert sorted by wanted field, add to it's value 1 and
save
ср, 17 жовт. 2018, 08:55 користувач Rakhee Menon
пише:
> Hi Everyone,
>
> I have
Hi Everyone,
I have a scenario where one field needs to be a primary key and another
field needs to be an AutoFieldand Autofield requires a condition
primary_key = true
I get this error
django_reports.MstCompositionFm.makeid: (fields.E100) AutoFields must set
primary_key=True.
django_repo
4 matches
Mail list logo