I'm using Django, and I can't figure out an easy way to keep a development and public version of my Django app other than simply having 2 apps and copying code over for every new public version.
Is there a better way?
Thanks!
You may want to look into the "gitflow" system. There are many variations, you and don't have to use git, but the idea is to use branches for development and production.
I use vagrant for development with GIT, in order to localy test and then push I use separate settings for both of them. To be more detailed on how I implement it (small group of devs):
__init__.py file in the folder as well).When you create dev.py and prod.py include the following lines in the top (actually replace BASE_DIR):
import os
DJANGO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BASE_DIR = os.path.dirname(DJANGO_ROOT)
Those are your dev and prod files, separate databases (for instance you could be using sqlite for local dev), apps and settings based on your environment (for instance dev should have debug toolbar in my environment), additionally you can create a devurls.py file in the root directory of the project and point dev.py to use that file (ROOT_URLCONF setting). When you've created the files, n your virtualenv dir folder under the virtualenv of the working project, there should be a bin/ folder, inside there a postactivate file in that file enter:
export DJANGO_SETTINGS_MODULE="projectname.settings.dev"
Where projectname is your project. This way you have a dev and prod settings file (additionally devurls if you want) with the use of git you can create branches and develop as you wish. Most dev environment won't need anything more than that.
DEBUGsetting, it seems to me you're missing insights in some pretty big and important topics.