Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just got started on some web development, and got my feet wet by creating a basic facebook app using Django. I am thinking of publishing the app, and consequently now need a development app that I could make subsequent changes to and roll them out to the production app. I'm completely new to this, and would be really thankful if someone could guide me on how I could go about this, and what the best practices are. (I also plan on letting my friend contribute to the app, so I would need to integrate git or some other vcs in the process right?)


share|improve this question

migrated from Aug 31 '11 at 4:03

This question came from our site for professional and enthusiast programmers.

I was looking for Django specific solutions (how to have separate files, what to do with the databases etc). If someone can point me to a site which has this information, that would be great too! If it still is pretty open ended, I can move it to the other site. Thanks for your reply :) – iman453 Aug 31 '11 at 3:35
check out the Django book, also ask your question in the question, not in the comments area. – rosh Aug 31 '11 at 3:38

Example .gitignore file here: Recommended .gitignore file for Python projects?

I like to do something like this in my settings file:

import os

# Get the path where ever you're project is at:
PROJECT_PATH = os.path.join(os.path.dirname(__file__))

# I sometimes use the path to determine if my project is in production.
# This would not be nice for open source projects.
if PROJECT_PATH.startswith('/var/django/'):
    DEBUG = False
    PRODUCTION = False
    DEBUG = True

MEDIA_URL = '/media/'

STATIC_URL = '/static/'

ADMIN_MEDIA_PREFIX = '/static/admin/'

    PROJECT_PATH + '/templates/',

# You can add to .gitignore.
    import local_settings
share|improve this answer

I'm a newbie myself and I feel your pain. What I can say is that top-down learning is painful and a safer way to go is to start from the basics. For beginning web development, Facebook is relatively complicated and full of APIs, as is Django (and Google app engine if you decide to lump that in too). All that aside, Subversion, Github, Google Code, Beanstalk are good version-control software. They have excellent guides online. I recommend using a local development server like MAMP or WAMP to point your canvas urls to, so you can save time and money and security problems by developing locally until you are ready to host it somewhere. Facebook's developer app (a web application that is more of a html form than a web application) allows you to do this.

I recommend starting with the javascript sdk for facebook, as it is the easy to learn for python. See the Run With Friends Canvas App or the sample template code for Python (run by Google App Engine)

share|improve this answer

For developement Arnar has it, convention is to put your dev settings in a '' and import that in your

Fabric is very popular for deployment. One command deploys and can set up your production environment.

In addition python project management is made easy by pip/virtualenv. Shows the full processes using virtualenv/fabric/pip

This is a great tutorial that shows you how to go from nothing to production

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.