Web Backend 14

Eclipse 에서 Django 관리자화면 설정하기

Database 설정프로젝트이름 > settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': '데이터베이스이름', 'USER': '아이디', 'PASSWORD': '패스워드', 'HOST': 'localhost', 'PORT': '3306', OPTIONS' : { 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", } } } Database 생성프로젝트 > Django > Custom commandmigrate 암호설정cd C:\Work\Django\프로젝트이름python manage.py createsuperuser 접속화면 접속성공

Web Backend/Django 2018.03.15

Hello World (Django)

1.프로젝트만들기File > New > Other > PyDev > PyDev Django ProjectHelloWorld* 프로젝트명을 소문자로 시작하면 필요한 파일들 (예: manage.py 등)이 생성되지 않는다. 2.앱만들기Django > Custom Commandstartapp helloworld 3.view.py from django.shortcuts import render from django.http import HttpResponse # Create your views here. def index(request): return HttpResponse("Hello, World!") 4./HelloWorld/HelloWorld/settings.py INSTALLED_APPS = [ 'dja..

Web Backend/Django 2018.03.12

윈도우에서 Eclipse로 Django 개발환경구성하기

python설치http://xprogrammer.tistory.com/330 Django설치pip install django JDK 설치http://www.oracle.com/technetwork/java/javase/overview/index.html 이클립스다운로드http://www.eclipse.org/downloads/ 이클립스플러그인설치(pyDev)pyDev 이클립스플러그인환경설정Preferences > PyDev > Interpreters > Python Interpreters > Quick Auto-Config 프로젝트생성File > New > Other > PyDev > PyDev Django Project

Web Backend/Django 2018.03.12