Skip to content

Instantly share code, notes, and snippets.

@TaurusOlson
Last active August 17, 2016 14:17
Show Gist options
  • Save TaurusOlson/1c4632b0496dec9b79599a2f7386ddfb to your computer and use it in GitHub Desktop.
Save TaurusOlson/1c4632b0496dec9b79599a2f7386ddfb to your computer and use it in GitHub Desktop.
A .projections.json file adapted to Django applications
{
"../*.py": {
"type": "my_project"
},
"../my_project/settings.py": {
"type": "settings"
},
"templates/my_app/*.html": {
"type": "templates",
"alternate": "views.py"
},
"views.py": {
"type": "views",
"alternate": "urls.py"
},
"models.py": {
"type": "models",
"alternate": "views.py"
},
"tests.py": {
"type": "tests",
"alternate": "views.py"
},
"urls.py": {
"type": "urls",
"alternate": "views.py"
},
"forms.py": {
"type": "forms",
"alternate": "models.py"
},
"utils.py": {
"type": "utils",
"alternate": "views.py"
},
"static/my_app/*": {
"type": "static"
},
"management/commands/*": {
"type": "commands"
}
}
@TaurusOlson
Copy link
Author

In order to use this file within Django, change my_project by your project name (ex: mysite) and my_app by your application name (ex: polls):

sed 's/my_project/mysite/g; s/my_app/polls/g' projections.json > .projections.json

then copy .projections.json to your mysite/polls directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment