이것을 입력하면 이런식으로 오류가 나는데 무엇이 문제인지 모르겠습니다...
>>> post = Post.objects.create(title="this is title", content="this is content")
Traceback (most recent call last): File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\backends\utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\backends\sqlite3\base.py", line 423, in execute return Database.Cursor.execute(self, query, params) sqlite3.OperationalError: table second_post has no column named content The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<console>", line 1, in <module> File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\models\query.py", line 453, in create obj.save(force_insert=True, using=self.db) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\models\base.py", line 726, in save self.save_base(using=using, force_insert=force_insert, File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\models\base.py", line 763, in save_base updated = self._save_table( File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\models\base.py", line 868, in _save_table results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\models\base.py", line 906, in _do_insert return manager._insert( File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\models\query.py", line 1270, in _insert return query.get_compiler(using=using).execute_sql(returning_fields) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\models\sql\compiler.py", line 1416, in execute_sql cursor.execute(sql, params) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\backends\utils.py", line 98, in execute return super().execute(sql, params) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\backends\utils.py", line 66, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\backends\utils.py", line 75, in _execute_with_wrappers return executor(sql, params, many, context) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\backends\utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\backends\utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "C:\Users\82108\OneDrive\문서\Django-study\projects\first-django\venv\lib\site-packages\django\db\backends\sqlite3\base.py", line 423, in execute return Database.Cursor.execute(self, query, params) django.db.utils.OperationalError: table second_post has no column named content있었는지 검색해보세요.
- 서로 예의를 지키며 존중하는 문화를 만들어가요.
- 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.