본문 바로가기

Python_WEB

(436)
[Django]Survey WEB Application Tutorial 4 1. 설계 계획 수립 질문 "색인" 페이지 -- 최근의 질문들을 표시합니다. 질문 "세부" 페이지 -- 질문 내용과, 투표할 수 있는 서식을 표시합니다. 질문 "결과" 페이지 -- 특정 질문에 대한 결과를 표시합니다 투표 기능 -- 특정 질문에 대해 특정 선택을 할 수 있는 투표 기능을 제공합니다. 2. 뷰 추가 ''' polls/views.py ''' def detail(request, question_id): return HttpResponse("You're looking at question %s." % question_id) def results(request, question_id): response = "You're looking at the results of question %s." ret..
[Django]Survey WEB Application Tutorial 3 1. __str__() 메소드를 Question과 Choice에 추가 객체의 표현을 대화식 프롬프트에서 편하게 보려는 이유 말고도, Django 가 자동으로 생성하는 관리 사이트 에서도 객체의 표현이 사용 ''' polls/models.py ''' from django.db import models class Question(models.Model): # ... def __str__(self): return self.question_text class Choice(models.Model): # ... def __str__(self): return self.choice_text 1-1. Model.__str__() ''' Model.__str__() Example ''' from django.db impo..
[Django]Survey WEB Application Tutorial 2 1. Setting.py 데이터베이스 확인 ''' mysite/settings.py ''' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } 1-1. 관련된 명령어 # 데이터베이스에 변경 필요 사항 추출 python manage.py makemigrations # 데이터베이스에 변경사항 반영 python manage.py migrate 1-2. DBdb.sqlite3 2. TimeZone 설정 ''' mysite/settings.py ''' TIME_ZONE = 'Asia/Seoul' 3. 언어 설정 LANGUAGE_CODE = 'ko-kr' 4...
[Django]Survey WEB Application Tutorial 1 1. 가상 환경 생성 python -m venv venv 2. Django 설치 pip install django 3. Django Ver 확인 py -m django --version 4. 프로젝트 만들기 4-1. 기본 명령어 django-admin startproject name [directory] 4-2. 현재 폴더에 프로젝트 만들기 django-admin startproject mysite . 4-3. mysite 폴더 생성 후 프로젝트 만들기 django-admin startproject mysite 5. 프로젝트 생성 확인 mysite/ manage.py mysite/ __init__.py settings.py urls.py asgi.py wsgi.py mysite/ 프로젝트의 컨테이너 ma..
db.sqlite3 db.sqlite3> SQLite3 데이터베이스 파일 DB 관련 명령어> 1. 데이터베이스에 변경 필요 사항 추출 python manage.py makemigrations 2. 데이터베이스에 변경사항 반영 python manage.py migrate
[HTML]Reactive WEB Study Site> https://www.youtube.com/playlist?list=PLuHgQVnccGMAnWgUYiAW2cTzSBywFO75B WEB2-CSS - YouTube www.youtube.com My Git> https://github.com/ankiwoong/Bitnami_htdocs ankiwoong/Bitnami_htdocs [생활코딩]수업 코드. Contribute to ankiwoong/Bitnami_htdocs development by creating an account on GitHub. github.com 반응형 웹 작동 영상> 수업 정리> CSS에 대한 기본 지식을 얻을 수 있었고 반응형 웹이 어떻히 구현되는지를 알 수 있었던 수업이였다. 이고잉님이 만드신 유투브를 ..
[WMAP]Bitnami WMAP Setup(비트나미) bitnami wamp 검색 https://bitnami.com/stack/wamp WAMP Bitnami WAMP Stack provides a complete, fully-integrated and ready to run WAMP development environment. In addition to PHP, MySQL and Apache, it includes FastCGI, OpenSSL, phpMyAdmin, ModSecurity, SQLite, ImageMagick, xDebug, Xcache, OpenLDAP, ModSecurity, bitnami.com On My Computer > Download for Windows No Thanks, just take me to the download..
[Django]User > Views from django.shortcuts import render, redirect from django.core.paginator import Paginator from django.http import Http404 from fcuser.models import Fcuser from tag.models import Tag from .models import Board from .forms import BoardForm # Create your views here. def board_detail(request, pk): try: board = Board.objects.get(pk=pk) except Board.DoesNotExist: raise Http404('게시글을 찾을 수 없습니다.') return..