Saravanan666/pypi-org huggingface dataset:
Package: django-kp-static-version
kp_static_version is a simple Django app to add
a version number to static files and force browsers to use the latest version of the file.Quick startInstall django-kp-static-version:pip install django-kp-static-versionAdd “kp_static_version” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'kp_static_version',
]Load templatetags into your template:{% load kp_static %}Load your static file:<script src="{% vstatic "js/sample.js" %}"></script>If in your settings.py the variableDEBUG = Truethen arandom numberwill be generated
for development otherwise the valueKP_STATIC_VERSIONwill be used:KP_STATIC_VERSION = "0.5"The result:<script src="/static/js/sample.js?v=0.5"></script>
Package: django-krate
Django Kaleidos Rate is a django application for rate objects.ConfigurationConfigure the app in your setting INSTALLED_APPS:INSTALLED_APPS = [
   ...
   krate,
   ...
]DBRateHandler configurationconfigure the dbratehandler, for example:INSTALLED_APPS = [
   ...
   krate.ratehandlers.dbratehandler,
   ...
]Configure the rate handler on settings.py, for example:KRATE_RATE_HANDLER = "krate.ratehandlers.dbratehandler.DBRateHandler"If you want to have an copy of the average rate stored in the models add the
KRateableMixin to your models, for example:from krate.ratehandlers.dbratehandler.models import KRateableMixin

class MyModel(models.Model, KRateableMixin):
    ... # My model definition...If you want to show and manage the valorations of the objects in the admin
panel add a new inline to your models admin classes, for example:from django.contrib.contenttypes.generic import GenericTabularInline
from krate.ratehandlers.dbratehandler.models import ObjRate, ObjRateAggregate

class ObjRateInline(GenericTabularInline):
    model = ObjRate

class ObjRateAggregateInline(GenericTabularInline):
    model = ObjRateAggregate

class MyModelAdmin(admin.ModelAdmin):
    model = models.MyModel
    inlines = [MyOtherInlines, ...,  ObjRateAggregateInline, ObjRateAggregateInline]UsageNow you can use rate_object in your views to store the rate from users, and use
the {% krate object %} and {% mykrate request_or_user object %} to get the average rate, and my
own rate.
Package: django-kss
Help you launch your style guide site with django in KSS syntax. you can integrate the style giude in your site easily.
I use it every day. feel free to give me any suggestion.I now change the name to django-kss-styleguidehttps://pypi.python.org/pypi/django-kss-styleguide/startpip install django-kss-styleguideSettingsin yout settings.pyAdd the app,INSTALLED_APPS+=("compressor","django_kss",)Related Settingsin settings.pybecause scss is very common, we support it via djagno compressor
Add setting  about django compressor.COMPRESS_PRECOMPILERS=(('text/x-scss','django_libsass.SassCompiler'),)STATICFILES_FINDERS=('django.contrib.staticfiles.finders.FileSystemFinder','django.contrib.staticfiles.finders.AppDirectoriesFinder','compressor.finders.CompressorFinder',)#  Django Compressor for development. so it can put image to correct placeCOMPRESS_ENABLED=TrueCOMPRESS_REBUILD_TIMEOUT=0STATIC_ROOT='/tmp/root'in your app.add filename called styleguide.py in your app.styleguide={'source_dir':'static/css','verbose_name':'Sample APP2',#Optional'target_files':'static/css/form.scss'# optional}source_dir:  Where you write you kss comment and css filesverbose_name:  Your app nametarget_files:  If you use scss, put the scss file you want to compileurls.py settingsRouting, add the following two lines in your project’s urls.pyimport:importdjango_kss.urlsadd the url patterns:url(r'^$',include(django_kss.urls)),htmlfor F2E or designerput your complete html in templates/prototype/you can view it automatically in the siteWriting The KSS in your scss/less/css file/*
Buttons

Styleguide 1
*//*
Your standard form button.

.btn-danger   -  danger
.btn-warning  -  warning
.btn-info     -  info


Example:
        <button class="liftedBtn $modifier_class" >按鈕</button>

