강의

멘토링

커뮤니티

Inflearn Community Q&A

dudgns45558281's profile image
dudgns45558281

asked

Building my first Django app

Using the API

def __str__(self): 를 추가하면 에러가 나요 ㅠㅠ

Written on

·

263

0

"", line 978, in _gcd_import File "", line 961, in _find_and_load File "", line 950, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 674, in exec_module File "", line 781, in get_code File "", line 741, in source_to_code File "", line 205, in _call_with_frames_removed File "C:\Users\Administrator\mysite\polls\models.py", line 25 def __str__(self): # __unicode__ on Python 2 ^ IndentationError: unexpected indent
django

Answer 1

0

들여쓰기 오류가 난 것 같아요 클래스 정의 내에 쓰시는 거니까 네 칸 들여써주시면 될 것 같아요ㅋ
dudgns45558281's profile image
dudgns45558281

asked

Ask a question