Saravanan666/pypi-org huggingface dataset:
Package: django3-dpa-chile
Django Political-Administrative Division of ChileDivisión Política-Administrativa de Chile para Django=================================================Regiones - Provincias - Comunas=================================================This fork was created to update the package to work with the latest versions of Django 3.2+ (4.1 included) and Python, as theoriginal developerappears to be inactive.Information obtained from the api of Modernization and Digital Government Unithttps://apis.digital.gob.cl/dpaPypi====https://pypi.org/project/django3-dpa-chile/InstallationInstalldjango3-dpa-chileusingpippip install django3-dpa-chileAddd3_dpa_chiletoINSTALLED_APPSsettings.py# ...



INSTALLED_APPS =[

...

'd3_dpa_chile',

]



# ...Populatepython manage.py migrate d3_dpa_chile



python manage.py populate_dpa_chileUsefrom d3_dpa_chile.models import Region, Provincia, Comuna
Package: django3-easy-pdf
Django PDF rendering, the easy way.Developed aten.ig.ma software shop.Development VersionNote: A new PDF rendering backend using WeasyPrint for more accurate rendering is in development under the develop branch.
Seehttps://github.com/nigma/django-easy-pdf/pull/34for changes, testing and discussion.If you rely on thexhtml2pdfrendering backend and templates pin the package version todjango-easy-pdf>=0.1.1<0.2.0.OverviewThis app makes rendering PDF files in Django really easy.
It can be used to create invoices, bills and other documents
from simple HTML markup and CSS styles. You can even embed images
and use custom fonts.The library provides both Class-Based View that is almost a drop-in
replacement for Django’sTemplateViewas well as helper functions
to render PDFs in the backend outside the request scope
(i.e. using Celery workers).QuickstartIncludedjango-easy-pdf,xhtml2pdfin yourrequirements.txtfile.
If you are on Python 3 you need to install the latest version of Reportlab and the beta version of xhtml2pdf:$ pip install xhtml2pdf>=0.2b1Addeasy_pdftoINSTALLED_APPS.Create HTML template for PDF document and add a view that will render it:{%extends"easy_pdf/base.html"%}{%blockcontent%}<divid="content"><h1>Hithere!</h1></div>{%endblock%}fromeasy_pdf.viewsimportPDFTemplateViewclassHelloPDFView(PDFTemplateView):template_name='hello.html'You can also use a mixin to output PDF from Django generic views:classPDFUserDetailView(PDFTemplateResponseMixin,DetailView):model=get_user_model()template_name='user_detail.html'DocumentationThe full documentation is atdjango-easy-pdf.readthedocs.io.A live demo is ateasy-pdf.herokuapp.com.
You can run it locally after installing dependencies by runningpython demo.pyscript from the cloned repository or through Docker withmake demo.Dependenciesdjango-easy-pdfdepends on:django>=1.10xhtml2pdf>=0.2b1reportlabLicensedjango-easy-pdfis released under the MIT license.Other ResourcesGitHub repository -https://github.com/nigma/django-easy-pdfPyPi Package site -https://pypi.python.org/pypi/django-easy-pdfDocs -https://django-easy-pdf.readthedocs.io/Commercial SupportThis app and many other help us build better software
and focus on delivering quality projects faster.
We would love to help you with your next project so get in touch
by dropping an email aten@ig.ma.History0.1.1 (2017-04-19)Update for Django 1.11 and Python 30.1.0 (2014-01-24)First release
Package: django3-flatpages-tinymce
Aboutdjango3-flatpages-tinymceprovides on-site editing of "Flat Pages"
with minimal impact on the rest of code.  This is a fork of the original,
dropping support for python 2 and django < 3.0.django3-flatpages-tinymce is available under the MIT license.UsageFirst of all, you need to havedjango3-flatpages-tinymceanddjango-tinymceinstalled; for your convenience, recent versions
should be available from PyPI.pip install django-tinymce django3-flatpages-tinymceTo use, just add these applications to your INSTALLED_APPSafterdjango.contrib.flatpagesapp:INSTALLED_APPS = (
    ...
        'django.contrib.staticfiles',
        'django.contrib.flatpages',
        ...
        'tinymce',
        'flatpages_tinymce',
)As instructed by theflatpagesguide, add this to your
MIDDLEWARE_CLASSES:MIDDLEWARE_CLASSES = (
    ...
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)Remember that this little addition to yoururls.pyis required bydjango-tinymce:urlpatterns = patterns('',
    ...
    path('tinymce/', include('tinymce.urls')),
    ...
)Finally create the tables forflatpagesand install the JS/CSS files
using./manage.py nugrate
./manage.py collectstaticIf you want on-site editing of templates, you must editflatpagestemplates: change {{flatpage.content} to {% flatpage_admin flatpage %}
from flatpage_admin template library. So{% extends "base.html" %}
{% block body %}
{% endblock %}
{% block body %}
<h1>{{flatpage.title}}</h1>
{{flatpage.content}}
{% endblock %}will become{% extends "base.html" %}
{% load flatpage_admin %}
{% block body %}
<h1>{{flatpage.title}}</h1>
{% flatpage_admin flatpage %]
{% endblock %}If you are bothered with <script>/<link> tags, being inserted in
<body> tag and your template has something like {% block extrahead %},
you can move all plugin media in head, using {% flatpage_media %} tag.{% extends "base.html" %}
{% block extrahead %}
{% flatpage_media %}
{% endblock %}
{% block body %}
<h1>{{flatpage.title}}</h1>
{% flatpage_admin flatpage %}
{% endblock %}SettingsDefault settings are in flatpages_tinymce.settings.py file. Also, you
can override them in site-wide settings.py file. The main of them are:FLATPAGES_TINYMCE_ADMIN (default True) - use TinyMCE widget in
admin areaFLATPAGES_TINYMCE_FRONTEND (default True) - use TinyMCE widget in
frontendFLATPAGES_TEMPLATE_DIR (default: TEMPLATE_DIRS[0] +
'flatpages') - directory where flatpages templates are placedFLATPAGES USE_MINIFIED (defalut: not settings.DEBUG) - use
minified versions of JS/CSSFurther, you will want to change default settings of TinyMCE Editor.TINYMCE_DEFAULT_CONFIG = {
   # custom plugins
       'plugins': "table,spellchecker,paste,searchreplace",
   # editor theme
   'theme': "advanced",
   # custom CSS file for styling editor area
       'content_css': MEDIA_URL + "css/custom_tinymce.css",
       # use absolute urls when inserting links/images
       'relative_urls': False,
   }ChangesChanges in version 0.2Ported to support Django > 3 and Python 3drop support for RussianChanges in version 0.1First public release.
Package: django3-grapesjs
django_grapesjsA small library allows you to integrate the page builder “grapesjs” into django adminInstallpipinstalldjango_grapesjsThen add it to your INSTALLED_APPS:INSTALLED_APPS=('django_grapesjs',...'django.contrib.admin',)To work with the “template_choices”, need to add a url-template in the urls.py fileurlpatterns=[path('get_template/',GetTemplate.as_view(),name='dgjs_get_template'),]UsingJust import the field and add to your modelfromdjango.dbimportmodelsfromdjango_grapesjs.modelsimportGrapesJsHtmlFieldclassExampleModel(models.Model):html=GrapesJsHtmlField()...# default_html - path to the html file to display the default value# for the field when the form page is receivedhtml=GrapesJsHtmlField(default_html='default.html')# or default - if the page is simply statichtml=GrapesJsHtmlField(default=render_to_string('default.html'))...# use the redactor_config argument to select the configuration of the editor# Available:#     - redactor_config='base' - basic setting, most widgets are used#     - redactor_config='min' - minimum setting, only the most necessaryhtml=GrapesJsHtmlField(redactor_config='base')...# use apply_django_tag = True, if you want to apply render django or jinja tagshtml=GrapesJsHtmlField(default_html='default.html',apply_django_tag=True)...# use template_choices to select multiple templateshtml=GrapesJsHtmlField(template_choices=(('django_grapesjs/default.html','default'),))And then inherit “GrapesJsAdminMixin”, in the admin class of the current modelfromdjango.contribimportadminfromdjango_grapesjs.adminimportGrapesJsAdminMixin@admin.register(ExampleModel)classExampleAdmin(GrapesJsAdminMixin,admin.ModelAdmin):passYou can use special tags in your templates, for flexible customization<ignore></ignore>If you need to comment out some of the html code during the save,
but execute or display at the time editing in page builder - use this tag.
For example, if your template that uses django or jinja tags does not have any styles or javascript
(because they are in another place, for example, in “footer.html”), you can put css and js in this
tag, styles and javascript code in the editor will work, but when saved and used on the site there
will not be repeating fragments<hidden></hidden>If you are editing in the editor with apply_django_tag, you might be distracted by the additional:
{% exclude %}, {% include %}, {% for <expression> %}, etc; - use this tag. He temporarily hides
information, embedded in it during editing, and during the save returns to the original formCustom Settings# True if you want to save html and cssGRAPESJS_SAVE_CSS=False# default value# use the value of the field from the db - True, or use the global save editorGRAPESJS_DEFAULT_MODELS_DATA=True# default value# redefine the path to the html file, the markup from this file will be used by defaultGRAPESJS_DEFAULT_HTML='django_grapesjs/default.html'# default value# Add or redefine the configuration of the editorREDACTOR_CONFIG={'base':'django_grapesjs/redactor_config/base.html'}# default valueWarningthe library does not work in “inlines”Referencegrapesjs
Package: django3-leaf
django3-leafForked fromhttps://github.com/coremke/django-leafto provide django 3+ support. Render django templates based on URL path.Quick startInstall the package from pypi:pipinstalldjango3-leafAdd "leaf" and "mptt" to your INSTALLED_APPS:INSTALLED_APPS=(...'leaf','mptt',)Add leaf urls tothe endof your urlpatterns:url(r'^',include('leaf.urls')),Usagedjango-leaf can be used to render both "static" and database-backed templates.Static TemplatesIf you want to render a template when a user goes to/example/url/, create one of the following files:example/url.htmlexample/url/index.htmlpages/example/url.htmlpages/example/url/index.htmlDatabase Backed TemplatesAfter installing django-leaf, the admin interface will have a new section calledPageswhere you'll be able to create your page hierarchy.To define your own page model, you need to extend fromleaf.models.Page.
There are a few fields available for customization:identifier: A unique identifier for your model. This will be used to associate page nodes with your page implementation. If you don't provide anidentifier, one will be provided for you.template: The template to render.admin_page_inline: The admin class to use when rendering the template fields inline. This defaults to the defaultadmin.StackedInline.admin_inlines: A list of other inlines to add to the admin.Here's an example for creating a page with translations provided bydjango-parler:# admin.pyfromparler.adminimportTranslatableStackedInlineclassAboutPageInline(TranslatableStackedInline):pass# models.pyfromdjango.dbimportmodelsfromleaf.modelsimportPagefromparler.modelsimportTranslatableModel,TranslatedFieldsfrom.adminimportAboutPageInlineclassAboutPage(Page,TranslatableModel):admin_page_inline=AboutPageInlineidentifier='about-page'template="about.html"translations=TranslatedFields(headline=models.CharField(max_length=255),copy=models.TextField(blank=True))def__unicode__(self):returnself.headlineWhen rendering the template, all of the model fields will be available on thepagecontext variable:{{page.headline}}{{page.copy}}Home PageThe root page can be added to django-leaf by adding a new page withslug=homeandparent=None. All pages added under that will be added without thehomepart in the path.TODOBetter documentation.More configuration options.
Package: django3-livesync
What’s this project?It’s a simple Django application which will automatically reload
your browser everytime Django Development Server is restarted or
any static file or template changes. Besides this,
if you connect multiple browsers and devices on your development server,
these will be all synchronized.Quick start guideBefore installing, you’ll need to have a copy ofDjangoalready installed. For the
current release, Django 3 or newer is required.For further information, consult theDjango download page, which offers convenient
packaged downloads and installation instructions.InstallingAutomatic installation using PyPItype:pip install django3-livesyncBasic configuration and useOnce installed, you can add Django LiveSync to any Django-based
project you’re working on. The default setup will enable the following features.Every time django development server is reloaded, all connected browsers will automatically refresh.Every time a static file or template is updated, all connected browsers will automatically refresh.Your actions will be synchronized between all connected browsers and devices. Currently supports:Page scroll.Page reload.Element click.Form fields in general.IMPORTANT: Currently, it was only tested against Google Chrome and Mozilla Firefox web browsers.ConfigurationInstalling the applicationBegin by addinglivesyncto theINSTALLED_APPSsetting of
your project. By default, the daemon will start watching all your installed apps
template dirs.
You can also specify the following additional settings:LIVE_PORTThis is the number of the port on which live server will run.INCLUDED_APPSThis tells django livesync to only watch for changes in apps in this set.EXCLUDED_APPSThis tells django livesync to ignore changes on apps in this set.Setup MiddlewareAddlivesync.core.middleware.DjangoLiveSyncMiddlewareto theMIDDLEWARE_CLASSESsetting of your project.IMPORTANT NOTES:If you have ‘django.contrib.staticfiles’ application installed, you must register ‘django-livesync’ before it, otherwise live server will not launch.Django LiveSync will only execute if DEBUG is set to True.ExampleYou might have something like the following in your Django settings file:DEBUG = True

INSTALLED_APPS = (
    '...',
    'livesync',
    'django.contrib.staticfiles',
    '...',
)

DJANGO_LIVESYNC = {
    'PORT': 9999 # this is optional and is default set to 9001.
}

MIDDLEWARE_CLASSES = (
    'livesync.core.middleware.DjangoLiveSyncMiddleware',
)Once you’ve done this, runpython manage.py runserveras usual.
Package: django3-pki
AboutIt is Django application for manage of certificates in django admin.In this center you can create certificate authorities for all your certificates.Also you can create certificates for servers and for clients.DependenciespygraphvizInstallation and runfrom pypi:$ pip install django3-pkifrom github:$ git clone https://github.com/yaricp/django3-pki.gitUsage:Insert 'pki' inside INSTALLED_APPS in your django project.$ python manage.py migrate pki
$ python manage.py loaddata eku_and_kuAfter than needs to create folder for center of certificates.Go to https://:8000/admin/pki and push button "Refresh Metadata"Bingo! Your PKI center ready!You can manage your certificates in https://:8000/admin/pkiAuthorYaroslav Pisarevyaricp@gmail.com
Package: django3-preferences
Django 3 PreferencesA Django app and fork ofdjango_preferencesallowing the creation of site preferences in the Django admin panelWhat does it do?Provides a singleton view in the Admin panel for Preferences objects and an interface to allow the preferences to be used in code or in templates.How is it different from django_preferences?This is a fork and revision of thedjango_preferencespackage, which has not been updated in a number of years. The main changes are:Since most users only manage one site, the dependency ondjango.contrib.siteshas been removed, which makes for a nicer user experience.The ability to save and add more records has been disabled in this version, so that only one preferences object can ever exist.This package is built to work with Django 3.1 and above.RequirementsPython 3Django 3.1 and aboveInstallationRunpip3 install django3-preferencesAddpreferencesto yourINSTALLED_APPSIf you want your preferences exposed in your templates, then add thepreferences.context_processors.preferences_context_processorto yourTEMPLATES>OPTIONS>context-processorssetting:TEMPLATES=[{...'OPTIONS':{'context_processors':[...'preferences.context_processors.preferences_context_processor',],},},]UsageTo create preferences for your app, create a Django model with the model inheriting from preferences.models.Preferences.fromdjango.dbimportmodelsfrompreferences.modelsimportPreferencesclassSitePreferences(Preferences):logged_in_user_can_view=models.BooleanField(default=False)You can then access these preferences in views or other modules by importing thepreferencesmodule. The preferences are exposed underpreferences.<Model_Name>.<Preference_Name>frompreferencesimportpreferenceslogged_in_user_can_view=preferences.SitePreferences.logged_in_user_can_viewTo manage the preferences in the Admin panel (which is the whole point of installing this package!!), register them in your app'sadmin.py:fromdjango.contribimportadminfrompreferences.adminimportPreferencesAdminfrom<App_Name>.modelsimportSitePreferencesadmin.site.register(SitePreferences,PreferencesAdmin)Finally, if you've added the context processor in step 3 of the usage section, then you can access your preferences in the template by typing:{{preferences.SitePreferences.logged_in_user_can_view}}CreditsOriginal project:django_preferencesDjango 3 revision:Matt Rudge
Package: django3-registration
This is an extensible user-registration application for Django.  It
was forked of the “2.x” branch ofthis project.That project completely changed its approach to registrations in version
3.0.  It eliminated models entirely and made many other big changes.
Converting an existing 2.x project to 3.0 was proving to be
prohibitively time consuming, so this fork was created to allow the
older approach to work under Python 3 and newer versions of Django.Full documentation isavailable online.Installation$ pip install django3-registration
Package: django4.0-oss-storage
Django AliCloud OSS Storagedjango-oss-storageprovides a Django AliCloud OSS file storage.FeaturesDjango file storage for AliCloud OSSDjango static file storage for AliCloud OSSWorks in Python 2 & 3InstallationInstall$pipinstalldjango-oss-storageAdd'django_oss_storage'to yourINSTALLED_APPSsettingSet yourDEFAULT_FILE_STORAGEsetting to"django_oss_storage.backends.OssMediaStorage"Set yourSTATICFILES_STORAGEsetting to"django_oss_storage.backends.OssStaticStorage"Configure your AliCloud OSS settings (Refer below).Use the following settings for file storage.STATICFILES_STORAGE='django_oss_storage.backends.OssStaticStorage'DEFAULT_FILE_STORAGE='django_oss_storage.backends.OssMediaStorage'Authentication settingsUse the following settings to authenticate with AliCloud OSS.# AliCloud access key IDOSS_ACCESS_KEY_ID=<YourAccessKeyID># AliCloud access key secretOSS_ACCESS_KEY_SECRET=<YourAccessKeySecret>Storage settingsFor public or public-read buckets, storage urls will be bucket_name.endpoint/key formatFor private buckets, storage urls will be signed url. The expires time can be set by OSS_EXPIRE_TIME as environment variable or as Django settings. The default value for OSS_EXPIRE_TIME is 30 days.OSS_EXPIRE_TIME=<ExpireTimeinSeconds>File storage settingsUse the following settings to configure AliCloud OSS file storage.# The name of the bucket to store files inOSS_BUCKET_NAME=<Yourbucketname># The URL of AliCloud OSS endpoint# Refer https://www.alibabacloud.com/help/zh/doc-detail/31837.htm for OSS Region & EndpointOSS_ENDPOINT=<Youraccessendpoint># The default location for your filesMEDIA_URL='/media/'Staticfiles storage settingsAll of the file storage settings are available for the staticfiles storage.# The default location for your static filesSTATIC_URL='/static/'staticfiles provides command ‘collectstatic’. Run following command to collect all sub-folder ‘static’ of each appand upload to STATIC_URL.$pythonmanage.pycollectstaticTestingFirst set the required AccessKeyId, AccessKeySecret, endpoint and bucket information for the test through environment variables (Do not use the bucket for the production environment).Take the Linux system for example:$exportOSS_ACCESS_KEY_ID=<AccessKeyId>$exportOSS_ACCESS_KEY_SECRET=<AccessKeySecret>$exportOSS_BUCKET_NAME=<bucket>$exportOSS_ENDPOINT=<endpoint>Support and announcementsDownloads and bug tracking can be found at themain project website.LicenseMIT.
Package: django4-background-tasks
NoteThis is an adaptation of django-background-tasks that removes django-compat and makes other small changes to allow compatilibity with Django 4.0.It is also compatible with Django 3 (at least).Django Background Task is a database-backed work queue for Django, loosely based aroundRuby’s DelayedJoblibrary. This project was adopted and adapted fromlilspikeydjango-background-task.To avoid conflicts on PyPI we renamed it to django-background-tasks (plural). For an easy upgrade from django-background-task to django-background-tasks, the internal module structure were left untouched.In Django Background Task, all tasks are implemented as functions (or any other callable).There are two parts to using background tasks:creating the task functions and registering them with the schedulersetup a cron task (or long running process) to execute the tasksDocsSeeRead the docs.
Package: django4-bootstrap-daterangepicker
django-bootstrap-daterangepickerThis is Django form field wrapper forbootstrap-daterangepicker, for use with Bootstrap 3 and 4.This module allows for: single date pickers, date range selectors and datetime range selectors.Ranges are returned as tuples of format(start, end), wherestartandendare datetime.date or datetime.datetime objects depending on the field type.The DateField is a replacement for Django's built-informs.DateField, with the only difference being that it accepts an optionalclearableparameter, and the default widget is the DatePickerWidget specified in this module.OriginThis is unofficial package. No changes exceptissue#23.Installationpip install django-bootstrap-daterangepickerAdd'bootstrap_daterangepicker'to yourINSTALLED_APPSAdd the resource links required forbootstrap-daterangepickerinto the<head>of the relevant HTML filesExample usagefromdjangoimportformsfrombootstrap_daterangepickerimportwidgets,fieldsclassDemoForm(forms.Form):# Date Picker Fieldsdate_single_normal=fields.DateField()date_single_with_format=fields.DateField(input_formats=['%d/%m/%Y'],widget=widgets.DatePickerWidget(format='%d/%m/%Y'))date_single_clearable=fields.DateField(required=False)# Date Range Fieldsdate_range_normal=fields.DateRangeField()date_range_with_format=fields.DateRangeField(input_formats=['%d/%m/%Y'],widget=widgets.DateRangeWidget(format='%d/%m/%Y'))date_range_clearable=fields.DateRangeField(required=False)# DateTime Range Fieldsdatetime_range_normal=fields.DateTimeRangeField()datetime_range_with_format=fields.DateTimeRangeField(input_formats=['%d/%m/%Y (%I:%M:%S)'],widget=widgets.DateTimeRangeWidget(format='%d/%m/%Y (%I:%M:%S)'))datetime_range_clearable=fields.DateTimeRangeField(required=False)RequirementsBootstrap>= 3jQuery>= 1Moment.js>= 2.10.6bootstrap-daterangepicker>= 2Django>= 4.0
Package: django4-cron
DeprecatedPlease usehttps://github.com/iMerica/dj-rest-authas this project is no longer maintained. Thanks!django-cronDjango-cron lets you run Django/Python code on a recurring basis providing basic plumbing to track and execute tasks. The 2 most common ways in which most people go about this is either writing custom python scripts or a management command per cron (leads to too many management commands!). Along with that some mechanism to track success, failure etc. is also usually necesary.This app solves both issues to a reasonable extent. This is by no means a replacement for queues like Celery (http://celeryproject.org/) etc.Documentationhttp://django-cron.readthedocs.org/en/latest/This open-source app is brought to you by Tivix, Inc. (http://tivix.com/)