One of the my demiansoft apps
Project description
django-utilsds
Introduction
demiansoft 에서 사용하는 장고앱 django-utilsds
Requirements
Django >= 5.0.3
Install
>> pip install django-utilsds
settings.py
INSTALLED_APPS = [
...
'django_utilsds',
]
Composition
여러가지 유틸리티 태그 모음앱으로 현재 split 태그 사용가능하다.
html 파일 내에서 다음 코드를 삽입하여 사용한다.
{% load django_utilsds_tags %}
{{ "test/utils/app"|split:"/" }}
-> ['test', 'utils', 'app']
{% load django_utilsds_tags %}
{{ "test_utils_app"|underscore_to_hypen }}
-> test-utils-app
value 값을 / 을 단위로 나눠서 리스트 형식으로 반환한다.
또는 views.py 에서 직접 불러서 사용할수 있다.
from django_utilsds import utils
get_json(path: str) - json 형식의 데이터 파일을 불러온다.
mail_to(title: str, text: str, mail_addr) - 메일을 보낸다.
make_robots() - robots.txt에 해당하는 내용을 만들어 반환한다.
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_utilsds-0.5.2.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for django_utilsds-0.5.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | deb4acdb86c7041dceae4b93e215167830299b5a9f7fed3b0b3ebcd6d2057f29 |
|
MD5 | 4d42867c908f970536d527c839799ac4 |
|
BLAKE2b-256 | 42d60ebeeda9a0ccc22213f497f600399c1fed042858ea4e075f0d15e0aa898b |