Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- C:\Users\TomTom\webdev\wsd-material\exercises\05_django\firstdjango>python manage.py migrate
- Operations to perform:
- Synchronize unmigrated apps: webshop
- Apply all migrations: admin, auth, contenttypes, sessions
- Synchronizing apps without migrations:
- Creating tables...
- Installing custom SQL...
- Installing indexes...
- Running migrations:
- No migrations to apply.
- C:\Users\TomTom\webdev\wsd-material\exercises\05_django\firstdjango>python manage.py dbshell
- 'sqlite3' is not recognized as an internal or external command,
- operable program or batch file.
- C:\Users\TomTom\webdev\wsd-material\exercises\05_django\firstdjango>python manage.py shell
- Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:15:05) [MSC v.1600 32 bit (Intel)] on win32
- Type "help", "copyright", "credits" or "license" for more information.
- (InteractiveConsole)
- >>> from webshop.models import *
- >>> p = Product(title="Teddy Bear", description="Huge fluffy teddy-bear", quantity=10)
- >>> p.save()
- Traceback (most recent call last):
- File "<console>", line 1, in <module>
- File "C:\Python34\lib\site-packages\django\db\models\base.py", line 591, in save
- force_update=force_update, update_fields=update_fields)
- File "C:\Python34\lib\site-packages\django\db\models\base.py", line 619, in save_base
- updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
- File "C:\Python34\lib\site-packages\django\db\models\base.py", line 700, in _save_table
- result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
- File "C:\Python34\lib\site-packages\django\db\models\base.py", line 733, in _do_insert
- using=using, raw=raw)
- File "C:\Python34\lib\site-packages\django\db\models\manager.py", line 92, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "C:\Python34\lib\site-packages\django\db\models\query.py", line 921, in _insert
- return query.get_compiler(using=using).execute_sql(return_id)
- File "C:\Python34\lib\site-packages\django\db\models\sql\compiler.py", line 920, in execute_sql
- cursor.execute(sql, params)
- File "C:\Python34\lib\site-packages\django\db\backends\utils.py", line 81, in execute
- return super(CursorDebugWrapper, self).execute(sql, params)
- File "C:\Python34\lib\site-packages\django\db\backends\utils.py", line 65, in execute
- return self.cursor.execute(sql, params)
- File "C:\Python34\lib\site-packages\django\db\utils.py", line 94, in __exit__
- six.reraise(dj_exc_type, dj_exc_value, traceback)
- File "C:\Python34\lib\site-packages\django\utils\six.py", line 549, in reraise
- raise value.with_traceback(tb)
- File "C:\Python34\lib\site-packages\django\db\backends\utils.py", line 65, in execute
- return self.cursor.execute(sql, params)
- File "C:\Python34\lib\site-packages\django\db\backends\sqlite3\base.py", line 485, in execute
- return Database.Cursor.execute(self, query, params)
- django.db.utils.OperationalError: table webshop_product has no column named title
- >>> ^Z
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement