<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.garamx.com/dokuwiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://www.garamx.com/dokuwiki/feed.php">
        <title>GaramX python:django</title>
        <description></description>
        <link>https://www.garamx.com/dokuwiki/</link>
        <image rdf:resource="https://www.garamx.com/dokuwiki/lib/tpl/darkblue/images/favicon.ico" />
       <dc:date>2026-05-06T15:11:06+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:admin&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:app&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:bcrypt&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:class-based&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:csrf&amp;rev=1755175991&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:forms&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:garam&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:graphene&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:hide_key_value&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:manage&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:migration&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:models.py&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:models&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:nginx&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:request&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:secret_key&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:settings.py&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:static&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:test&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:treeboard&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:ubuntu&amp;rev=1745110289&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:urls.py&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:uwsgi&amp;rev=1760795621&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:view&amp;rev=1744711518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.garamx.com/dokuwiki/doku.php?id=python:django:vscode&amp;rev=1744711518&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://www.garamx.com/dokuwiki/lib/tpl/darkblue/images/favicon.ico">
        <title>GaramX</title>
        <link>https://www.garamx.com/dokuwiki/</link>
        <url>https://www.garamx.com/dokuwiki/lib/tpl/darkblue/images/favicon.ico</url>
    </image>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:admin&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:admin</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:admin&amp;rev=1744711518&amp;do=diff</link>
        <description>Django Admin

Django 관리

Admin 기능 사용하기

Django는 사이트 관리자가 컨텐츠를 편집할 수 있는 통합적인 인터페이스를 생성하는 문제를 해결합니다.

관리자 사이트는 사이트 방문자를 위한 것이 아니라, 사이트 관리자를 위한 것입니다.</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:app&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:app</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:app&amp;rev=1744711518&amp;do=diff</link>
        <description>Application 추가

