Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I just got started on some web development, and got my feet wet by creating a ba

ID: 650000 • Letter: I

Question

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?)

Thanks!

Explanation / Answer

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/'):
PRODUCTION = True
DEBUG = False
else:
PRODUCTION = False
DEBUG = True


MEDIA_ROOT = PROJECT_PATH + '/media/'
MEDIA_URL = '/media/'

STATIC_ROOT = PROJECT_PATH + '/static/'
STATIC_URL = '/static/'

ADMIN_MEDIA_PREFIX = '/static/admin/'

TEMPLATE_DIRS = (
PROJECT_PATH + '/templates/',
)

# You can add local_settings.py to .gitignore.
try:
import local_settings
except:
pass