Git Product home page Git Product logo

django_exercise's Introduction

document

django_exercise 설명

django_exercise는 장고(django)를 이용하여 웹 서비스를 제작하고 헤로쿠(Heroku)에 배포(Deploy)하는 과정을 정리한 저장소(Repository)입니다. 이 저장소(Repository)를 제작하면서 작성한 블로그가 있습니다. 자세한 내용은 아래에 링크를 통해 확인하시기 바랍니다.

사용 방법

아래에 명령어를 통해 django_exercise 저장소(Repository)를 복사(Clone)합니다.

git clone https://github.com/dev-yakuza/django_exercise.git

아래에 명령어로 파이썬 가상 환경을 생성합니다.

virtualenv venv

아래에 명령어로 파이썬 가상 환경을 실행합니다.

source venv/bin/activate

아래에 명령어로 프로젝트에 필요한 모듈을 설치합니다.

pip install -r requirements.txt

데이터베이스 연동을 위해 django_exercise/settings.py를 열고 아래의 내용을 자신의 DB에 맞게 수정합니다.

...
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'django_exercise',  # DB name
        'USER': 'root',  # DB account
        'PASSWORD': '',  # DB account's password
        'HOST': '127.0.0.1',  # DB address(IP)
        'PORT': '3306',  # DB port(normally 3306)
    }
}
...

아래에 명령어로 데이터베이스를 생성합니다.

# python manage.py makemigrations
python manage.py migrate

아래에 명령어로 장고(django) 관리자를 생성합니다.

python manage.py createsuperuser

아래에 명령어로 테스트서버를 실행합니다.

python manage.py runserver

아래에 링크를 통해 프로젝트를 확인할 수 있습니다.

django_exercise説明

django_exerciseはジャンゴ(django)を使ってウェブサービスを作成してヘロク(Heroku)へデプロイ(Deploy)するプロセスを纏めたレポジトリ(Repository)です。このレポジトリ(Repository)を作る時、作成したブログがあります。もっと詳し内容は下記のリンクで確認できます。

使い方

下記のコマンドでdjango_exerciseレポジトリ(Repository)をコピー(Clone)します。

git clone https://github.com/dev-yakuza/django_exercise.git

下記のコマンドでパイソン仮想環境を作ります。

virtualenv venv

下記のコマンドでパイソンの仮想環境を実行します。

source venv/bin/activate

下記のコマンドでプロジェクトに必要なモジュールをインストールします。

pip install -r requirements.txt

データベースを連動するため、django_exercise/settings.pyを開いて下記の内容を自分のDBに合わせて修正します。

...
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'django_exercise',  # DB name
        'USER': 'root',  # DB account
        'PASSWORD': '',  # DB account's password
        'HOST': '127.0.0.1',  # DB address(IP)
        'PORT': '3306',  # DB port(normally 3306)
    }
}
...

下記のコマンドでデーターベースを生成します。

# python manage.py makemigrations
python manage.py migrate

下記のコマンドでジャンゴ(django)の管理者を生成します。

python manage.py createsuperuser

下記のコマンドでテストサーバーを起動します。

python manage.py runserver

下記のリンクを使ってプロジェクトを確認します。

how to use django_exercise

django_exercise is the repository about django web service for deploying Heroku service. there are blog posts about this repository. if you want to know more details, see the link below.

How to use

execute the command below to clone the django_exercise repository.

git clone https://github.com/dev-yakuza/django_exercise.git

execute the command below to start python virtual environment.

virtualenv venv

execute the command below to execute python virtual environment.

source venv/bin/activate

execute the command below to install modules for the project.

pip install -r requirements.txt

you need to modify django_exercise/settings.py to connect your database like below.

...
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'django_exercise',  # DB name
        'USER': 'root',  # DB account
        'PASSWORD': '',  # DB account's password
        'HOST': '127.0.0.1',  # DB address(IP)
        'PORT': '3306',  # DB port(normally 3306)
    }
}
...

execute the command below to migrate.

# python manage.py makemigrations
python manage.py migrate

execute the command below to create django administrator.

python manage.py createsuperuser

execute the command below to start django test server.

python manage.py runserver

click the links below to check the project.

django_exercise's People

Contributors

dev-yakuza avatar

Watchers

 avatar

Forkers

dr-aryone

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.