Skip to main content

my demiansoft templates

Project description

django-herobiz-dental

Introduction

demiansoft homepage templates

블로그 포스트를 위해 admin에서 markdown 형식으로 글작성이 가능하다. 단, 이미지 삽입시 responsive 를 위해 class=img-fluid 클래스명 설정이 필요하며 마크다운 에디터에서 이미지 마크 다운에 {: .img-fluid}를 넣어줘야 적용이 된다.


Requirements

Django >= 4.2.11 libsass>=0.23.0 django-analyticsds >= 0.3.1 django-calendards >= 0.4.0 django-modalds >= 0.1.0 django-utilsds >= 0.6.0 django-mdeditor >= 0.1.20 django-hitcount >= 1.3.5 django-taggit >= 5.0.1 django-markdownify >= 0.9.3 django-light >= 0.1.0 # 밝은 admin 화면 pillow >= 10.3.0 # 데이터베이스에서 이미지 사용하기위해


Install

settings.py

INSTALLED_APPS = [    
    'django_light', # django.contrib.admin 위에 위치
    ...
    'django.contrib.sitemaps',   # 사이트맵 만들기
    
	'django_analyticsds',  
	'django_utilsds',  
	'django_calendards',  
	'django_modalds', 
	
	'mdeditor',  # markdown WYSIWYG 에디터 사용하기
    'markdownify.apps.MarkdownifyConfig',
    'hitcount', 
    'taggit', 
	  
	'django_herobiz_dental',
]

...

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, '_static/'),
]

MEDIA_URL = '/media/'  
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')  
X_FRAME_OPTIONS = 'SAMEORIGIN'  
  
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') 

# mdeditor 설정
MDEDITOR_CONFIGS = {
    'default': {
        'width': '100% ',  # Custom edit box width
        'height': 700,  # Custom edit box height
        'toolbar': ["undo", "redo", "|",
                    "bold", "del", "italic", "quote", "uppercase", "lowercase", "|",
                    "h1", "h2", "h3", "h5", "h6", "|",
                    "list-ul", "list-ol", "hr", "|",
                    "link", "image", "code", "html-entities", "|",
                    "help", "info",
                    "||", "preview", "watch", "fullscreen"],  # custom edit box toolbar
        'upload_image_formats': ["jpg", "jpeg", "gif", "png", "bmp", "webp"],  # image upload format type
        'image_folder': 'editor',  # image save the folder name
        'theme': 'default',  # edit box theme, dark / default
        'preview_theme': 'default',  # Preview area theme, dark / default
        'editor_theme': 'default',  # edit area theme, pastel-on-dark / default
        'toolbar_autofixed': True,  # Whether the toolbar capitals
        'search_replace': True,  # Whether to open the search for replacement
        'emoji': False,  # whether to open the expression function
        'tex': True,  # whether to open the tex chart function
        'flow_chart': True,  # whether to open the flow chart function
        'sequence': True,  # Whether to open the sequence diagram function
        'watch': True,  # Live preview
        'lineWrapping': False,  # lineWrapping
        'lineNumbers': False,  # lineNumbers
        'language': 'en'  # zh / en / es
    }
    
}
MARKDOWNIFY = {
    "default": {
        "WHITELIST_TAGS": [
            'a',
            'abbr',
            'acronym',
            'b',
            'blockquote',
            'em',
            'i',
            'li',
            'ol',
            'p',
            'strong',
            'ul',
            'h1',
            'h2',
            'h3',
            'h5',
            'h6',
            'ul',
            'hr',
            'img',
            'code',
        ],
        "WHITELIST_ATTRS": [
            'src',
            'class',
            'href',
            'id',
        ],
        "MARKDOWN_EXTENSIONS": [
            "fenced_code",
            "attr_list",
        ],
    }
} 

in the shell

>> pip install django-herobiz-dental
>> python manage.py makemigrations django_calendards django_modalds
>> python manage.py migrate
>> python manage.py createsuperuser

urls.py

from django.contrib import admin  
from django.urls import path, include  
from django.conf import settings  
from django.conf.urls.static import static  
  
urlpatterns = [  
    path('admin/', admin.site.urls),  
    path('', include('django_herobiz_dental.urls')),  
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Composition

프로젝트 내의 _data 폴더 안에 herobizdental.py 파일을 생성하고 다음과 같은 형식으로 작성한다.(예제 파일 참조)

context = {
    "color": '-orange',  # ['', '-blue', '-green', '-orange', '-purple', '-red', '-pink']
    "hero_type": 'fullscreen',  # ['animated', 'carousel', 'fullscreen', 'static']
}

context.update(base)
context.update(seo)
context.update(header)
context.update(hero)
context.update(featured_services)
context.update(about)
context.update(client)
context.update(cta)
context.update(onfocus)
context.update(features)
context.update(services)
context.update(testimonials)
context.update(pricing)
context.update(faq)
context.update(portfolio)
context.update(team)
context.update(blog)
context.update(contact)


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_herobiz_dental-3.2.0.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

django_herobiz_dental-3.2.0-py2.py3-none-any.whl (2.5 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file django_herobiz_dental-3.2.0.tar.gz.

File metadata

File hashes

Hashes for django_herobiz_dental-3.2.0.tar.gz
Algorithm Hash digest
SHA256 9f7cd650223c61e639ba6ce2a6f659a205d3b5135bcab53d4be3bf7165528205
MD5 f51587914f64b89c8d09b25dd4654c3b
BLAKE2b-256 00b4843a00c7d2077df33dfe1641bf799ad4748fbd4bb69100e5d8ff13d38b9d

See more details on using hashes here.

File details

Details for the file django_herobiz_dental-3.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_herobiz_dental-3.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c7e1b5208c1cf7b119776c5469e87f764f95d139ec9afdee4f9b8342b09e681e
MD5 ba3fa256689f55fc043cedcb812c1234
BLAKE2b-256 26149e0aa77d290e5da24db6f6d4292487e7859e183c190bfea6559fd63f01d9

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