Saravanan666/pypi-org huggingface dataset:
Package: django-tink-fields
Django Tink FieldsLeveragesGoogle Tinkto encrypt Django's core model fields. This work is heavily based on the work ofDjango Fernet Fieldswhich seems to have been abandoned last few years.InstallationUsepipto installdjango-tink-fields:pipinstalldjango-tink-fieldsEditsettings.pyand introduce a configuration section forTINK_FIELDS_CONFIG:TINK_FIELDS_CONFIG={"default":{"cleartext":False,"path":"/path/to/an/encryted_keyset.json",},"another":{"cleartext":True,"path":"/path/to/a/cleartext_keyset.json",}}Tink keysets can be created viatinkeyand may optionally be wrapped via a key-management system such asAWS KMSorGCP KMS.To create a cleartext keyset for testing purposes:tinkeycreate-keyset--out-formatjson--outtest_plaintext_keyset.json--key-templateAES128_GCMAlternatively, to create an encrypted keyset that is wrapped byGCP KMS, specify--master-key-urias follow:tinkeycreate-keyset--out-formatjson--outtest_encrypted_keyset.json--key-templateAES128_GCM--master-key-uri=gcp-kms://projects/foo1/locations/global/keyRings/foo2/cryptoKeys/foo3To learn more abouttinkeyread the relevant documentation.ExamplesThe following model creates an encrypted char field that makes use of thedefaultkeyset.fromdjango.dbimportmodelsfromtink_fieldsimportEncryptedCharFieldclassSomeModel(models.Model):some_value=EncryptedCharField(max_length=32)You may specify a specific keyset by providing akeysetkeyword argument:fromdjango.dbimportmodelsfromtink_fieldsimportEncryptedCharFieldclassAnotherModel(models.Model):some_value=EncryptedCharField(max_length=32,keyset="another")Supported field types include:EncryptedCharField,EncryptedTextField,EncryptedDateField,EncryptedDateTimeField,EncryptedEmailField, andEncryptedIntegerField.Associated DataThe encrypted fields make use ofAuthenticated Encryption With Associated Data (AEAD)which offers confidentiality and integrity within the same mode of operation. This allows the caller to specify a cleartext fragment namedadditional authenticated data (aad)to the encryption and decryption operations and receive cryptographic guarantees that the ciphertext data has not been tampered with.To specify theaadfragment, provide a callback functionaad_callbackin the keyword arguments:fromdjango.dbimportmodelsfromtink_fieldsimportEncryptedCharFieldclassAnotherModel(models.Model):some_value=EncryptedCharField(max_length=32,aad_callback=lambdax:b"some value")The value passed to the callback is the instance of the model field, with a signature ofCallable[[models.Field], bytes]. As a reminder, the associated data isnotencrypted sodo not store sensitive data in it.AcknowledgementsGoogle TinkDjango Fernet FieldsAuthors@script3r
Package: django-tint
UsageYou must define your transformation in yourTINT_TRANSFORMATIONSsettings
variable.You set your images on your models puting aForeignKeytotint.models.Image.Then you put your images in your templates using theat_transformationfilter. Example:{% load tint %}

