반응형

Python/Django 4

관리자(superuser) 계정 생성

먼저, Django 프로젝트 루트 디렉터리에서 createsuperuser 명령어를 사용하여 관리자 계정을 생성합니다.python manage.py createsuperuser 이 명령어를 실행하면 사용자 이름(username), 이메일 주소(email address), 비밀번호(password)를 입력하라는 메시지가 나타납니다. 예를 들어, 다음과 같이 입력할 수 있습니다: Username: adminEmail address: admin@example.comPassword: ********Password (again): ******** 2. Django 관리자 페이지 접근이제 서버를 실행하고 브라우저에서 관리자 페이지에 접근할 수 있습니다. python manage.py runserver 브라우저에서 ..

Python/Django 2024.07.04

[Django] You have num unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.Run 'python manage.py migrate' to apply them. 오류 해결

[Django] You have num unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.Run 'python manage.py migrate' to apply them.  오류는 아래 명령어를 실행해주면 된다. python manage.py migrate

Python/Django 2024.07.03

django.template.exceptions.TemplateDoesNotExist 오류

Django 프로젝트를 실행하고 URL을 입력을 하면 Template를 찾을 수 없다고 발생한 오류이다. 인터넷에 오류를 찾아보니 해결이 안되어서 제가 찾은 어떻게 처리 했는지 작성한다. https://stackoverflow.com/questions/1926049/django-templatedoesnotexist Django TemplateDoesNotExist? My local machine is running Python 2.5 and Nginx on Ubuntu 8.10, with Django builded from latest development trunk. For every URL I request, it throws: TemplateDoesNotExist at /appname/path ap..

Python/Django 2019.07.21