Saravanan666/pypi-org huggingface dataset:
Package: django-countable-field
Countable Field is a simple Django custom for widget for displaying a
text area with the current word count displayed underneath. It can be
set up to display the count in red when the current word count is out
of required minimum or maximum word count for the form field.Quick startAdd “countable_field” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'countable_field',
]2. In the form, set the field’s widget to be “CountableWidget”, passing
the minimum and maximum word count as additional parameters, such as:self.fields['essay_response'].widget = \
            CountableWidget(attrs={'data-min-count': this.essay_min_length,
                                   'data-max-count': this.essay_max_length})
Package: django-countdowntimer-model
AboutThe goal of this library is to allow you to inherit an abstract model in your model and turn it into a countdown time with pause and resume capability.Simply import, inherit and your model is now a timer without worrying about the complexity involved in timekeeping.This library is written to return the countdown value based on timestamps and thus does not require complicated backgroundtickprocesses.Minimum RequirementsPython 3.7Django 3.0.7InstallationRun the following in your project.pipinstalldjango-countdowntimer-modelIn yoursettings.pfile please add:INSTALLED_APPS=[# ..."countdowntimer_model",# ...]UsageFirst you must import the abstraction into yourmodelfile.fromcountdowntimer_model.modelsimportCountdownTimerAfterwords your model must inherit the abstraction.classDoomsdayCountdownTimer(CountdownTimer):# ...When you create your model, it is essential you set theduration_in_minutesandstatefields. Afterwords the model will handle the rest. Please note
if you want to override to use a custom timezone then you can set thetimezone_overridefield.doomsday_timer=DoomsdayCountdownTimer.object.create(duration_in_minutes=123,state=DoomsdayCountdownTimer.STATE.RUNNING,)Now that the object has been created you can get the latest countdown by running
the following:remaining_t=doomsday_timer.remaining_time()# // Returned in `time` format.orremaining_minutes=doomsday_timer.remaining_time_in_minutes()# // Returned in `integer` format.LicenseThis library is licensed under theBSD 2-Clause License. SeeLICENSEfor more information.
Package: django-counter-cache-field
It is sometimes useful to cache the total number of objects associated with another object through a ForeignKey
relation. For example the total number of comments associated with an article.django-counter-field makes it easy to denormalize and keep such counters up to date.Quick startInstall django-counter-field:pip install django-counter-cache-fieldAdd “django_counter_field” to your INSTALLED_APPS setting:INSTALLED_APPS = (
    ...
    'django_counter_cache_field',
)Add a CounterCacheField to your model:from django_counter_field import CounterCacheField


class Article(models.Model):
    comment_count = CounterCacheField()Connect the related foreign key field with the counter field in your signals:connect_counter('comment_count', Comment.article)Whenever a comment is created the comment_count on the associated Article will be incremented. If the comment is
deleted, the comment_count will be automatically decremented.OverviewCreating a new counter requires three simple steps:Add aCounterCacheFieldfield to the parent model.Add theCounterMixinmixin to the child model.Useconnect_counterto connect the child model with the new counter.Most counters are simple in the sense that you want to count all child objects. Sometimes, however, objects should be
counted based on one or several conditions. For example you may not wish to countallcomments on an article but
only comments that have been approved. You can create conditional counters by providing a thirdis_in_counter_funcargument toconnect_counter:connect_counter(‘comment_count’, Comment.article, lambda comment: comment.is_approved)Theis_in_counter_funcfunction will be called withCommentobjects and must returnTrueif the given comment
should be counted. It must not concern itself with checking if the comment is deleted or not, django-counter-field
does that by default.BackfillingOften you will add aCounterCacheFieldto a model that already has a large number of associated objects. When a counter
is created, it’s value is initialized to zero. This value is likely incorrect. django-counter-field provides a couple
of management commands that allow you to rebuild the value of a counter:List all available counters:$ python manage.py list_countersRebuild a counter using one of the counter names given bylist_counters:$ python manage.py rebuild_counter <counter_name>Note: Therebuild_countermanagement command will only update counters on objects that have at least one child
object. For example articles with at least one comment. Articles with no comments  will not be updated. This
is a conscious limitation; the use cases for such a feature seem very limited, if existent at all.Documentation$ pip install Sphinx
$ cd docs
$ make html
Open build/html/index.html
Package: django-counter-cache-fuxy
It is sometimes useful to cache the total number of objects associated with another object through a ForeignKey
relation. For example the total number of comments associated with an article.django_counter_cache_fuxy makes it easy to denormalize and keep such counters up to date.Quick startInstall django_counter_cache_fuxy:pip install django_counter_cache_fuxyAdd “django_counter_cache_fuxy” to your INSTALLED_APPS setting:INSTALLED_APPS = (
    ...
    'django_counter_cache_fuxy',
)Add a CounterCacheField to your model:from django_counter_cache_fuxy import CounterCacheField


class Article(models.Model):
    comment_count = CounterCacheField()Connect the related foreign key field with the counter field in your signals:connect_counter('comment_count', Comment.article)Whenever a comment is created the comment_count on the associated Article will be incremented. If the comment is
deleted, the comment_count will be automatically decremented.OverviewCreating a new counter requires three simple steps:Add aCounterCacheFieldfield to the parent model.Add theCounterMixinmixin to the child model.Useconnect_counterto connect the child model with the new counter.Most counters are simple in the sense that you want to count all child objects. Sometimes, however, objects should be
counted based on one or several conditions. For example you may not wish to countallcomments on an article but
only comments that have been approved. You can create conditional counters by providing a thirdis_in_counter_funcargument toconnect_counter:connect_counter(‘comment_count’, Comment.article, lambda comment: comment.is_approved)Theis_in_counter_funcfunction will be called withCommentobjects and must returnTrueif the given comment
should be counted. It must not concern itself with checking if the comment is deleted or not, django_counter_cache_fuxy
does that by default.BackfillingOften you will add aCounterCacheFieldto a model that already has a large number of associated objects. When a counter
is created, it’s value is initialized to zero. This value is likely incorrect. django_counter_cache_fuxy provides a couple
of management commands that allow you to rebuild the value of a counter:List all available counters:$ python manage.py list_countersRebuild a counter using one of the counter names given bylist_counters:$ python manage.py rebuild_counter <counter_name>Note: Therebuild_countermanagement command will only update counters on objects that have at least one child
object. For example articles with at least one comment. Articles with no comments  will not be updated. This
is a conscious limitation; the use cases for such a feature seem very limited, if existent at all.Documentation$ pip install Sphinx
$ cd docs
$ make html
Open build/html/index.html
Package: django-counter-field
It is sometimes useful to cache the total number of objects associated with another object through a ForeignKey
relation. For example the total number of comments associated with an article.django-counter-field makes it easy to denormalize and keep such counters up to date.Quick startInstall django-counter-field:pip install django-counter-fieldAdd “django_counter_field” to your INSTALLED_APPS setting:INSTALLED_APPS = (
    ...
    'django_counter_field',
)Add a CounterField to your model:from django_counter_field import CounterField


class Article(models.Model):
    comment_count = CounterField()Add the CounterMixin to the related model:from django_counter_field import CounterMixin, connect_counter


class Comment(CounterMixin, models.Model):
    article = models.ForeignKey(Article)Connect the related foreign key field with the counter field:connect_counter('comment_count', Comment.article)Whenever a comment is created the comment_count on the associated Article will be incremented. If the comment is
deleted, the comment_count will be automatically decremented.OverviewCreating a new counter requires three simple steps:Add aCounterFieldfield to the parent model.Add theCounterMixinmixin to the child model.Useconnect_counterto connect the child model with the new counter.Most counters are simple in the sense that you want to count all child objects. Sometimes, however, objects should be
counted based on one or several conditions. For example you may not wish to countallcomments on an article but
only comments that have been approved. You can create conditional counters by providing a thirdis_in_counter_funcargument toconnect_counter:connect_counter(‘comment_count’, Comment.article, lambda comment: comment.is_approved)Theis_in_counter_funcfunction will be called withCommentobjects and must returnTrueif the given comment
should be counted. It must not concern itself with checking if the comment is deleted or not, django-counter-field
does that by default.BackfillingOften you will add aCounterFieldto a model that already has a large number of associated objects. When a counter
is created, it’s value is initialized to zero. This value is likely incorrect. django-counter-field provides a couple
of management commands that allow you to rebuild the value of a counter:List all available counters:$ python manage.py list_countersRebuild a counter using one of the counter names given bylist_counters:$ python manage.py rebuild_counter <counter_name>Note: Therebuild_countermanagement command will only update counters on objects that have at least one child
object. For example articles with at least one comment. Articles with no comments  will not be updated. This
is a conscious limitation; the use cases for such a feature seem very limited, if existent at all.Documentation$ pip install Sphinx
$ cd docs
$ make html
Open build/html/index.html
Package: django-counter-field-py3
It is sometimes useful to cache the total number of objects associated with another object through a ForeignKey
relation. For example the total number of comments associated with an article.django-counter-field makes it easy to denormalize and keep such counters up to date.Quick startInstall django-counter-field:pip install django-counter-field-py3Add “django_counter_field” to your INSTALLED_APPS setting:INSTALLED_APPS = (
    ...
    'django_counter_field_py3',
)Add a CounterField to your model:from django_counter_field_py3 import CounterField


class Article(models.Model):
    comment_count = CounterField()Add the CounterMixin to the related model:from django_counter_field_py3 import CounterMixin, connect_counter


class Comment(CounterMixin, models.Model):
    article = models.ForeignKey(Article)Connect the related foreign key field with the counter field:connect_counter('comment_count', Comment.article)Whenever a comment is created the comment_count on the associated Article will be incremented. If the comment is
deleted, the comment_count will be automatically decremented.OverviewCreating a new counter requires three simple steps:Add aCounterFieldfield to the parent model.Add theCounterMixinmixin to the child model.Useconnect_counterto connect the child model with the new counter.Most counters are simple in the sense that you want to count all child objects. Sometimes, however, objects should be
counted based on one or several conditions. For example you may not wish to countallcomments on an article but
only comments that have been approved. You can create conditional counters by providing a thirdis_in_counter_funcargument toconnect_counter:connect_counter(‘comment_count’, Comment.article, lambda comment: comment.is_approved)Theis_in_counter_funcfunction will be called withCommentobjects and must returnTrueif the given comment
should be counted. It must not concern itself with checking if the comment is deleted or not, django-counter-field
does that by default.BackfillingOften you will add aCounterFieldto a model that already has a large number of associated objects. When a counter
is created, it’s value is initialized to zero. This value is likely incorrect. django-counter-field provides a couple
of management commands that allow you to rebuild the value of a counter:List all available counters:$ python manage.py list_countersRebuild a counter using one of the counter names given bylist_counters:$ python manage.py rebuild_counter <counter_name>Note: Therebuild_countermanagement command will only update counters on objects that have at least one child
object. For example articles with at least one comment. Articles with no comments  will not be updated. This
is a conscious limitation; the use cases for such a feature seem very limited, if existent at all.Documentation$ pip install Sphinx
$ cd docs
$ make html
Open build/html/index.html
Package: django-counter-widget
Counter WidgetCounter Widget is a simple widget made up of two buttons and a number input. Two buttons are used to increase and decrease the input value.InstallationIn terminal:pip install django-counter-widgetAdd the app in your INSTALLED_APPS settingsINSTALLED_APPS = [
    ...
    'counter_widgets',
]How To UseYou can use the CounterWidget for your forms IntegerField.from counter_widgets import CounterWidget

class YourForm(forms.Form):
    counter_field = forms.IntegerField(widget=CounterWidget)In the template where you are rendering YourForm, include the following line{{ form.media }}where "form" is the name of the context variable that refers to the form containing the counter widget. If you do not include the above line in the template, the increase (+) and decrease (-) buttons will not work.
{{form.media}} will add the following line in the rendered HTML<script src="/static/counter_widgets/js/counter.js"></script>Customising the WidgetYou can create your own customized widget from Counterwidget. You can change increment text, decrement text, delta (increment/decrement amount default is 1), you can have different values ​​for increment and decrement.
In the following we have customized counter widget increment_text, decrement_text, increment_value, decrement_valueclass TestForm(forms.Form):
    count = forms.IntegerField(widget=CounterWidget(
        increment_text="Add 100",
        decrement_text="Subtract 50",
        increment_value=100,
        decrement_value=50))Another exampleclass TestForm(forms.Form):
    count = forms.IntegerField(widget=CounterWidget(delta=100))
Package: django-count-it
=====Counter=====Counter is a simple Django app to create counters.Detailed documentation is in the "docs" directory.Quick start-----------1. Add "counter" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'counter',]2. Run `python manage.py migrate` to create the counter models.3. Start the development server and visit http://127.0.0.1:8000/admin/to create a counter (you'll need the Admin app enabled).
Package: django-countries-geoextent
Django Countries GeoExtentThis package adds ageo_extentattribute to
thedjango-countriesCountryobject.Thegeo_extentattribute represents the geographic extent of a country, as extracted
fromGADM 4.1boundaries data.Installationpip install django-countries-geoextentUsageOnce installed, use theDjango Countryas
described in thedocs.A new attribute namedgeo_extentwill be added to a Country object instance, that represents the geographic extent of
the country, as obtained fromGADM 4.1boundaries data.If a country is not found, thegeo_extentattribute will beNone
Package: django-countries-states-cities
django-countries-states-cities1. InstallationThe preferred installation method is directly from pypi:# Install django-countries-states-cities$pipinstall-Udjango-countries-states-citiesThis Django library is built using theCountries States Cities Database.2. QuickstartInsettings.py:INSTALLED_APPS=['modeltranslation','django.contrib.admin',...,'import_export','countries_states_cities']LANGUAGES=[("en","English"),("ko","Korean"),("ja","Japanese"),('zh-hans','Simplified Chinese'),# 간체 중국어('zh-hant','Traditional Chinese'),# 번체 중국어("es","Spanish"),("ru","Russian"),("ar","Arabic"),]Inurls.py:fromdjango.urlsimportpath,includeurlpatterns=[...,path('csc/',include('countries_states_cities.urls')),]3. Database SetupRun the following commands to set up the database:# Create migration files for countries_states_cities models$pythonmanage.pymakemigrationscountries_states_cities# Apply migrations to create countries_states_cities models$pythonmanage.pymigrate4. Loading Initial DataTo load initial data into the database, run the custom command:$pythonmanage.pycsc_loaddata_csvThis command will import data from predefined CSV files into the database.5. Further ConfigurationFor further configuration and usage instructions, please refer to the official documentation.The MIT LicenseCopyright (c) 2023 Runners Co.,Ltd.Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: django-country-and-language-flags
Language-Flags is a simple Django app that helps display national flags. For
efficiency, there is just one huge PNG file with all the flags, and
individual flags are selected for display using CSS trickery.This module provides tools for display of country flags based on their country code
and sets of flags of nations where a particular language is spoken.Quick startAdd “language_flags” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'language_flags',
]In templates where you want to use language_flags, include the
language_flags template tag library:{% load language_flags_tags %}and include css or min.css in HTML<head>:<link rel="stylesheet" type="text/css" href="{% static 'css/flags.css' %}">Don’t forget{% load staticfiles %}at the top of your template.You can use theflags_for_languagetag to display a number
of flags of nations where a language is spoken. Right now the
language can be either English or German:{% flags_for_language COUNT LANGUAGE %}This will display COUNT flags for language LANGUAGE; the flags will
always include the first country listed for LANGUAGE, while the
remainder will be randomly selected from the other countries.If the LANGUAGE code is equal to existing country code,
one flag of related country is displayed.AcknowledgmentsThe flag sprite was downloaded fromhttps://www.flag-sprites.comand
is derived from the FamFamFam flag icon set athttp://www.famfamfam.com/lab/icons/flags/.
Package: django-country-blocker
[![Latest Version](https://pypip.in/v/django-country-blocker/badge.png)](https://pypi.python.org/pypi/django-country-blocker/)
[![Downloads](https://pypip.in/d/django-country-blocker/badge.png)](https://pypi.python.org/pypi/django-country-blocker/)django-country-blockerDjango app introducing a Context Processor that adds users location information to the context.To activate, add country_block.context_processors.addgeoip to your CONTEXT_MODIFIERS.
This will give you a user_country variable in your context and a country variable in the user’s session
with the user’s 2 character ISO country code, and an in_country boolean set to True is the country matches one of
the allowed countries.Local Settings optionsLOCATION : a unique 2 char string that identifies the server’s locationCOUNTRY_BLOCK_DEBUG_COUNTRY : sets the user_country equal to this value for all users, letting you test as if you are in
this country. False by default.COUNTRY_BLOCK_DEBUG_REGION : sets the region_code equal to this value for all users, letting you test as if you are in
this region. False by default.Database Settings options (country_block.Settings model)location : This is a unique 2 char value that corresponds to the LOCATION value in the local settingsfree_geo_ip_enabled : Use the freegeoip.net to determine the geography of the user’s IPfree_geo_ip_timeout : freegeoip.net request timeout in seconds (default is 2 seconds)maxmind_enabled : Use thehttps://geoip.maxmind.com/aservice to determine the geography of the user’s IP.
If this is True and free_geo_ip_enabled is also True, the context processor will try the freegeoip.net service first
and will only try the Maxmind service if freegeoip.net fails.maxmind_timeout : maxmind.com request timeout in seconds (default is 6 seconds)maxmind_local_db_enabled : Use a local Maxmind database instead of thehttps://geoip.maxmind.com/aservice. Must also
have maxmind_enabled set to True.allowed_countries : A M2M relationship of all Countrys that are allowed for the server’s locationstaff_user_country : The Country that all django staff users will be assignedlocal_ip_user_country : The Country that all local IP users will be assignedmaxmind_license_key : The license key for the Maxmind service. A value is required if maxmind_enabled is True
and maxmind_local_db_enabled is False. This gets sent over as the ‘l’ parameter in the payload to thehttps://geoip.maxmind.com/aservice.
Package: django-country-dialcode
=======================django-country-dialcode=======================This Django application provides Dial Code and Country data to reuse in a django application.Installation============Install Django-Country-Dialcode::python setup.py installSettings========in your settings.py file::INSTALLED_APPS = INSTALLED_APPS + ('country_dialcode',)Usage=====In your models add the following ::dialcode = models.ForeignKey(Prefix, verbose_name=_("Destination"), null=True,blank=True, help_text=_("Select Prefix"))Contributing============If you've found a bug, implemented/improved a feature and think it is usefulthen please consider contributing. Patches, pull requests or just suggestionsare welcome!Source code: http://github.com/Star2Billing/django-country-dialcodeIf you don’t like Github and Git you’re welcome to send regular patches.Bug tracker: https://github.com/Star2Billing/django-country-dialcode/issuesDocumentation=============Documentation is available on 'Read the Docs':http://django-country-dialcode.readthedocs.orgLicense=======Copyright (c) 2011-2014 Star2Billing S.L. <info@star2billing.com>Django-country-dialcode is licensed under MIT, see `MIT-LICENSE.txt`.Credit======Django-country-dialcode is a Star2Billing-Sponsored Community Project, for more information visithttp://www.star2billing.com  or email us at info@star2billing.com