Jump to content

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:
 
# Making sure ''polls'' is on the right path to be imported.
# 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.
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.