Reputation: 145
table_title = 'transaction_' + username
with connection.cursor() as cursor:
sql = 'CREATE TABLE ' + table_title + '(id uuid NOT NULL,
sql += 'amount numeric(10,2) NOT NULL,
sql += 'CONSTRAINT transaction_pkey' + username + ' PRIMARY KEY (id),'
cursor.execute(sql)
I have create table using this code. Now what I want:
Is it possible? If yes, then how?
Upvotes: 1
Views: 788
Reputation: 145
There is no way use ORM while you execute raw SQL. If you want to an admin panel you have to develop your own custom admin panel.
Upvotes: 2