I'm working on a website using Django and I have Fabric as well, which is very useful for scripting some chunks of code that me and other developers use. I'm pretty new to all of these (and linux in general, tbh) so I have ideas, but I don't know how (or if) they are possible. Specifically, I wanted to write a script to start the server on a specific port that we use for testing. Manually, I would just run
python ~/project/manage.py runserver 0.0.0.0:8080
but that gets old. To manually implement that specific command, I have the following code in my fabfile:
def start8080():
local("python ~/project/manage.py runserver 0.0.0.0:8080")
which works, but I'm not the only one using the port for testing, and ~/project/ is not the only project which would need to use a similar script. Is there a way to search down the tree from the directory you are working in for the first manage.py and then to run it the same command from there?