Django 1.7 python manage.py makemigrations polls SyntaxError
Question: I am following the official Django documentation and trying to make the polls
app. But when I run the command python manage.py makemigrations polls I get
the console error.

    
    
    anupam@Anupam-HP:~/Python/django/mysite$ python manage.py makemigrations polls
    Traceback (most recent call last):
    File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
    File "/usr/local/lib/python2.7/dist-packages/Django-1.7.2-py2.7.egg/django/                core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
    File "/usr/local/lib/python2.7/dist-packages/Django-1.7.2-py2.7.egg/django/core/management/__init__.py", line 354, in execute
    django.setup()
    File "/usr/local/lib/python2.7/dist-packages/Django-1.7.2-py2.7.egg/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
    File "/usr/local/lib/python2.7/dist-packages/Django-1.7.2-py2.7.egg/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
    File "/usr/local/lib/python2.7/dist-packages/Django-1.7.2-py2.7.egg/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
    File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
    File "/home/anupam/Python/django/mysite/polls/models.py", line 13
    
    
    
                                            ^
    SyntaxError: invalid syntax
    

The code I am using for the models is:

    
    
    from django.db import models
    
    
    class Question(models.Model):
        question_text = models.CharField(max_length=200)
        pub_date = models.DateTimeField('date published')
    
    
    class Choice(models.Model):
       question = models.ForeignKey(Question)
       choice_text = models.CharField(max_length=200)
       votes = models.IntegerField(default=
    

It would be great if you could point out the error.


Answer: The error line is the last line of your `models.py`:

    
    
    votes = models.IntegerField(default=
    

It should be:

    
    
    votes = models.IntegerField(default=0)
    