Styleguide 1.1
*/.liftedBtn{@extend.btn;position:relative;border-width:0;letter-spacing:1px;border-bottom-color:rgba(30,30,30,0.3);border-bottom-width:0;transition:all0.2s;bottom:0;&:hover{bottom:$strong-border-width;border-bottom-width:$strong-border-width;}}One More Thingsthe base template is already integrate livereload.to utilize livereload,sudopipinstalllivereloadand type ‘livereload .’ in you repository root.you can see all the braowser will reflect your change
Package: django-kss-styleguide
Help you launch your style guide site with django in KSS syntax. you can integrate the style giude in your site easily.
I use it every day. feel free to give me any suggestion.I now change the name to django-kss-styleguidehttps://pypi.python.org/pypi/django-kss-styleguide/startpip install django-kss-styleguideSettingsin yout settings.pyAdd the app,INSTALLED_APPS+=("compressor","django_kss",)Related Settingsin settings.pybecause scss is very common, we support it via djagno compressor
Add setting  about django compressor.COMPRESS_PRECOMPILERS=(('text/x-scss','django_libsass.SassCompiler'),)STATICFILES_FINDERS=('django.contrib.staticfiles.finders.FileSystemFinder','django.contrib.staticfiles.finders.AppDirectoriesFinder','compressor.finders.CompressorFinder',)#  Django Compressor for development. so it can put image to correct placeCOMPRESS_ENABLED=TrueCOMPRESS_REBUILD_TIMEOUT=0STATIC_ROOT='/tmp/root'in your app.add filename called styleguide.py in your app.styleguide={'source_dir':'static/css','verbose_name':'Sample APP2',#Optional'target_files':'static/css/form.scss'# optional}source_dir:  Where you write you kss comment and css filesverbose_name:  Your app nametarget_files:  If you use scss, put the scss file you want to compileurls.py settingsRouting, add the following two lines in your project’s urls.pyimport:importdjango_kss.urlsadd the url patterns:url(r'^$',include(django_kss.urls)),htmlfor F2E or designerput your complete html in templates/prototype/you can view it automatically in the siteWriting The KSS in your scss/less/css file/*
Buttons

Styleguide 1
*//*
Your standard form button.

.btn-danger   -  danger
.btn-warning  -  warning
.btn-info     -  info


Example:
        <button class="liftedBtn $modifier_class" >按鈕</button>

Styleguide 1.1
*/.liftedBtn{@extend.btn;position:relative;border-width:0;letter-spacing:1px;border-bottom-color:rgba(30,30,30,0.3);border-bottom-width:0;transition:all0.2s;bottom:0;&:hover{bottom:$strong-border-width;border-bottom-width:$strong-border-width;}}One More Thingsthe base template is already integrate livereload.to utilize livereload,sudopipinstalllivereloadand type ‘livereload .’ in you repository root.you can see all the braowser will reflect your change
Package: django-ktag
django tag input fieldHome|DocumentationInstallpipinstalldjango-ktagRequirementspython 3+django 2+Quick StartThe settingsAdd ‘ktag’ application to the INSTALLED_APPSINSTALLED_APPS=[...'ktag',]Make sureAPP_DIRSis True in TEMPLATESTEMPLATES=[...'APP_DIRS':True,...]The form classBuilding a form in Django like this:fromdjangoimportformsfromktag.fieldsimportTagFieldclassTagForm(forms.Form):fruits=TagField(label='fruits',place_holder='write your fruits',delimiters=' ',data_list=['apple','banana','watermelon','orange'],initial='grape coconut')The viewTo handle the form we need to instantiate it in the view for the URL where we want it to be published:fromdjango.httpimportHttpResponsefromdjango.shortcutsimportrenderfromexample.formsimportTagFormdefindex(request):ifrequest.method=='POST':form=TagForm(request.POST)ifform.is_valid():print(form.cleaned_data['fruits'])returnHttpResponse(str(form.cleaned_data['fruits']))else:form=TagForm()returnrender(request,'index.html',{'form':form})The templateThe simplest example is:<formaction=""method="post">{%csrf_token%}{{form}}<br><inputtype="submit"value="OK"style="font-size: larger"></form>
Package: django-ktdatatable-view
Django KTDatatable ViewThis package is a base view for handling server side processing for the awesomeKTDatatable, it simplifies handling of
sorting, filtering and creating JSON output, as defined
atKTDatatable Ajax Response.Dependencies:Python>= 3.6Django>= 2.2ExampleKuruman is a sample project that uses django-ktdatatable-viewhttps://kuruman.longbowou.comhttps://gitlab.com/longbowou/kurumanUsage1 Install the package:pipinstalldjango-ktdatatable-view
Package: django-kubernetes-manager
Django Kubernetes Manager 0.4.7Django Kubernetes Manager is an open source project to wrap the complexity of Kubernetes management in the simplicity of Django Rest Framework.IntroductionOur engineering team has developed several data processing apps, and
found celery wasn’t quite enough for dispatching heavier tasks.
We decided to try Kubernetes Jobs, and while pleased with performance,
wanted a less verbose, more object oriented way to interact with our clusters.And thus Django Kubernetes Manager was spawned. Using Django Rest Framework and
the kubernetes client library, our devs came up with the idea to treat each object
we’d be deploying as a Model instance, and use the DRF viewsets and actions to
create an RESTful API framework from which we could extend for each projects
particular needs.LicenseThis project is license under the MIT license.Please see the license dir for dependency licenses.DocsReadTheDocsInstallationInstall the app using pip:$ pip install django-kubernetes-managerGetting StartedAdd “kubernetes_manager” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'kubernetes_manager',
]Include the kubernetes_manager URLconf in your project urls.py like this:path('dkm/', include('kubernetes_manager.urls')),To create models in your database, run:python manage.py migrate