<img src="{{ mymodel.my_image_field|at_transformation:"my-transformation-definition" }}" />If you use django-jinja you only have to use theimage_at_transformationfunction. Example:<img src="{{ image_at_transformation(mymodel.my_image_field, "my-transformation-definition") }}" />Default ImageProc ActionsDjango-tint default Image Processor comes with some actions, here you have the
list:ActionDescriptionParamscropCrop an image to a width and
height.height, width, align,
valignscaleScale an image to a width and
height (deforming it).height, widthfitScale an image to a width and
height and crop the overflow.height, width, align,
valignwatermarkPaste a watermark on a image.watermark_image, opacitygrayscaleConvert the image to
grayscale.flipFlip the image vertically.mirrorFlip the image horizontally.equalizeEqualize the image histogram.autocontrastMaximize (normalize) image
contrast.cutoffinvertInvert the image colors.convertConvert image mode (L, RGB or
CYMK).modeConfigurationIn Django-tint you can define yourImageProcclass (normally will be a subclass
of theDefaultImageProc) to add your own image transformations. You can use it
configuring theTINT_IMAGE_PROCESSORsettings variable. Example:TINT_IMAGE_PROCESSOR = 'myapp.my_image_processor_module.MyImageProcessorClass'If the variable is not defined theDefaultImageProcis used.Then you can configure your transformations as a dictionary. The name of the
transformation is the key, and the value is a list of “actions”. An action is a
dictionary with one key ‘action’ with the name of the action, and the other
keys the parameters to use in this action. Example:TINT_TRANSFORMATIONS = {
  'example1': [
      {
          "action": 'fit',
          "width": 1024,
          "height": 768,
          "align": 'center',
          "valign": 'middle',
      },
      {
          "action": 'watermark',
          "image": 'example.watermark.png',
          "opacity": 0.5,
      },
  ],
  'example2': [
      {
          "action": 'fit',
          "width": 800,
          "height": 600,
          "align": 'center',
          "valign": 'middle',
      },
      {
          "action": 'watermark',
          "image": 'example.watermark.png',
          "opacity": 0.5,
      },
  ]
}You can define the the removing of deleted images or thumnails model instances,
remove the image file with the settingsTINT_KEEP_THUMBNAILSandTINT_KEEP_IMAGES, the default value is True to both settings.You can define your file output format and your file output extension with the
settingsTINT_IMAGE_OUTPUT_FORMATandTINT_IMAGE_OUTPUT_EXTENSION. The
default value is None this means use the same format and extension of the
origin file. Example:TINT_IMAGE_OUTPUT_FORMAT = "png"
TINT_IMAGE_OUTPUT_EXTENSION = ".png"
Package: django-tinycontent
WARNING: This code is entirely unsupported, 0.9.0 will be the last
release of django-tinycontent.django-tinycontent is a simple Django application for re-usable
content blocks, much like django-boxes.Installation is simple:pip install django-tinycontentAddtinycontentto yourINSTALLED_APPS.Usage in templates is simple:{% load tinycontent_tags %}

{% tinycontent_simple 'content_name' %}Or, to specify a value if a content block by the given name cannot be
found, use:{% load tinycontent_tags %}

