728x90
밋밋한 장고 어드민 인터페이스를 모던한 느낌의 인터페이스로 바꿔보자.
Django-suit (http://djangosuit.com) 설치하기
1. pip 또는 easy_install 을 이용하여 django_usit 설치
1 2 3 4 5 6 7 8 9 10 11 12 | (envtread)root@localhost:~# pip install django-suit==0.2.15 Collecting django-suit==0.2.15 Downloading django-suit-0.2.15.tar.gz (1.4MB) 100% |████████████████████████████████| 1.4MB 181kB/s Building wheels for collected packages: django-suit Running setup.py bdist_wheel for django-suit Stored in directory: /root/.cache/pip/wheels/8d/c4/5b/2416593e0b9ce0947479676d188262362d12c5c9acfca09252 Successfully built django-suit Installing collected packages: django-suit Successfully installed django-suit-0.2.15 (envtread)root@localhost:~# | cs |
2. settings.py INSTALLED_APPS 에 suit 추가
※ 주의 : 'suit'은 반드시 'django.contrib.admin' 앞에 위치해야 한다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | INSTALLED_APPS = [ 'suit', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', #Django-machina related apps 'mptt', 'haystack', 'django_markdown', 'widget_tweaks', 'galois', 'books', 'aleph', ] + get_machina_apps() | cs |
3. TEMPLATE_CONTEXT_PROCESSORS 수정
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [MACHINA_MAIN_TEMPLATE_DIR,], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': TCP + ( 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', # Machina 'machina.core.context_processors.metadata', #djano-suit 'django.core.context_processors.request', ), }, }, ] | cs |
4. 완성된 모습이다.
추가 커스토마이징은 http://django-suit.readthedocs.org/en/develop/ 페이지를 참조하세요.
728x90