Skip to main content

mentor_ds myenglish templates for demiansoft

Project description

django-mentor_ds_myenglish

django-mentor_ds는 mentor_ds 템플릿의 myenglish를 위한 커스터마이징 템플릿이다.

< 추가기능 >

  1. 언어 선택 지원
  2. 1인 강사 지원
  3. logo의 형태 커스터마이징

Quick start

  1. 본 템플릿은 다음의 필수 앱들이 필요하다. 프로젝트의 settings.py에 다음을 추가한다.
INSTALLED_APPS = [
    ...
    
    'django.contrib.humanize',
    
    'mentor_ds',
    
    # 필수 컴포넌트
    'popup',
    'base',
    'hero',
    
    # 선택 공통 컴포넌트
    'counts',
    'about',
    'whyus',
    'testimonials',
    'team',
    'faq',
    'contact',
    'appointment',  # contact에서 내부적으로 사용함
    
    # 선택 유니크 컴포넌트
    'courses',
    'features',
    'events',
    'pricing',
    
    # 확장 컴포넌트
    'lang',
    'intro',
]
  1. static 파일을 저장하기 위해 settings.py에 다음을 추가한다.
STATICFILES_DIRS = [
    os.path.join(BASE_DIR, '_static/'),
]
  1. 프로젝트의 urls.py에 다음을 추가하여 home app과 템플릿에 연결한다.
from django.urls import path, include

from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    # ...
    path('', include('mentor_ds.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  1. BASE_DIR에 _data폴더를 생성하고 context.py를 생성한다.

  2. BASE_DIR에 _static폴더를 생성하고 이미지를 저장한다.

  • 프레임으로 창을 띄울때 거부하는 문제 해결위해 settings.py에 다음을 주석처리함.
MIDDLEWARE = [
    ...
    # 프레임으로 창을 띄울때 접속을 거부하는 문제 해결
    # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
  • context는 context_eng, context_kor 두가지 버전으로 준비하여 언어를 선택할 수 있도록 한다.

  • context에 추가될 언어설정 및 intro 예시

context = {
    'components' : [
        ...
        ['intro', True, 'Teacher', True],
    ]
    'lang': {
        'list': ['eng', 'kor'],
        'selected': 'eng'
    },
    'intro': {
        'heading': "해외 여행, 비즈니스 업무, 언어 능력 시험, 이민 준비 등 영어와 관련된 목표가 있으신가요? 이러한 목표를 달성하기 위해, 영어로 생각하고 표현할 수 있는 능력을 지속적으로 향상시켜줄 코치가 필요합니다.",
        "desc": "저는 학생들의 스피킹 실력이 향상되고 자신감을 가질 뿐만 아니라 일상에서 영어를 사용하며 즐거워하는 것을 보면서 큰 보람을 느꼈습니다. 많은 분들이 이 즐거움을 저와 함께 느꼈으면 좋겠습니다. 언제든지 편하게 연락주세요!",
    }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-mentor_ds_myenglish-0.0.2.tar.gz (13.9 kB view hashes)

Uploaded Source

Built Distribution

django_mentor_ds_myenglish-0.0.2-py3-none-any.whl (18.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page