{% tinycontent 'content_name' %}
This will be shown if no matching object is found.
{% endtinycontent %}The name of the content block can also be a context variable, using
both the simple and the complex variants.Content blocks themselves can be added and edited using Django’s admin
interface. If a block with the name given in the template tag cannot
be found, either nothing is rendered (if usingtinycontent_simple), or the text betweentinycontentandendtinycontentis rendered (if using the more complex variant).To apply custom filters to your content, setTINYCONTENT_FILTERto
a dotted path to a callable that takes the raw content and returns the
transformed content. You can also setTINYCONTENT_FILTERto be a
list of dotted paths to callables, to chain filters together.django-tinycontent supports all versions of Django from 2.0 to
3.0. Python 3.6, 3.7 and 3.8 are supported.
Package: django-tiny-erp
tiny-erpEnterprise Resource Planning (ERP) for tiny companiesInstallationInstall the app:pip install django-tiny-erpAdd the tiny-erp apps toINSTALLED_APPS.INSTALLED_APPS=[# the usual django stuff"tiny_erp","tiny_erp.apps.locations","tiny_erp.apps.products","tiny_erp.apps.purchases","small_small_hr",'model_reviews','django_comments',]Runmanage.py migrateso that Django will create the model_review tables.Set up thedjango-model-reviewsandsmall-small-hrapps.
Package: django-tinylinks
A Django application that adds an URL shortener to your site similar to bit.ly.InstallationYou need to install the following prerequisites in order to use this app:pip install django
pip install requestsWhen using Python 2.6, you will also need to install importlib.If you want to install the latest stable release from PyPi:$ pip install django-tinylinksIf you feel adventurous and want to install the latest commit from GitHub:$ pip install -e git://github.com/bitmazk/django-tinylinks.git#egg=tinylinksAddtinylinksto yourINSTALLED_APPS:INSTALLED_APPS = (
    ...,
    'tinylinks',
)Add thetinylinksURLs to yoururls.py:urlpatterns = [
    url(r'^s/', include('tinylinks.urls')),
]Don’t forget to migrate your database:./manage.py migrate tinylinksSettingsTINYLINK_LENGTHDefault: 6Integer representing the number of characters for your tinylinks. This setting
is used when the app suggests a new tinylink. Regardless of this setting users
will be able to create custom tinylinks with up to 32 characters.TINYLINK_CHECK_INTERVALDefault: 10Number of minutes between two runs of the check command. This number should be
big enough so that one run can complete before the next run is scheduled.TINYLINK_CHECK_PERIODDefault: 300Number of minutes in which all URLs should have been updated at least
once. If this is 300 it means that within 5 hours we want to update all URLs.IfTINYLINK_CHECK_INTERVALis 10 it means that we will run the command
every 10 minutes. Combined with a total time of 300 minutes, this means that we
can execute the command 300/10=30 times during one period.Now we can devide the total number of URLs by 30 and on each run we will
update the X most recent URLs. After 10 runs, we will have updated all URLs.UsageJust visit the root URL of the app. Let’s assume you hooked the app into yoururls.pyats/, then visityoursite.com/s/. You will see your tinylist
overview. Go toyoursite.com/s/create/to see a form to submit a new long URL.After submitting, you will be redirected to a new page which shows the
generated short URL. If you want this URL to have a different short URL, just
change the short URL to your liking.Now visityoursite.com/s/yourshorturland you will be redirected to your long
URL.ContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your forkmkvirtualenv-ppython2.7django-tinylinksmakedevelopgitco-bfeature_branchmaster# Implement your feature and testsgitadd.&&gitcommitgitpush-uoriginfeature_branch# Send us a pull request for your feature branchIn order to run the tests, simply executetox. This will install two new
environments (for Django 1.8 and Django 1.9) and run the tests against both
environments.
Package: django-tinymce
django-tinymcedjango-tinymceis a Django application that contains a widget to render a form field as a TinyMCE editor.QuickstartInstall django-tinymce:$pipinstalldjango-tinymceAdd tinymce to INSTALLED_APPS in settings.py for your project:INSTALLED_APPS=(...'tinymce',)Add tinymce.urls to urls.py for your project:urlpatterns=[...path('tinymce/',include('tinymce.urls')),]In your code:fromdjango.dbimportmodelsfromtinymce.modelsimportHTMLFieldclassMyModel(models.Model):...content=HTMLField()django-tinymceuses staticfiles so everything should work as expected, different use cases (like using widget instead of HTMLField) and other stuff is available in documentation.ReleasesLatest release is 3.7.1. It supports Python 3.8+ and Django 3.2 to 5.0.Using TinyMCE 5.10.7.Previous releases can be found on github, but they are no longer maintained.Documentationhttps://django-tinymce.readthedocs.org/Support and updatesUse github issueshttps://github.com/jazzband/django-tinymce/issuesLicenseOriginally written by Joost Cassee.This program is licensed under the MIT License (see LICENSE.txt)
Package: django-tinymce4
django-tinymce4===**django-tinymce4** is a Django application that contains a widget to render a form field as a TinyMCE editor.WARNING:===v3.0 uses TinyMCE v4.x and is not backwards compatible w/ previous versions.Quickstart:===Install requirements:$ pip install -r requirements.txtInstall django-tinymce:$ pip install django-tinymce4Add tinymce to INSTALLED_APPS in settings.py for your project:INSTALLED_APPS = (...'tinymce',)Add tinymce.urls to urls.py for your project:urlpatterns = patterns('',...(r'^tinymce/', include('tinymce.urls')),)In your code:from django.db import modelsfrom tinymce.models import HTMLFieldclass MyModel(models.Model):...content = HTMLField()**django-tinymce4** uses staticfiles so everything should work as expected, different use cases (like using widget instead of HTMLField) and other stuff is available in documentation.Documentation:===http://django-tinymce.readthedocs.org/Support and updates:===You can contact me directly at aljosa.mohorovic@gmail.com, track updates at https://twitter.com/maljosa or use github issues.Be persistent and bug me, I often find myself lost in time so ping me if you're still waiting for me to answer.License (and related information):===Originally written by Joost Cassee.This program is licensed under the MIT License (see LICENSE.txt)
Package: django-tinymce-4
django-tinymce-4IntegrateTinyMCE4inDjangoprojects withDjango FilebrowserFeaturesSupport onlyTinyMCE4.SupportDjango Filebrowser.Installpipinstalldjango-tinymce-4Add applications to INSTALLED_APPS in settings.py for your project(order is important):INSTALLED_APPS=('tinymce_4','grappelli','filebrowser','django.contrib.admin',)Add theDjango Filebrowsersite to your url-patterns (before any admin-urls):url(r'^grappelli/',include('grappelli.urls')),url(r'^admin/',include([url(r'^',include(admin.site.urls)),url(r'^filebrowser/',include(fb_site.urls)),])),Usagefromtinymce_4.fieldsimportTinyMCEModelFieldfromdjango.dbimportmodelsclassModelFoo(models.Model):content=TinyMCEModelField('Foo content')Custom SettingsBase Settings: /tinymce_4/static/tinymce_4/settings/full/setings.jsMenu: /tinymce_4/static/tinymce_4/settings/full/menu.jsPlugins: /tinymce_4/static/tinymce_4/settings/full/plugins.jsExternal plugins: /tinymce_4/static/tinymce_4/settings/full/external_plugins.jsTemplates: /tinymce_4/static/tinymce_4/settings/full/templates.jsDemocddjango-tinymce-4/example/pipinstall-rrequirements.txtpythonmanage.pyrunserverContributingCreate an issue to discuss about your ideaFork itCreate your feature branch:git checkout -b new-featureCommit your changes:git commit -am ‘Add some feature’Push to the branch:git push origin new-featureCreate a newPull RequestProfit!Setup environmentInstall npm packagescddjango-tinymce-4/npminstallRun examplecddjango-tinymce-4/examplepythonmanage.pyrunserverBuild cssgulpcssBranchesmaster - latest release branchdevelop - development branch for new releases
Package: django-tinymce4-widget
django-tinymce4-widgetDocumentation:https://django-tinymce4-widget.readthedocs.ioSource Code:https://github.com/browniebroke/django-tinymce4-widget[!IMPORTANT]
The latest version of TinyMCE (at time of writing) is version 6. This package is -and will stay- focused on TinyMCE 4 only. I no longer use this package myself so I have no incentive to keep it up to date. I recommend moving to a maintained alternative likeJazzbandor alternatively fork it.django-tinymce4-widgetis a reworked fork ofdjango-tinymce4-lite. It provides a minimalTinyMCE 4editor widget that can be used in Django forms.This versiondoes notinclude any static files, it's using the TinyMCE from the CDN by default.CompatibilityPython: 3.8-3.12Django: 3.2-5.0Quick StartInstalldjango-tinymce4-widget:$ pip install django-tinymce4-widgetAddtinymcetoINSTALLED_APPSinsettings.pyfor your Django project:INSTALLED_APPS=(...'tinymce',)Addtinymce.urlstourls.pyfor your project:urlpatterns=[...path('tinymce/',include('tinymce.urls')),...]In your code:fromdjango.dbimportmodelsfromtinymceimportHTMLFieldclassMyModel(models.Model):...content=HTMLField('Content')In Django Admin the widget is used automatically for all models that haveHTMLFieldfields. If you are using TinyMCE 4 in your website forms, addform.mediavariable into your templates:<!DOCTYPE html><html><head>...{{form.media}}</head><body>...</body></html>
Package: django-tinymce-lite
django-tinymce-litedjango-tinymce-liteis a Django application that contains a widget
to render a form field as a TinyMCE editor. This package provides same
namespace asdjango-tinymce, but
grabs latest stable tinymce static files from CDN.QuickstartInstall django-tinymce-lite:$pipinstalldjango-tinymce-liteAdd tinymce to INSTALLED_APPS in settings.py for your project:INSTALLED_APPS=(...'tinymce',)In your code:fromdjangoimportformsfromtinymce.widgetsimportTinyMCEfrom.modelsimportFooBarclassFooBarModelForm(forms.ModelForm):classMeta:model=FooBarfields=['content1']widgets={'content1':TinyMCE}Configurationdjango-tinymce-liteis configured through django settings mechanism.
Following options are availiable:# Url to tinymce init jsTINYMCE_JS='//cdn.tinymce.com/4/tinymce.min.js'# If you need pass extra static files for all tinymce widgetTINYMCE_EXTRA_MEDIA={'js':[],'css':{}}# Config, that passed to tinyMCE.init functionsTINYMCE_CONFIG={'selector':'.django-tinymce','theme':'modern','relative_urls':False,}For tinymce configuration, read more onsite.ReleasesLatest release is 1.0.0. It’s support python 2.7, 3.4, 3.5, 3.6 and
Django >= 1.7.Support and updatesUse github issueshttps://github.com/vanadium23/django-tinymce-lite/issuesLicenseOriginally written by Aljosa Mohorovic.Much inspired by django-select2.This program is licensed under the MIT License (see LICENSE)
Package: django-tinyschedule
A small package for managing schedules in DjangoDocumentationThe full documentation is athttps://django-tinyschedule.readthedocs.org.QuickstartInstall django-tinyschedule:pip install django-tinyscheduleThen use it in a project:import tinyscheduleFeaturesEasily define schedules using the Schedule modelMake your own Schedule-like models by extending ScheduleBaseTiny and lightweight, easy to graspHistory0.1.0 (2015-02-03)First release on PyPI.0.1.1 (2015-02-04)Add AbstractSchedule0.1.2 (2015-02-04)Renamed package fromscheduleto a less general nametinyscheduleto avoid conflicts.0.1.3 (2015-02-05)Small bugfix: if you subclass AbstractSchedule, you will now get your own class when usingScheduleManager.lookup(...)0.1.4 (2015-03-10)Bugfix in __getitem__
Package: django-tips
Show tip of the day cards on your site.QuickstartInstall django-tips:pip install django-tipsThen use it in a project:import tipsRequirementsdjangodjangorestframeworkmarkdownRecommanded packagesdjango-sekizaiBuilding frontendFrom tips_frontend directory run:npm run devor production build:npm run buildUsageplace where you want to show tips:{% include "tips/tips.html" %}include csrf-token ajax setup script if you have csrf protection enabled (you can find the script in the example):<script src="{% static "js/csrf_token.js" %}"></script>Developmentpip install poetry
poetry install
cd example
./manage.py migrate
./manage.py loaddata fixtures/initial_data.json
./manage.py createsuperuser
./manage.py runserverCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackage
Package: django_tlsauth
* Django-TLSAuthDjango-TLSAuth integrates a minimal certificate authority (CA) andimplements TLS client certificate authentication. It depends on nginxfor handling the TLS authentication part.** Installation#+BEGIN_SRC shpip install django_tlsauth#+END_SRCDjango-TLSAuth depends on tlsauth which provides minimal tools toact as a CA. Please follow the "CA and https service install" stepsfrom https://github.com/stef/tlsauth to set up your webserver and CA.After setting up the CA, you should also configure it in django,put something like this with adjusted paths into your settings.py:#+BEGIN_SRC pythonfrom tlsauth import CertAuthorityTLS_CA=CertAuthority('<path-to-CA>')TLS_ADMINGROUPS=['CA admins']TLS_SCRUTINIZER=None # supply your own function authorizing automatic signaturesTLS_BLINDSIGN=False  # blindly sign incoming CSRs#+END_SRCIf you want to enable the admin to the mini-CA add to your urls.py#+BEGIN_SRC pythonurl(r'^tlsauth/', include('django_tlsauth.urls')),#+END_SRC** tlsauth decoratorDjango-TLSAuth provides a simple decorator to guard your entry points:#+BEGIN_SRC pythonfrom django.http import HttpResponse, HttpResponseRedirectfrom django_tlsauth.views import tlsauthdef unauth(request):return HttpResponseRedirect('/')@tlsauth(unauth=unauth, groups=['helloworldophobians'])def hello(request):return HttpResponse("hello world")#+END_SRC** Managing certsDjango-TLSAuth provides a few default routes to manage the certs andthe CA.*** /tlsauth/register/Visitors can register like on a normal site, but when done, they get aPKCS12 certificate ready to be saved and imported in allbrowsers. This is totally automatic and there's no check if thespecified organization is not a privileged one (like "CA admins" inthe above example). This really provides no security, for bots andscripts it's even easier to use these certs than for normal humans.Other mechanisms must be deployed to provide meaningful authentication.*** /tlsauth/certify/Visitors can submit their Certificate Signing Request (can be easilygenerated using gencert.sh from tlsauth), which depending onconfiguration either returns automatically a signed certificate (nomeaningful authentication this way, avoid this!), or it gets storedfor later approval by the "CA admins".*** /tlsauth/cert/Returns the CA root certificate in PEM format, for import into your browser.*** /tlsauth/csrs/Displays a list of incoming CSRs to any certified member of the "CAadmin" group. The certs can be either rejected or signed, in the latercase the resulting certificate is sent to the email address of thesubject.*** /tlsauth/test/Displays whether you are TLS authenticated and what your distinguished name is.
Package: django-tls-middleware
# django-tls-middleware[![Build Status](https://travis-ci.org/sekomy/django-tls-middleware.svg?branch=master)](https://travis-ci.org/sekomy/django-tls-middleware)Stores the current request in [Thread Local Storage](https://en.wikipedia.org/wiki/Thread-local_storage).### Installation```bashpip install django-tls-middleware```### Configuration```python# settings.pyMIDDLEWARE = [...'tls_middleware.TLSMiddleware',]```### Usage```pythonfrom tls_middleware import get_requestrequest = get_request()# do something useful with current request object```
Package: django-tls-rvanlaar
This is a fork from:https://github.com/sorl/django-tlsStores the current request inThread Local StorageusingWerkzeug.Installation:pip install git+https://github.com/rvanlaar/django-tlsConfiguration:# settings.py
 MIDDLEWARE = [
     'tls.TLSRequestMiddleware',
     ...
]Usage:from tls import request
# do something dangerous and useful with current request objectWorried about security? then read thisthread.
Package: django-tmdb3
# django-tmdb [![Build Status](https://travis-ci.org/rbeagrie/django-tmdb.svg?branch=master)](https://travis-ci.org/rbeagrie/django-tmdb) [![Coverage Status](https://coveralls.io/repos/github/rbeagrie/django-tmdb/badge.svg?branch=master)](https://coveralls.io/github/rbeagrie/django-tmdb?branch=master) [![Code Climate](https://codeclimate.com/github/rbeagrie/django-tmdb/badges/gpa.svg)](https://codeclimate.com/github/rbeagrie/django-tmdb)
A django app for displaying information from tmdb
Package: django-tmmis
Настройкаpython-mpipinstalldjango~=4.0mssql-django
django-adminstartprojectconfigДобавляем подключение к БД МИС в файлеconfig/config/settings.py:DATABASES={'default':{...},'tmmis':{'ENGINE':'mssql','NAME':'ИМЯ БД','USER':'sa','PASSWORD':'ПАРОЛЬ К БД','HOST':'АДРЕС СЕРВЕРА','PORT':1433,'OPTIONS':{'driver':'ODBC Driver 17 for SQL Server',},}}Интроспекция БДUnix:pythonconfig/manage.pyinspectdb--database=tmmis{table_name}>tmmis/models/{table_name}.pyWindows:py.\config\manage.pyinspectdb--database=tmmis{table_name}>.\tmmis\models\{table_name}.py
Package: django-toast-messages
Django toast messagesLink to repository:https://github.com/Arpaso/toastmessageProvides django template tag for displaying toast message for 10 seconds after window load.Usagetemplate.html:<link rel="stylesheet" href="{{ STATIC_URL }}css/jquery.toastmessage.css">

<script src="{{ STATIC_URL }}/js/jquery.toastmessage.js"></script>
<script type="text/javascript">
    $().toastmessage('showSuccessToast', "Hello there! Message is shown.");
</script>
{% include "toastmessages_fragment.html" %}Written by the development team of Arpaso company:http://arpaso.comRegards tojQuery-powered sexy floating messages -http://akquinet.github.com/jquery-toastmessage-plugin/