Skip to main content

Demiansoft template(mentor)

Project description

django_mentor_myenglishkr

demiansoft mentor 템플릿 다른 템플릿과 차이는 다국어 지원을 한다는 것

설치

  1. pip를 이용해서 앱 설치
    pip install django_mentor_myenglishkr
    
  2. 프로젝트 settings.py에 앱 등록
    import os
    
    INSTALLED_APPS = [
    "jazzmin", # 관리자 페이지 UI
    'django.contrib.admin',
    ...,
    'django.contrib.sitemaps',
    'shared_lib',
    'markdownx', # 블로그 마크다운에디터
    'hitcount', # 블로그 히트카운터
    'taggit', # 블로그 태그관리
    ...,
    'compressor',
    'mentor',
    ]
    
    import os
    # SCSS 처리기 추가
    COMPRESS_PRECOMPILERS = (
        ('text/x-scss', 'django_libsass.SassCompiler'),
    )
    
    # compressor 설정
    COMPRESS_ENABLED = True
    COMPRESS_OFFLINE = False
    COMPRESS_PRECOMPILERS = (
        ('text/x-scss', 'django_libsass.SassCompiler'),
    )
    
    STATICFILES_FINDERS = [
        'django.contrib.staticfiles.finders.FileSystemFinder',
        'django.contrib.staticfiles.finders.AppDirectoriesFinder',
        'compressor.finders.CompressorFinder',  # 이 줄을 추가해야 합니다.
    ]
    
    
    # 추가 설정 사항들
    import os
    
    X_FRAME_OPTIONS = 'DENY' # 클릭재킹공격 방지 보안설정
    
    STATICFILES_DIRS = [
        os.path.join(BASE_DIR, '_static/'),
    ]
    
    MEDIA_URL = '/media/'
    MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
    
    STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
    
    from _data import shared_lib
    JAZZMIN_SETTINGS = shared_lib.JAZZMIN_SETTINGS
    MARKDOWNX_MARKDOWN_EXTENSIONS = shared_lib.MARKDOWNX_MARKDOWN_EXTENSIONS
    MARKDOWNX_MARKDOWN_EXTENSION_CONFIGS = shared_lib.MARKDOWNX_MARKDOWN_EXTENSION_CONFIGS
    MARKDOWNX_UPLOAD_MAX_SIZE = shared_lib.MARKDOWNX_UPLOAD_MAX_SIZE
    MARKDOWNX_UPLOAD_CONTENT_TYPES = shared_lib.MARKDOWNX_UPLOAD_CONTENT_TYPES
    MARKDOWNX_IMAGE_MAX_SIZE = shared_lib.MARKDOWNX_IMAGE_MAX_SIZE
    
  3. 프로젝트 urls.py에 다음을 추가한다.
    from django.urls import path, include
    from shared_lib import utils
    
    urlpatterns = [
     # robots.txt는 반드시 가장 먼저
     path('robots.txt', utils.robots),
     path('admin/', admin.site.urls),
     path('', include('mentor.urls', namespace='mentor')),
     path('shared_lib/', include('shared_lib.urls', namespace='shared_lib')),
     path('markdownx/', include('markdownx.urls')),
    ]
    
    # 개발 환경에서 미디어 파일 서빙
    from django.conf import settings
    from django.conf.urls.static import static
    
    if settings.DEBUG:
     urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
    
  4. 프로젝트에 media/폴더를 생성하고 default_modal.bg.webp를 넣어 모달 기본배경으로 사용한다.
  5. 모델 마이그레이션 생성(모달, 캘린더, 포트폴리오, 블로그 모델 설치)
    python manage.py makemigrations
    
  6. 마이그레이션 적용
    python manage.py migrate
    
  7. _data/shared_lib.py 와 _data/mentor.py에 데이터 준비

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_myenglishkr-5.0.1.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file django_mentor_myenglishkr-5.0.1.tar.gz.

File metadata

File hashes

Hashes for django_mentor_myenglishkr-5.0.1.tar.gz
Algorithm Hash digest
SHA256 cd99dfbed96db057ddc357717664f6a03e1609a25539836cfd529580a6e2d68c
MD5 d5f10977ec13d4dcb8793375735b3961
BLAKE2b-256 fcef43e21b2cc50314843b243b9d980b37b8ff122eb486d2e2e59a192c6d3734

See more details on using hashes here.

File details

Details for the file django_mentor_myenglishkr-5.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_mentor_myenglishkr-5.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ab128610215fbf7038823459c99695d2e636e4adedb10a2363168ff19230d75
MD5 765d468099021596b9295c5746663ae9
BLAKE2b-256 0fc53876334dd662fab638637a7bd89b745b22c03366ae6e8fa81ba771ddeb1a

See more details on using hashes here.

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