Skip to main content

webuild_pro porting for django

Project description

django-webuild_ds

django-webuild_ds 는 webuild-pro v2.3.1을 장고에 맞게 포팅한 장고앱이다.

프로젝트에 설치하기

  1. webuild 앱과 demian_parts 앱을 프로젝트 settings.py 의 INSTALLED_APPS 에 추가한다.
import os
INSTALLED_APPS = [
    ...
    'demian_parts',
    'webuild',
]
...
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
X_FRAME_OPTIONS = 'SAMEORIGIN'
  1. 프로젝트의 urls.py에 webuild url을 추가한다.
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
    ...
    path('', include('webuild.urls')),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  1. 포트폴리오를 입력하기 위해서 프로젝트에 webuild 데이터베이스를 생성한다.
    python manage.py makemigrations webuild demian_parts
    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')

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-webuild_ds-0.0.2.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

django_webuild_ds-0.0.2-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file django-webuild_ds-0.0.2.tar.gz.

File metadata

  • Download URL: django-webuild_ds-0.0.2.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for django-webuild_ds-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0ef1837cac6a0614d2c310ed0aca4f5b2942e88f33b7b2bccc947160ca142195
MD5 5fad2dacf109085543c5709868f06810
BLAKE2b-256 6214eb36cb18641ebb99b46d3442fd2e09b2967dc9b32fd9f0692c3a003fc396

See more details on using hashes here.

File details

Details for the file django_webuild_ds-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_webuild_ds-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 53fe2a16a572c8cc84931db589125c2a6679bffc5cac6e693335bf506790b6e3
MD5 b63f5f92935e9c9bab914829df014f04
BLAKE2b-256 29075f8adb5360e2ceed40d51662bc8e902651e55bcf2c9bc07c8913e82662d5

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