You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 week ago | |
---|---|---|
src/ktools | 1 week ago | |
.gitignore | 3 weeks ago | |
.isort.cfg | 3 weeks ago | |
LICENSE | 3 weeks ago | |
README.md | 1 week ago | |
__init__.py | 3 weeks ago | |
setup.py | 1 week ago |
README.md
Ktools
This module contains boilerplate for python projects, mostly based on django.
Contents
Django
ktools.django.db.models.fields.PositiveAutoField
A mysql-based AutoField
that will use an UNSIGNED INT
for a primary field.
Use this in django's settings.py
:
DEFAULT_AUTO_FIELD = 'ktools.django.db.models.fields.PositiveAutoField'
Cache
ktools.cache.functional.memoized_method
A decorator to cache return values of a method (of a class) until the class is used. Parameters are that of lru_cache()
since it uses that function under the hood.
ktools.django.utils.text.slugify
Function to return an ASCII-safe slugified string from any utf-8 string.