Install the polls app

Django needs to know about the new app we created so that syncdb can do
its magic in the next step
Fix typo during installation of polls app

C:\learningdjango\mysite [master]> python manage.py syncdb
Traceback (most recent call last):
File ".\manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
line 399, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
line 261, in fetch_command
commands = get_commands()
File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
line 107, in get_commands
apps = settings.INSTALLED_APPS
File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 54,
in __getattr__
self._setup(name)
File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 49,
in _setup
self._wrapped = Settings(settings_module)
File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 128,
in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Python27\lib\site-packages\django\utils\importlib.py", line 40,
in import_module
__import__(name)
File
"C:\Users\lenovo\Documents\GitHub\learningdjango\mysite\mysite\settings.py",
line 39, in <module>
polls,
NameError: name 'polls' is not defined
Activated the Poll and Choice models

C:\learningdjango\mysite [master]> python manage.py syncdb
Creating tables ...
Creating table polls_poll
Creating table polls_choice
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Django does the following after activation: This is pretty friggin
amazing.

That small bit of model code gives Django a lot of information. With it,
Django is able to:
* Create a database schema (CREATE TABLE statements) for this app.
* Create a Python database-access API for accessing Poll and Choice
objects.

Check out the schema

C:\learningdjango\mysite [master +0 ~1 -0]> python manage.py sql polls
BEGIN;
CREATE TABLE "polls_poll" (
"id" integer NOT NULL PRIMARY KEY,
"question" varchar(200) NOT NULL,
"pub_date" datetime NOT NULL
)
;
CREATE TABLE "polls_choice" (
"id" integer NOT NULL PRIMARY KEY,
"poll_id" integer NOT NULL REFERENCES "polls_poll" ("id"),
"choice_text" varchar(200) NOT NULL,
"votes" integer NOT NULL
)
;

COMMIT;