* Requires Postgresql or other database with JSON support.Start the development server and visithttp://127.0.0.1:8000/admin/to configure a TargetCluster (you’ll need the Admin app enabled).Create, update, delete, deploy, or remove a Kubernetes object
using the api :)
Package: django-kuldeep
=====
kuldeepKuldeep is a Django app to conduct Web-based kuldeep. For each question,
visitors can choose between a fixed number of answers.Detailed documentation is in the "docs" directory.Quick startAdd "kuldeep" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
...
'rest_framework',
'kuldeep',]Include the kuldeep URLconf in your project urls.py like this::
instead from django.urls import pathuse thisfrom django.urls import path, include
from kuldeep.views import HarvestViewSet, BreadViewSetrouter = routers.DefaultRouter()router.register(r'harvest', HarvestViewSet),
router.register(r'bread', BreadViewSet),urlpatterns = [
path('admin/', admin.site.urls), # for admin
path('', include(router.urls)), # for routers
]Runpython manage.py migrateto create the kuldeep models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a poll (you'll need the Admin app enabled).Visithttp://127.0.0.1:8000/harvestor /bread to test postman collection.
Package: django-kungfu
django-kungfudjango-kungfuprovides the ability to set-up the Django configuration
mechanism so it’s fairly easy to integrate development or deployment-related
settings overrides.The idea came after I used for a while the beatiful configuration system
implemented inFlask. In fact, the majority of the code was inspired
by the Flask implementation locatedhere.Usage by exampleThe integration with your Django project is fairly easy and depends on your
preferences. One possible set-up could look like this:# At the bottom of your/settings.py file just add the following lines
from django_kungfu import Configurator
config = Configurator(locals())
config.from_pyfile(os.path.join(os.path.dirname(__file__), 'dev_settings.py'))
config.from_envvar('DJANGO_SETTINGS_OVERRIDE')In short, this is what happens when the django settings file is loaded:
# if the dev_settings.py file is found in the same directory as the settings file,
all the upper-case constants are loaded into local context overriding the existing
ones
# if the DJANGO_SETTINGS_OVERRIDE environment variable is set and is pointing to
a valid configuration file, that configuration file is loaded in the same wayBy default, if the specified files or environment variables are not found or
are not valid, the configurator will fail silently. This is useful for example
when using development settings which are not available in a production system
and we want to keep a single settings file as a configuration entry point.If you want to enforce the presence of a particular configuration file or
environment variable you can usesilent=Falsewith the respective
methods.Having this configuration, you can easily set-up a production environment
by setting the appropriate environment variable in you production wsgi file:# prod.wsgi
import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings")
os.environ.setdefault("DJANGO_SETTINGS_OVERRIDE",
                      os.path.expanduser("~/etc/myproject/prod_settings.py"))

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()Why kungfu?This name was selected because kungfu pronounced in my natal language (a regional
dialect of Romanian) sounds similar to config (confu). And of course my sympathy for martial
arts, and especially for kung fu, brought a few points.
Package: django-kvideos
Django Kaleidos Videos is a django application for add videos (from services
like youtube or vimeo) to any model.Suported video servicesYoutubeVimeoConfigurationConfigure the app in your setting INSTALLED_APPS:INSTALLED_APPS = [
   ...
   kvideos,
   ...
]Configure, if you want, the default video size in your settings.py:KVIDEOS_DEFAULT_SIZE = "640x480"For easy access to the videos, add to your models a generic relation to kvideos.models.Video model, for example:from kvideos.models import Video
from django.contrib.contenttypes.generic import GenericRelation

class MyModel(models.Model):
    ... # my fields
    videos = GenericRelation(Video)For integrate it with the admin panel, you can add a new inline to your models admin classes, for example:from django.contrib.contenttypes.generic import GenericTabularInline
from kvideos.models import Video

class VideoInline(GenericTabularInline):
    model = Video

class MyModelAdmin(admin.ModelAdmin):
    model = models.MyModel
    inlines = [MyOtherInlines, ...,  VideoInline]UsageNow you can add videos to any of your models, and can show this on your web page througth the embed_video template tag, for example:<div>
  {% for video in myobject.videos.all %}
    {% if forloop.first %}
      {{ video.title }}
      {% embed_video video 800x600 %} <!-- Big video first -->
      {{ video.description }}
    {% else %}
      {{ video.title }}
      {% embed_video video %} <!-- Default size videos -->
    {% endif %}
  {% endfor %}
</div>
Package: django-kvmodel
KVModelprovides a very convenient way to create key-value models with
just two lines of code.from kvmodel.models import KVModel

class SystemSettings(KVModel):
    """
    SystemSettings Model now extends KVModel, and you will
    be able to access the key and the value fields on that Model
    """InstallationYou can Installdjango-kvmodelfrom PyPI.pip installdjango-kvmodelConfigurationAddkvmodelto yourINSTALLED_APPSsetting::INSTALLED_APPS = (
    ...
    'kvmodel',
    ...
)This will enable kvmodel, form more advanced settings please check the advanced
section.UsageKVModelis an abstract model that has two fieldskeyandvalue.keyis a uniqueCharField.valueis aSerializableFieldwhich means that it’s type is restored when
loading an instance from the database, check out the advanced section for more
details aboutSerializableField.Defining key-value modelsExtendKVModelto create a key-value model:from kvmodel.models import KVModel

class Settings(KVModel):
    passCreating instancesYou can create Instances the same way you will use a Django Modelsetting =Settings(key='dragons_in_store',value=123)for a persistent instancesetting =Settings.create(key='dragons_in_store',value=123)Retrieving instancesyou can use Django filters to retrieve data from your model, however you
shouldn’t use the value field to search for data.there is also a method to retrieve objects using their key:setting =Settings.get_by_key('dragons_in_store')which is equivalent to:setting =Settings.get(key='dragons_in_store')Advanced UsageSerializableFieldthis is a custom field that extendsTextField, it encodes the data before
saving and decodes it once an instance is loaded from the database.you can useSerilizableFieldlike this:from kvmodes.models import KVModel
from kvmodel.fields import SerilizableField

class SystemSettings(KVModel):
    default = SerialiableField()By defaultSerializableFielduses JSON for de-serializing data however you
can define your custom de-serializers.theserializefunction is called before the object is saved to the database,
it should accept the value and returns a string.thedeserializefunction is called when loading an instance from the data base,
it should accept a string and return the restored valueDefining Custom serializer/derserilizerdefine the functions you want to use as de-serilizers:aes_serialize(value):
    return aes_encrypt(json.dumps(value), key='super secret key')

aes_deserialize(s):
    return json.loads(aes_decrypt(s, key='super secret key'))next you should update theKVMODELsetting:KVMODEL = {
    'SERIALIZE_FUNCTION': 'appname.modulename.aes_serilize',
    'DESERIALIZE_FUNCTION': 'appname.modulename.aes_deserialize'
}
Package: django-kvstore
An extensible key-value store backend for Django applications.This module provides an abstraction layer for accessing a key-value storage.Configuring your key-value store is a matter of adding a statement in this
form to your Django settings module:KEY_VALUE_STORE_BACKEND = 'scheme://store?parameters'Whereschemeis one of the following, persistent stores:db (local table accessed through Django’s database connection)googleappengine (Google AppEngine data store)sdb (Amazon SimpleDB)tokyotyrant (Tokyo Tyrant)And some non-persistent stores, provided mainly for testing purposes:locmemmemcachedstoreandparametersvaries from one backend to another. Refer
to the documentation included in each backend implementation for further
details.You can define a django_kvstore-backed custom model, in a fashion similar
to Django models (although it does not support querying, except by primary
key lookup).Here’s an example of a custom model class using django_kvstore:from django_kvstore import models

class MyData(models.Model):
    my_key = models.Field(pk=True)
    foo = models.Field()
    bar = models.Field()Typical usage for such a model:key = "something_unique"
data = MyData.get(key)
if data is None:
    data = MyData(my_key=key)
    data.foo = "foo"
    data.bar = "bar"
    data.save()and deletion:key = "something_unique"
data = MyData.get(key)
if data is not None:
    data.delete()
Package: django-kvtags
Extensible tags in Django.Tags can be associated with any django model. You can add as many key-value pairs to the tags as you wish.TagManagerThe best way to use django-kvtags is through TagManager.
First, add TagManager to your model to which you will add tags:class YourModel(models.Model):
    # your stuff
    objects = models.Manager()
    tags = TagManager()If you want django-kvtags to use cache when it’s possible, pass the cache name with cache parameter to TagManager:class YourModel(models.Model):
    # your stuff
    objects = models.Manager()
    tags = TagManager(cache='default')add (obj, **kwargs)Adds tags matched by kwargs to obj.add_by_kv (obj, **kwargs)Adds tags whose key-values are matched by kwargs to obj.remove (obj, **kwargs)Removes tags matched by kwargs from obj.remove_by_kv (obj, **kwargs)Removes tags whose key-values are matched by kwargs from obj.filter (obj, **kwargs)Returns QuerySet of Tags bound to obj and matched by kwargs.get_list (obj)Returns a list of Tag model instances bound to objget_id_list (obj)Returns a list of IDs of Tags bound to objget_digest_list (self, obj)Returns a list of objects which contains digested data of Tags bound to obj.
If cache is available and set, this method stores tag and item-tag dictionaries in the cache in order to make a lot less SQL queries.Using APIdjango-kvtags supportstastypie.TagResource# urls.py
from kvtags.api import TagResource

tag_resource = TagResource()

urlpatterns = patterns('',
    # The normal jazz here...
    (r'^api/', include(tag_resource.urls)),
)or# urls.py
from tastypie.api import Api
from kvtags.api import TagResource

your_api = Api(api_name='v1')
# Your other resources
your_api.register(TagResource())


urlpatterns = patterns('',
    # The normal jazz here...
    (r'^api/', include(your_api.urls)),
)TaggedItemResourceTaggedItem has generic relation to your models. If you don’t need to resolve the relations,
you can include TaggedItemResource to your API just as you include TagResource.However, if you want to resolve generic relations, you should create a new class based on
TaggedItemResource by yourself. Then, add the new class to the API as usual.Example:# urls.py
from kvtags.api import TaggedItemResource
from tastypie.contrib.contenttypes.fields import GenericForeignKeyField
from yourapp.models import Spam, Egg
from yourapp.api import SpamResource, EggResource

class MyTaggedItemResource(TaggedItemResource):
    content_object = GenericForeignKeyField({
        Spam: SpamResource,
        Egg: EggResource
    }, 'content_object')Adding Tags Field to a ResourceIf you want to add the tags associated with a model to the model’s resource, you can do that by using get_list or get_digest_list methods as follow:class YourModelResource(ModelResource):
    # your stuff
    tags = fields.ListField()

    def dehydrate_tags(self, bundle):
        return YourModel.tags.get_digest_list(bundle.obj)
Package: django-l10n-extensions
inline translation of your Django web application in the browserL10N model field to enable translation of database contentL10N unit models e.g. Area  (m2, acres, hectares, etc.) or Temperature(°C, °F, K)Home-page:https://github.com/ceasaro/django-l10n-extensionsAuthor: Cees van Wieringen
Author-email:ceesvw@gmail.comLicense: UNKNOWN
Description: Extend Django with L10N features.inline translation of your Django web application in the browserL10N model field to enable translation of database contentL10N unit models e.g. Area  (m2, acres, hectares, etc.) or Temperature(°C, °F, K)Platform: UNKNOWN
Package: django-label-tag-attr
Add css classes and html tag attributes to form’s label in django templates.
This library can render a form label likedjango-widget-tweaksThe license is MIT.Installation$ pip install django-label-tag-attrThen add ‘label_tag_attr’ to INSTALLED_APPS.UsagePrevious(Use django-widget-tweaks only){% load widget_tweaks %}<labelid="{{ form.text.auto_id }}"class="control-label">{{ form.text.label }}</label>{% render_label form.text class="form-control" %}Use django-label-tag-attrrender_labeltemplate tag for customizing form’s label by using an HTML-like syntax.{% load label_tag_attr %}
{% load widget_tweaks %}

{% render_label form.text class="control-label" %}
{% render_field form.text class="form-control" %}ResourcesGithubPyPICHANGES1.0.0 (2015-03-29)Initial release1.0.2 (2015-05-09)Support django1.8 and python2.7.Bug fixed.