1. 어플리케이션 추가
python manage.py startapp 앱이름
2.어플리케이션 환경설정 등록(settings.py)


  INSTALLED_APPS = [&#039;앱이름&#039;,


3.템플릿
|template
  |--- 앱이름
4.Model 정의
#models.py에서 스키마 작성후 model manager로 생성
또는 
#table 직접 생성 후 python manage.py inspectdb 으로 등록</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:bcrypt&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:bcrypt</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:bcrypt&amp;rev=1744711518&amp;do=diff</link>
        <description>비밀번호 암호화하자

bcrypt를 이용한 비밀번호 암호화

1. bcrypt설치
2. bcrypt 모듈 불러옴 import bcrypt
3. 해시할 문자열 인코딩
4. password 해시


import bcrypt

maro_password = &#039;mypassword_1234&#039;
print (maro_password)

enc_password = maro_password.encode(&#039;utf-8&#039;)
print (enc_password)


hashed_pw = bcrypt.hashpw(enc_password, bcrypt.gensalt())
print(hashed_pw)</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:class-based&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:class-based</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:class-based&amp;rev=1744711518&amp;do=diff</link>
        <description>Built-in class-based views API

&lt;https://docs.djangoproject.com/en/3.2/ref/class-based-views/&gt;

	*  Base views
		*  View
		*  TemplateView
		*  RedirectView

	*  Generic display views
		*  DetailView
		*  ListView

	*  Generic editing views
		*  FormView
		*  CreateView
		*  UpdateView
		*  DeleteView

	*  Generic date views</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:csrf&amp;rev=1755175991&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-08-14T12:53:11+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:csrf</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:csrf&amp;rev=1755175991&amp;do=diff</link>
        <description>CSRF protection

CSRF를 이용하여 시스템을 보호하는 것이 완전하지는 않지만 해주어야 하는군요.


     &lt;form method=&quot;post&quot;&gt;
         {% csrf_token %}
         &lt;input type=&quot;text&quot; name=&quot;username&quot;&gt;
         &lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;
     &lt;/form&gt;</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:forms&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:forms</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:forms&amp;rev=1744711518&amp;do=diff</link>
        <description>django.forms.Form


class LoginForm(forms.Form):
    login_id = forms.CharField(label=&quot;Login Id&quot;, max_length=100)
    password = forms.CharField(label=&quot;Password&quot;, widget=forms.PasswordInput, max_length=100)
    sender = forms.EmailField(help_text=&quot;이메일&quot;, required=False, max_length=100)
    remain_amt = forms.IntegerField(label=&quot;잔액&quot;, widget=forms.NumberInput(
        attrs={&#039;class&#039;: &#039;form-control item-quantity&#039;, &#039;style&#039;: &#039;text-align: right;&#039;}),
        step_size=1,
        error_messages={&#039;require…</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:garam&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:garam</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:garam&amp;rev=1744711518&amp;do=diff</link>
        <description>설정을 위하여

garam.garamx.com

uWSGI

1.uwsgi.ini


[uwsgi]
uid=foo
base=/home/%(uid)/garam

# the virtualenv (full path)
home=/home/%(uid)/.pyenv/versions/maro
chdir=/home/%(uid)/garam/maro

module=conf.wsgi:application
env=DJANGO_SETTINGS_MODULE=conf.settings.product

# process-related settings
# uWSGI 프로세스를 master로 돌아가게 해줍니다.
master=true

# maximum number of worker processes
processes=5

max-requests=5000
daemonize=/var/log/garam/maro/uwsgi.log

# UNIX socket 파일의 위치입니다. socket file의 위치를 잡아줘도 되며 l…</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:graphene&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:graphene</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:graphene&amp;rev=1744711518&amp;do=diff</link>
        <description>Graphene

	*  Graphene-Django

Graphene-Django는 Django 프로젝트에 GraphQL 기능을 쉽게 추가할 수 있는 몇 가지 추가 추상화를 제공합니다.

graphene-django

Install


pip install graphene-django


INSTALLED_APPS에 추가


INSTALLED_APPS = [
    ...
    &quot;django.contrib.staticfiles&quot;, # Required for GraphiQL
    &quot;graphene_django&quot;
]</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:hide_key_value&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:hide_key_value</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:hide_key_value&amp;rev=1744711518&amp;do=diff</link>
        <description>Django의 각종 키값 설정

각종 설정값을 소스상에 누락시키지 않기 위해서...

OS의 환경변수값 이용

python-decouple 이용


pip install python-decouple</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:manage&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:manage</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:manage&amp;rev=1744711518&amp;do=diff</link>
        <description>Django 서버 관리

철학

직원들이나 고객들이 컨텐츠를 수정하기 위한 관리자 사이트를 만드는 것은 딱히 창의적일 필요없는 지루한 작업입니다.
이런 이유로, Django는 모델에 대한 관리용 인터페이스를 모두 자동으로 생성합니다.</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:migration&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:migration</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:migration&amp;rev=1744711518&amp;do=diff</link>
        <description>Django 마이그레이션 초기화

	*  참조 - 마이그레이션-초기화

최근에 django 프로젝트를 진행하다 보니 models.py 부분에 추가로 수정을 할 일이 생겼습니다.

새로 필드를 추가를 하려면 default 값을 설정해야 된다는 사실을 모르고 오류가 나서 이것 저것 하다가 데이터베이스를 드랍하기도 하는 등 과정을 겪으면서 마이그레이션 초기화하는 방법에 대해서 알아보았습니다.</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:models.py&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:models.py</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:models.py&amp;rev=1744711518&amp;do=diff</link>
        <description>models.py


from django.db import models

class PyBlog(models.Model):
    id    = models.IntegerField(primary_key=True, null=False)
    title = models.CharField(max_length=100)

    class Meta:
        db_table = &#039;py_blog&#039;
        


DATABASE 반영</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:models&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:models</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:models&amp;rev=1744711518&amp;do=diff</link>
        <description>Django Models

Models

Models

Field

Model field reference

Field options

Field.null

True면 null허용 - Database에 Null값저장여부

Field.blank

True면 blank허용, Field.null은 False
True 인 경우 필드를 비워 둘 수 있습니다. 
이것은 null과 다른데요. null은 순전히 데이터베이스와 관련이있는 반면 blank는 유효성 검사와 관련됩니다.</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:nginx&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:nginx</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:nginx&amp;rev=1744711518&amp;do=diff</link>
        <description>Nginx / uWsgi / Django 연결하기

	*  nginx 및 uWSGI연동
	*  uWSGI와 nginx를 사용하여 Django와 웹 서버 설정하기

	*  runserver로 실제 서버를 돌리면 안되는 이유

설정

uWSGI 실행 테스트


uwsgi --http :8000 --home /home/mama/.pyenv/versions/maro --chdir /home/mama/garam/maro \
 --static-map /static=/home/mama/garam/maro/gov/static --module conf.wsgi</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:request&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:request</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:request&amp;rev=1744711518&amp;do=diff</link>
        <description>Request And Session

Request

Session


# 키(key)로 세션 값을 가져오기(예: &#039;count&#039;). 
# 키(key)가 없는 경우에는 KeyError를 발생시킨다. 그러므로 키(key)가 존재하는지를 확인해야 한다. 
if &#039;count&#039; in request.session: 
	count = request.session[&#039;count&#039;] 

# 키(key)가 없을 경우, 기본값(예: &#039;0&#039;)을 설정하고 세션 값을 가져오기 
count = request.session.get(&#039;count&#039;, &#039;0&#039;) 

# 세션 값 설정하기 
request.session[&#039;count&#039;] = &#039;1&#039; 

# 세션 값 삭제하기 
del request.session[&#039;count&#039;]…</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:secret_key&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:secret_key</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:secret_key&amp;rev=1744711518&amp;do=diff</link>
        <description>SECRET_KEY

	*  Django 문서확인

다음과 같은 경우에도 서명이 유용할 수 있습니다.

	*  직렬화 된 데이터 서명
	*  비밀번호를 분실한 사용자에게 보낼 “내 계정 복구” URL 생성.
	*  숨겨진 양식 필드에 저장된 데이터가 변조되지 않았는지 확인합니다.</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:settings.py&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:settings.py</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:settings.py&amp;rev=1744711518&amp;do=diff</link>
        <description>settings.py

DATABASE 연결정보


DATABASES = {    
     &#039;default&#039;: {
        &#039;ENGINE&#039;: &#039;django.db.backends.mysql&#039;,
        &#039;NAME&#039;: &#039;DB이름&#039;,
        &#039;USER&#039;: &#039;계정명&#039;,
        &#039;PASSWORD&#039;:&#039;비밀번호,
        &#039;HOST&#039;:&#039;아이피&#039;,
        &#039;PORT&#039;:&#039;포트&#039;
    }
}</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:static&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:static</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:static&amp;rev=1744711518&amp;do=diff</link>
        <description>정적파일관리

setting에 STATIC_ROOT가 설정되어 있어야 한다.


python manage.py collectstatic --no-input


를 통해서 정적파일을 staticfiles폴더에 모을 수 있다.</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:test&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:test</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:test&amp;rev=1744711518&amp;do=diff</link>
        <description>Test

TestCase만들기


import datetime

from django.test import TestCase
from django.utils import timezone
from django.urls import reverse
from django.views import generic

from .models import Question

def create_question(question_text, days):
    time = timezone.now() + datetime.timedelta(days=days)
    return Question.objects.create(question_text=question_text, pub_date=time)

class QuestionModelTests(TestCase):
    def test_was_published_recently_with_future_question(self):
        time = timez…</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:treeboard&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:treeboard</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:treeboard&amp;rev=1744711518&amp;do=diff</link>
        <description>Django-Treeboard

패키지설치


pip install django-treebeard



DJANGO_BASE_APP = [
    ...
    &#039;django.contrib.sitemaps&#039;,
    &#039;markdownx&#039;,
    &#039;treebeard&#039;,
]
MY_APP =[&#039;myapp.blog&#039;,&#039;myapp.coding&#039;]
INSTALLED_APPS = DJANGO_BASE_APP + MY_AP</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:ubuntu&amp;rev=1745110289&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-20T00:51:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:ubuntu</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:ubuntu&amp;rev=1745110289&amp;do=diff</link>
        <description>Ubuntu 24.04 에서 uWSGI와 아파치

가상환경
python3-venv


python3 -m venv marovenv


삽질

uWSGI

공식페이지

WSGI란 Web Server Gateway Interface의 약자로, 웹서버와 웹어플리케이션이 어떤 방식으로
통신하는가에 관한 인터페이스를 의미, 이 WSGI 규격에 맞춘 코드를 실행해주는 프로그램이
uWSGI임.</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:urls.py&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:urls.py</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:urls.py&amp;rev=1744711518&amp;do=diff</link>
        <description>urls.py


from django.urls import path
from . import views

app_name = &quot;plant&quot;

urlpatterns = [
    path(&#039;&#039;, index_views.index, name=&#039;index&#039;),
    path(&#039;admin/&#039;, admin.site.urls),  
    path(&#039;robots.txt&#039;,  TemplateView.as_view(template_name=&quot;robots.txt&quot;, content_type=&#039;text/plain&#039;)),
    path(&quot;index.do&quot;, views.index.as_view(), name=&quot;main&quot;), 
]</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:uwsgi&amp;rev=1760795621&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-18T13:53:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:uwsgi</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:uwsgi&amp;rev=1760795621&amp;do=diff</link>
        <description>WSGI

uWSGI(Web Server Gateway Interface)

Application Server로 
apt install uwsgi

uwsgi --ini pythonblog_uwsgi.ini --http :80



openssl genrsa -out foobar.key 2048
openssl req -new -key foobar.key -out foobar.csr
openssl x509 -req -days 365 -in foobar.csr -signkey foobar.key -out foobar.crt</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:view&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:view</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:view&amp;rev=1744711518&amp;do=diff</link>
        <description>뷰(view)

views.py


from django.shortcuts import render
from django.views import generic
# Create your views here.

class index(generic.ListView):
    def __init__(self):
        self.title_nm       = &quot;메인페이지입니다.&quot;
        self.ogImgUrl       = &quot;&quot;
        self.descript       = &quot;메인페이지입니다.&quot;
        self.template_name  = &quot;blog/index.html&quot;

    def get(self, request, *args, **kwargs):        
        self.content = {&quot;descript&quot;:self.descript,
                        &quot;title_nm&quot;:self.title_nm,
          …</description>
    </item>
    <item rdf:about="https://www.garamx.com/dokuwiki/doku.php?id=python:django:vscode&amp;rev=1744711518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-15T10:05:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python:django:vscode</title>
        <link>https://www.garamx.com/dokuwiki/doku.php?id=python:django:vscode&amp;rev=1744711518&amp;do=diff</link>
        <description>VS Code For Django

Django사용하기 힘듦..
VSCode에서 Django사용</description>
    </item>
</rdf:RDF>
