|
|
|
|
|
by WesleyJohnson
183 days ago
|
|
manage.py makemigrations myapp --empty --name add_some_view
(in the migration file) operations=[migrations.RunSQL("Create View some_view AS ....", "DROP VIEW IF EXISTS...."]
(in your models.py) class SomeView(models.Model):
class Meta:
db_table = 'some_view'
managed = False
manage.py makemigrations myapp --name add_some_view_model
|
|