I have been working on a Django application for a few weeks and want to put it on my website. Tom suggested that I put it on bitbucket as a private repository and then pull it from my server since there is no direct way to pull it from my computer.
I’ve decided to just zip up the thing and ftp it. But I found it interesting that Django projects are actually not trivial to share. For example, what files would you include?
It actually seems like you are not supposed to share settings.py (nor manage.py, or urls.py really. These are auto-generated for you). At least, the secret_key should be secret. But you also have a bunch of settings such as database information that should not be public either. If you change the file, any version control system will declare it as a changed file. If you .(git|hg)ignore it, what happens if you need to add a new setting to settings.py?
So I thought maybe you share django apps instead of the project? That’s stupid. My project has templates, static files. Are those supposed to be a separate project?
So it looks like a fucking mess and I’m zipping this shit up and calling it a day.
After seeing what Zamboni does, it appears they modified the manage.py to load a settings_local.py file instead of settings. So you would copy settings.py to settings.local.py and use it. That’s actually a pretty good idea.