본문 바로가기
728x90

django 홈페이지 만들기3

Django 파이썬 웹 프로그래밍(5) ADMIN 계정 설정 및 ADMIN PAGE 이번 글에서는 Admin 계정 설정과 Admin Page에서 Post APP을 확인해보도록 하겠다. 우선 runserver을 통해 localhost 서버를 열어주도록 하겠다. python manage.py runserver 그 다음으로 urls.py를 이용해 amdin page를 들어가기 위해 다음과 같이 수정해준다. from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.conf.urls import include, url from django.views import defaults as default_views from django.views.. 2020. 7. 26.
Django 파이썬 웹 프로그래밍(4) Postgresql 설치 및 연결 Database를 담당하는 Postgresql 설치 와 연결을 하도록 하겠다. https://www.postgresql.org/download/windows/ PostgreSQL: Windows installers Windows installers Interactive installer by EDB Download the installer certified by EDB for all supported PostgreSQL versions. This installer includes the PostgreSQL server, pgAdmin; a graphical tool for managing and developing your databases, and StackBui www.postgresql.org 에서.. 2020. 7. 26.
Django 파이썬 웹 프로그래밍(3) Model과 View 그리고 Serializer 이번 글에서는 model을 생성하고 migration 작업을 통하여 admin 페이지에서 확인하는 작업까지 가질 것이다. 지금 제작하는 사이트는 커뮤니티 사이트이다. 우리가 만든 APP은 post이다. post를 구성하는 요소에는 글, 댓글이 있을 것이다. 또한 글은 TimeModel이다. Time Model이란 시간정보를 담고 있다. 대부분의 글과 댓글은 작성시간이나 수정시간을 포함한다. models.py를 다음과 같이 수정한다. from django.db import models class Post(TimeStampedModel): title = models.CharField(max_length=50, null=True) owner_nick = models.CharField(max_length=50,.. 2020. 7. 26.
728x90