Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. C:\Users\TomTom\webdev\wsd-material\exercises\05_django\firstdjango>python manage.py migrate
  2. Operations to perform:
  3. Synchronize unmigrated apps: webshop
  4. Apply all migrations: admin, auth, contenttypes, sessions
  5. Synchronizing apps without migrations:
  6. Creating tables...
  7. Installing custom SQL...
  8. Installing indexes...
  9. Running migrations:
  10. No migrations to apply.
  11.  
  12.  
  13.  
  14. C:\Users\TomTom\webdev\wsd-material\exercises\05_django\firstdjango>python manage.py dbshell
  15. 'sqlite3' is not recognized as an internal or external command,
  16. operable program or batch file.
  17.  
  18.  
  19. C:\Users\TomTom\webdev\wsd-material\exercises\05_django\firstdjango>python manage.py shell
  20. Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:15:05) [MSC v.1600 32 bit (Intel)] on win32
  21. Type "help", "copyright", "credits" or "license" for more information.
  22. (InteractiveConsole)
  23. >>> from webshop.models import *
  24. >>> p = Product(title="Teddy Bear", description="Huge fluffy teddy-bear", quantity=10)
  25. >>> p.save()
  26. Traceback (most recent call last):
  27. File "<console>", line 1, in <module>
  28. File "C:\Python34\lib\site-packages\django\db\models\base.py", line 591, in save
  29. force_update=force_update, update_fields=update_fields)
  30. File "C:\Python34\lib\site-packages\django\db\models\base.py", line 619, in save_base
  31. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  32. File "C:\Python34\lib\site-packages\django\db\models\base.py", line 700, in _save_table
  33. result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  34. File "C:\Python34\lib\site-packages\django\db\models\base.py", line 733, in _do_insert
  35. using=using, raw=raw)
  36. File "C:\Python34\lib\site-packages\django\db\models\manager.py", line 92, in manager_method
  37. return getattr(self.get_queryset(), name)(*args, **kwargs)
  38. File "C:\Python34\lib\site-packages\django\db\models\query.py", line 921, in _insert
  39. return query.get_compiler(using=using).execute_sql(return_id)
  40. File "C:\Python34\lib\site-packages\django\db\models\sql\compiler.py", line 920, in execute_sql
  41. cursor.execute(sql, params)
  42. File "C:\Python34\lib\site-packages\django\db\backends\utils.py", line 81, in execute
  43. return super(CursorDebugWrapper, self).execute(sql, params)
  44. File "C:\Python34\lib\site-packages\django\db\backends\utils.py", line 65, in execute
  45. return self.cursor.execute(sql, params)
  46. File "C:\Python34\lib\site-packages\django\db\utils.py", line 94, in __exit__
  47. six.reraise(dj_exc_type, dj_exc_value, traceback)
  48. File "C:\Python34\lib\site-packages\django\utils\six.py", line 549, in reraise
  49. raise value.with_traceback(tb)
  50. File "C:\Python34\lib\site-packages\django\db\backends\utils.py", line 65, in execute
  51. return self.cursor.execute(sql, params)
  52. File "C:\Python34\lib\site-packages\django\db\backends\sqlite3\base.py", line 485, in execute
  53. return Database.Cursor.execute(self, query, params)
  54. django.db.utils.OperationalError: table webshop_product has no column named title
  55. >>> ^Z
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement