Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More โ†’
Socket
Sign inDemoInstall
Socket

django-mentor-ds-myenglish

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-mentor-ds-myenglish

mentor_pro porting for django

  • 1.4.0
  • PyPI
  • Socket score

Maintainers
1

django-mentor_ds_myenglish

django-mentor_ds_myenglish ๋Š” mentor-pro v4.8.0์„ ์žฅ๊ณ ์— ๋งž๊ฒŒ ํฌํŒ…ํ•œ ์žฅ๊ณ ์•ฑ์ด๋‹ค.

ํ”„๋กœ์ ํŠธ์— ์„ค์น˜ํ•˜๊ธฐ

  1. mentor ์•ฑ๊ณผ demian_parts ์•ฑ์„์„ ํ”„๋กœ์ ํŠธ settings.py ์˜ INSTALLED_APPS ์— ์ถ”๊ฐ€ํ•œ๋‹ค.
import os
INSTALLED_APPS = [
    ...
    'demian_parts',
    'mentor',
]
  1. ํ”„๋กœ์ ํŠธ์˜ urls.py์— mentor url์„ ์ถ”๊ฐ€ํ•œ๋‹ค.
from django.urls import path, include

urlpatterns = [
    ...
    path('', include('mentor.urls')),
]
  1. ์ผ€์ด์Šค๋ฅผ ์ž…๋ ฅํ•˜๊ธฐ ์œ„ํ•ด์„œ ํ”„๋กœ์ ํŠธ์— mentor ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์ƒ์„ฑํ•œ๋‹ค.
    python manage.py makemigrations mentor
    python manage.py migrate
    python manage.py createsuperuser
  1. http://127.0.0.1:8000/admin ์œผ๋กœ ์ ‘์†ํ•˜์—ฌ ๋ธ”๋กœ๊ทธ๋ฅผ ์ž…๋ ฅํ•œ๋‹ค.

ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ ์ƒ์„ฑํ•˜๊ธฐ

  1. ๊ฐœ๋ณ„ ์—…์ฒด์˜ static ํด๋” ๊ฒฝ๋กœ๋ฅผ INSTALLED_APPS ์— ์ถ”๊ฐ€ํ•œ๋‹ค.
import os
STATICFILES_DIRS = [
  os.path.join(BASE_DIR, '_static/'),
]
  1. _data ํด๋”๋ฅผ ์ƒ์„ฑํ•˜๊ณ  contents.py๋‚ด์— ๋ฐ์ดํ„ฐ๋ฅผ ํ˜•์‹์— ๋งž๊ฒŒ ์ž…๋ ฅํ•œ๋‹ค.
  2. _static ํด๋”๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ๊ฐ์ข… ์ด๋ฏธ์ง€ ๋“ฑ์„ ํ˜•์‹์— ๋งž๊ฒŒ ์ €์žฅํ•œ๋‹ค.

์ฐธ๊ณ  : SCSS ์„ค์น˜ํ•˜๊ธฐ - ํ”„๋กœ์ ํŠธ์— SCSS๋ฅผ ์„ค์น˜ํ•ด์•ผ ์•ฑ์ด ์ž‘๋™ํ•œ๋‹ค.
https://www.accordbox.com/blog/how-use-scss-sass-your-django-project-python-way/

  1. django_compressor, django-libsass๋ฅผ ์„ค์น˜ํ•œ๋‹ค. (์•ฑ์„ ์„ค์น˜ํ•˜๋ฉด ์ž๋™์œผ๋กœ ์„ค์น˜๋œ๋‹ค.)
pip install django_compressor django-libsass
  1. ํ”„๋กœ์ ํŠธ settings.py ์˜ INSTALLED_APPS ์— ๋‹ค์Œ์„ ์ถ”๊ฐ€ํ•œ๋‹ค.
import os
INSTALLED_APPS = [
    ...
    'compressor',
]

COMPRESS_PRECOMPILERS = (
    ('text/x-scss', 'django_libsass.SassCompiler'),
)

STATICFILES_FINDERS = [
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'compressor.finders.CompressorFinder',
]

# compressor ์•ฑ์„ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” STATIC_ROOT๊ฐ€ ์„ค์ •๋˜์–ด ์žˆ์–ด์•ผ ํ•œ๋‹ค.
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc