Boston Python Workshop/Saturday/Web app project: Difference between revisions

imported>Paulproteus
imported>Paulproteus
Line 230:
We're using this instead of simply typing "python", because manage.py sets up the project's environment for you. "Setting up the environment" involves two things:
 
# Putting polls on sys.path. For flexibility, several pieces of Django refer to projects in Python dotted-path notation (e.g. 'polls.models'). In order for this to work, the polls package has to be on sys.path. (We've already seen one example of this: the INSTALLED_APPS setting is a list of packages in dotted-path notation.)
# Setting the DJANGO_SETTINGS_MODULE environment variable, which gives Django the path to your settings.py file.
 
We've already seen one example of this: the INSTALLED_APPS setting is a list of packages in dotted-path notation.
 
Setting the DJANGO_SETTINGS_MODULE environment variable, which gives Django the path to your settings.py file.
 
Once you're in the shell, explore the database API:
Anonymous user