Is it possible to write a Django model with a field using the PostgreSQL function as the default value? Here is a simple example of using txid_current () as the default value:
% psql mydb=
The Django model for this table might look like
class Test(models.Model): label = TextField('Label', default='') txid = BigIntegerField('txid', default=???)
Is there a way to specify the database function as the default value, or do I need to add the default value in PostgreSQL as a separate step after running syncdb?
David source share