First time here? Check out the FAQ!

Revision history  [back]

Wing scripts in a django project

I want to write a script to help me do some automation jobs in a django project. There is a model named "Post", I can use the code below to get all the fields:

from . import models

print(models.Post._meta.fields)

How can I use the code in a wing script? I wish I can access the django repl to get the data and use them back in the script. For example:

s = make_useful_string(models.Post._meta.fields)

insert_text(s)

Wing scripts in a django project

I want to write a script to help me do some automation jobs in a django project. There is a model named "Post", I can use the code below to get all the fields:

from . import models

models print(models.Post._meta.fields)

How can I use the code in a wing script? I wish I can access the django repl to get the data and use them back in the script. For example:

s = make_useful_string(models.Post._meta.fields)

insert_text(s)

Wing scripts in a django project

I want to write a script to help me do some automation jobs in a django project. There is a model named "Post", I can use the code below to get all the fields:

from . import models print(models.Post._meta.fields)

How can I use the code in a wing script? I wish I can access the django repl to get the data and use them back in the script. For example:

s = make_useful_string(models.Post._meta.fields)

make_useful_string(models.Post._meta.fields) insert_text(s)