Saravanan666/pypi-org huggingface dataset:
Package: django_coffee_table
Control of html tables - paging, sorting, css, checkbox column, primary-key column, help text,  custom columns, model field columns, foreign key field columns etc. in templates with a beautiful declarative syntax.If the above is not enough, Coffee Table will automatically optimize your query using select_related so that each page of the table will be rendered by a single SQL query.InstallationCoffeeTable is at the cheeseshop:pip install django_coffee_tableUsageTo use coffee_table in your project:Set up dependencies according to their respective documentation:linaro-django-paginationdjango-resortdjango-tag-parserIncludedjango_coffee_tablein yourINSTALLED_APPS.Open your template and load up the coffee_table tags library:{% load coffee_table %}Basic usage:{% coffee_table object_list %}Advanced usage:{% coffee_table object_list field_accessors='name, content_type__app_label'
                            paginate_by='10'
                            table_class='table table-condensed'
                            checkbox_column=True
                            primary_key_column=True
                            help_text=True %}Please see the included test project for more help.History1.0.0 (2014-05-27)First stable release after gtting to 98% test coverage.0.3.0 (2013-11-26)Support for automatic queryset optimization using select_related.0.2.2 (2013-11-26)Added support for FK fields in tebles using the __ notation.0.2.1 (2013-11-26)Included tag_parser for kwarg parsing in the coffee_table tag.0.2.0 (2013-11-26)Improved documentation.0.1.0 (2013-11-26)First release on PyPI.
Package: django-coffee-tools
Coffee - Django Admin Toolsdjango-coffee-toolsprovides a ready-to-use Django plugin which provides dynamic form generation for your Django models. These forms are intended to be integrated with your admin or management dashboard to allow easy management of your application's data.QuicklinksDocumentationWhy Coffee?Plug and play - waste less time making views to manage your application's data.Quick InstallINSTALLED_APPS=[# ..."coffee",]urlpatterns=[path("admin/",admin.site.urls),path("coffee/",include("coffee.urls")),path("api/",include("api.urls")),]Ready to Go!Generate HTML which can be integrated into your frontend.<!-- http://localhost:8008/coffee/form/?app_name=api&model_name=Category&pk=5 --><formaction="/coffee/form/submit/?app_name=api&amp;model_name=Category"method="POST"class="coffee-form"><divclass="coffee-form-item"><labelclass="coffee-form-item-label"for="name">name</label><textareavalue="Frozen"name="name"id="name"type="text"class="coffee-form-item-input">Frozen</textarea></div><inputname="csrfmiddlewaretoken"value="lWqQXylYRShwQcRxbYCyxrTTOMci1Pv3MJ4MMYEqkK9NM8LIdNsb99AGOigpWR4t"type="hidden"/><buttontype="submit"class="coffee-form-submit">Update</button></form>How to UseThe model form can be used for existing instances of data or be used to create new instances of data./coffee/form/?app_name=&model_name=&pk=app_name: The name of your Django application, e.g.apimodel_name: The name of your application model, e.g.ShoppingItem. Note, this property is case sensitive.pk: Optional. The relevant primary key for your selected model.FeedbackThis project won't move very fast and I've built it mostly for my own projects, if you'd like to contribute, get in touch!
Package: django-cofingo
Cofingo is a combination of Coffin (http://github.com/coffin/coffin) and Jingo (http://github.com/jbalogh/jingo). It allows the usage of Jinja2 templates while keeping the tags and filters from Django (e.g. the URL tag)Like Jingo the way to add custom filters, tags (extensions), and tests is by creating a helpers.py file in your app.Getting startedThe easiest way to install Cofingo is by usingpip:pip install django-cofingoThe development version can be found at:http://github.com/mvantellingen/django-cofingoConfigurationAdddjango_cofingo.Loaderto your settings:TEMPLATE_LOADERS = (
    'django_cofingo.Loader',
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)Templates are then rendered by Jinja2 whichever method is used (It works for class based views, TemplateResponse etc).If you want to prevent that the templates of a specific app are rendered with Jinja2 then you can excluded them in your settings file:COFINGO_EXCLUDED_APPS = ['admin', 'debug_toolbar'](Note that these two apps are added by default)Creating custom filters and extensionsCreate ahelpersmodule in your django app and add the following:from django_cofingo.library import Library

library = Library()If you want to add a filter add the following:@library.filter
def my_custom_filter(value):
    return value + '-filtered'Adding an extension can be done as follow:from django_cofingo.library import Library
from django_assets.env import get_env
from webassets.ext.jinja2 import AssetsExtension

library = Library()
library.attr('assets_environment', get_env())
library.extension(AssetsExtension)You can also add other modules with a library to Cofingo by specifying them in
your settings.py file:COFINGO_HELPERS = [
    'myproject.helpers'
]
Package: django-cognalys
You can follow the below tutorial to know how Cognalys OTP works for webhttps://www.youtube.com/watch?v=qalwCPkVQwoin djangosettings.pymention below( Login to the cognalys dashboard and create OTP app )https://cognalys.freshdesk.com/support/solutions/articles/5000048861-create-new-otpCOGNALYS_ACCESS_TOKEN =  YoursCOGNALYS_APP_ID = YoursCOGNALYS_API_VERSION = YoursINSTALLED_APPS += [‘djcognalys’]If you need to configure realtime facility of cognalys . you should configure as below :from django.http import HttpResponse,HttpResponseRedirect
from django.views.decorators.csrf import csrf_exemptfrom django.conf import settings@csrf_exemptdef default_callback(request):token = getattr(settings, ‘COGNALYS_REALTIME_API_TOKEN’, ‘’ )if request.POST and token != ‘’:if request.POST.get(‘token’) == token:“Your Statement “return HttpResponse(‘’, content_type=”text/plain”)else:return HttpResponse(‘Not Allowed’, content_type=”text/plain”)
Package: django-cognito-jwt
Django Cognito JWTAn Authentication backend for Django Rest Framework for AWS Cognito JWT tokensInstallationpipinstalldjango-cognito-jwtUsageAdd the following lines to your Djangosettings.pyfile:COGNITO_AWS_REGION='<aws region>'# 'eu-central-1'COGNITO_USER_POOL='<user pool>'# 'eu-central-1_xYzaq'COGNITO_AUDIENCE='<client id>'(Optional) If you want to cache the Cognito public keys between requests you can
enable theCOGNITO_PUBLIC_KEYS_CACHING_ENABLEDsetting (it only works if you
have the DjangoCACHESsetup to anything other than the dummy backend).COGNITO_PUBLIC_KEYS_CACHING_ENABLED=TrueCOGNITO_PUBLIC_KEYS_CACHING_TIMEOUT=60*60*24# 24h caching, default is 300sAlso update the rest framework settings to use the correct authentication backend:REST_FRAMEWORK={'DEFAULT_AUTHENTICATION_CLASSES':[...'django_cognito_jwt.JSONWebTokenAuthentication',...],...}Be sure you are passing the ID Token JWT from Cognito as the authentication header.
Using the Access Token will work for authentication only but we’re unable to use theget_or_create_for_cognitomethod with the Access Token.(Optional) If you want to use a different user model then the default DJANGO_USER_MODEL
you can use theCOGNITO_USER_MODELsetting.COGNITO_USER_MODEL="myproject.AppUser"
Package: django-cognito-lowlevel
django-cognito-lowleveldjango-cognito-lowlevelis a Django package for handling authentication with AWS Cognito in a lower level way.This package does not make any attempts at integrating with the Django user system directly. Handler for your callback function is provided for your own workflow customizations.Installation of django-cognito-lowlevelYou can integratedjango-cognito-lowlevelwith your Django project using a Python virtual environment
Please use pip to install at your Python virtual environment:pip install django-cognito-lowlevelDjango settings that should and can be configuredThe following variables are needed at thesettings.pyof your project.VaraiableDescription & exampleCOGNITO_USER_POOL_IDUser pool ID of your AWS Cognito setup.e.g."eu-west-XXXXXXXX"COGNITO_CLIENT_IDClient ID of your AWS Cognito setup.e.g."2vvdsdfr243rwefswe445rte5edr"COGNITO_APP_CLIENT_SECRETClient Secret of AWS Cognito setup.e.g.1urj4uktvlmb0pps234234d6io8tipmrlu3se13fdssdfCOGNITO_TOKEN_URLThe Token URL of your AWS Cognito setup.e.g."https://<xxxxxxxxxx>.auth.<eu-west-2>.amazoncognito.com/oauth2/token"COGNIT_CALLBACK_URL_PATHCall back path redirected from AWS Cognito.e.g."some-folder-of-your-choice/api/cognito/userpool/callback/"COGNITO_REDIRECT_URLAdd some random delay of 1 to 30 seconds for each HTTP requests. Disable by default.e.g.f"http://localhost:8000/{COGNIT_CALLBACK_URL_PATH}"COGNITO_HOSTThe host of your AWS Cognito setup.e.g."<xxxxxxxxxx>.auth.<eu-west-2>.amazoncognito.com"COGNITO_USERPOOL_REGIONDefault AWS Cognito region Name.e.g."us-west-2"COGNITO_AUTH_SUCCESS_REDIRECT_URLURL or Django URL route name of redirection upon success, after obtaining theaccess_tokenandid_token.e.g."landing:index"COGNITO_AUTH_ERROR_REDIRECT_URLURL or Django URL route name of redirection upon error.e.g."landing:error"COGNITO_PUBLIC_KEYS_CACHE_TIMEOUTCache time of the public keys of your AWS Cognito setup.e.g.300Credits & AcknowledgementsPython packages dependenciesawslabs/aws-support-toolsDecode and verify Amazon Cognito JWT tokensCopyright (c) Amazon Web Services - Labs
Apache-2.0 licensehttps://github.com/awslabs/aws-support-tools/tree/master/Cognito/decode-verify-jwtDjangoCopyright (c) Django Software Foundation and individual contributors.All rights reserved.https://www.djangoproject.com/RequestsCopyright (c) Kenneth Reitz & Python Software Foundation
Apache-2.0 licensehttps://github.com/psf/requestscoloramaCopyright Jonathan Hartley & Arnon Yaari, 2013-2020.
BSD-3-Clause licensehttps://github.com/tartley/coloramapython-joseCopyright (c) Michael Davis
MIT licensehttps://github.com/mpdavis/python-joseLicenseApache License
Version 2.0, January 2004http://www.apache.org/licenses/
Package: django-cognito-saml
django-cognito-samlLibrary to implement django authentication using cognito (via pyjwt).Assumptions made:Usingauthorization codeflow. Implicit grant is insecure as the access token is transferred over in the request parameters without encryption.SettingsThe following settings should be set in your settings file against aCOGNITO_CONFIGdictionary.SettingDescriptionENDPOINTEither the hosted domain or custom domain for your cognito appCLIENT_IDCLIENT_ID of your application in your user poolCLIENT_SECRETCLIENT_SECRET of your application in your user poolJWKS_URIThe JWKS URI of your user pool. Used to verify the JWT.REDIRECT_URIOPTIONALIt is possible to share one cognito app with multiple websites via a proxy.RESPONSE_HOOKOPTIONALPost authentication hook to modify the response (perhaps to add headers). Specify it as a django import_string.REQUIRED_GROUPSOPTIONALSpecify when usingSuperUserBackendto restrict the ability to login to saml users withcustom:groupscontaining all `REQUIRED_GROUPS.InstallationAdd the above settings to your settings.COGNITO_CONFIG = {
    "ENDPOINT": "",
    "CLIENT_ID": "",
    "CLIENT_SECRET": "",
    "JWKS_URI": "",
    "REDIRECT_URI": "",
    "RESPONSE_HOOK": ""
    "REQUIRED_GROUPS": []
}Define your authentication backend. Subclass offdjango_cognito_saml.backends.CognitoUserBackend.Define theusernamefield of your user by customizing theauthenticatemethod. If you wish
to add additional fields to the user or modify the user's permissions, override theconfigure_usermethod. Theconfigure_usermethod has access toself.cognito_jwtwhich contains the decoded
jwt token with the cognito saml assertions.Setcreate_unknown_user = Falseif you want to disable automatic creation of users.classCustomCognitoBackend(CognitoUserBackend):# Change this to False if you do not want to create a remote user.create_unknown_user=Truedefauthenticate(# type: ignore[override]self,request:HttpRequest,cognito_jwt:dict[str,Any],**kwargs:Any)->Optional[AbstractBaseUser]:# Customizing the username field used to create the userremote_user=cognito_jwt["username"]user=super().authenticate(request,remote_user=remote_user,**kwargs)returnuserdefconfigure_user(# type: ignore[override]self,request:HttpRequest,user:AbstractBaseUser,created:bool=True)->AbstractBaseUser:# Configuring the user post loginifcreated:user.name=self.cognito_jwt["name"]user.save()returnuserAddSuperUserBackendto your authentication backends.AUTHENTICATION_BACKENDS=(..."django_cognito_saml.backends.SuperUserBackend",...)Add the cognito saml urls to yoururls.pyurls=[...path("/",include("django_cognito_saml.urls")),]
Package: django_cohort_analysis
A small app to perform cohort analysis in DjangoFree software: BSD licenseDocumentation:https://django_cohort_analysis.readthedocs.org.FeaturesPerform cohort analysis on any django model that has a date_created or date_joined fieldCreditsThis project was inspired by Alex Kehayia’sdjango_cohortsWork on this project was original undertaken atSpringMoves.History0.0.1 (2015-02-28)First release on PyPI.
Package: django-coinbase
a Django app for receiving payment notifications from CoinbaseGetting StartedThis is a fairly simple app. It’s three parts:Webhook ViewModel to store the webhook received dataSignal emitted on reciept/validation/storage of webhook dataFirst off, you’ll want to adddjango-coinbaseto your requirements.txt and
pip install it in your virtualenv. Next you’ll want to addcoinbaseto yourINSTALLED_APPSsetting of yoursettings.pyfile. Lastly, you’ll want to
add a urls include to your mainurls.pyfile forcoinbase.urls.There is a signal that you can setup a receiver for in your own project to do
something with the callback data:@receiver(order_received)
def handle_order_received(sender, order, **kwargs):
    pass  # do something with the order object, like enable a feature based on order.custom contentsYou will want to set two different settings:COINBASE_API_KEYThis is the API Key found at:https://coinbase.com/account/integrationsCOINBASE_SHARED_SECRETThis is just a random key you make up and store in your settings and add to the
querystring of the Instant Payment Notifications field (https://coinbase.com/merchant_settings).This is the URL of your site + wherever you rooted the urls include +/cb/followed with the querystring parametersecretfollowed by the value of this
settings.For example:# urls.py
url(r"^payments/", include("coinbase.urls"))

# settings.py
COINBASE_SHARED_SECRET = "mysecretsauce"

>>> Site.objects.get_current().domain
example.com

# Your url would be
http://example.com/payments/cb/?secret=mysecretsauceDevelopmentTo run test suite:$ pip install Django django-nose django-jsonfield mock requests
$ python runtests.pyCommercial SupportThis app, and many others like it, have been built in support of many of Eldarion’s
own sites, and sites of our clients. We would love to help you on your next project
so get in touch by dropping us a note atinfo@eldarion.com.
Package: django-coldbrew
django-coldbrew started as a fork of Django Coffeescript.ColdBrew provides template tags to compile CoffeeScript into JavaScript from templates.
It works with both inline code and external files.InstallationAdd"coldbrew"toINSTALLED_APPSsetting.Make sure that you havecoffeeexecutable installed. SeeCoffeeScript official sitefor details.Optionally, you can specify the full path tocoffeeexecutable withCOFFEESCRIPT_EXECUTABLEsetting.
By default it’s set tocoffee.Example UsageExternal file{% load coldbrew %}

<script type="text/javascript"
        src="{{ STATIC_URL}}{% coffeescript "path/to/script.coffee" %}">
</script>renders to<script type="text/javascript"
        src="/media/COFFEESCRIPT_CACHE/path/to/script-91ce1f66f583.js">
</script>Inline{% load coldbrew %}

<script type="text/javascript">
  {% inlinecoffeescript %}
    console.log "Hello, World!"
  {% endinlinecoffeescript %}
</script>renders to<script type="text/javascript">
    (function() {
  console.log("Hello, World!");
}).call(this);

  </script>Note that by default compiled files are saved intoCOFFEESCRIPT_CACHEfolder under yourSTATIC_ROOT(orMEDIA_ROOTif you have noSTATIC_ROOTin your settings).
You can change this folder name withCOFFEESCRIPT_OUTPUT_DIRsetting.SettingsCOFFEESCRIPT_EXECUTABLEPath to CoffeeScript compiler executable. Default:"coffee".COFFEESCRIPT_OUTPUT_DIROutput directory for compiled external scripts. It’s relative toSTATIC_ROOT. Default:"COFFEESCRIPT_CACHE".COFFEESCRIPT_USE_CACHEWhether to use cache for inline scripts. Default:True.COFFEESCRIPT_CACHE_TIMEOUTCache timeout for inline scripts (in seconds). Default: 30 days.COFFEESCRIPT_MTIME_DELAYCache timeout for reading the modification time of external scripts (in seconds). Default: 10 seconds.COLDBREW_FAIL_LOUDIf True, raise ColdBrewCompileError upon encountering compiling error.
Otherwise, records to error log.
Defaults to same as DEBUG.Changes0.5Added COLDBREW_FAIL_LOUD setting
Added test coverage
Tags now work with staticfiles app*CHANGES BELOW ARE PRIOR TO FORK FROM django-coffeescript*0.4Log coffeescript compilation errorsFixed bug with paths on Windows (by syabro)0.3Use STATIC_ROOT / STATIC_URL settings when possible instead of MEDIA_ROOT / MEDIA_URL (by Roman Vorushin)0.2.1Add CHANGES.rst to MANIFEST.in0.2Automatically remove old files from COFFEESCRIPT_CACHEAdd basic unit tests0.1Initial release
Package: django-collage
What’s thatThis reusable Django app can help you to create collages on your website
for gallery or another entities. For example, I’m use it for applications.Installation:Package:$gitclonehttps://github.com/gotlium/django-collage.git$cddjango-collage&&sudopythonsetup.pyinstallOR$sudopipinstalldjango-collageAdd thecollageapplication toINSTALLED_APPSin your settings file (usuallysettings.py)Sync database (./manage.py syncdb)Usage:models.pyclassEntity(models.Model):name=models.CharField(max_length=255,unique=True)defget_images(self):returnImages.objects.values_list('image',flat=True).filter(entity=self)classImages(models.Model):entity=models.ForeignKey(Entity)image=models.ImageField()view.html{% load collage %}
{% load cache %}

{% cache 31536000 images view.id %}
    {% get_collage for view.get_images as images %}<div>{% for image in images %}<ahref="{{ image.src }}"style="{{ image.css }}"><imgsrc="{{ image.url }}"></a>{% endfor %}</div>{% endcache %}
Package: django-collapse-whitespace-templatetag
A simple whitespace-collapsing template tag for Django - useful for formatting
plain text emails or when whitespace actually matters.InstallationInstall to PYTHONPATH, etc.Then either:Addcollapse_whitespace_templatetagtosettings.INSTALLED_APPSand
then use:{% load collapse_whitespace_templatetag %}… in your templates.Or:Addcollapse_whitespace_templatetag.templatetags.collapse_whitespaceto
yourBUILTINSentry insettings.TEMPLATES(Django 1.9)Or:Add to builtins (< Django 1.9) with in somemodels.py:from django.template.base import add_to_builtins
add_to_builtins('collapse_whitespace_templatetag.templatetags.collapse_whitespace'
Package: django-collecstatic-daemon
django-collectstatic-daemonThis is a simple daemon that will watch your project directory and
collectstatic files whenever there is a change. This is often times
useful when you are working with node/npm project and you need to
collectstatic files after npm build/prod/watch converts the statis
resources.InstallInstall the packagepip installdjango-collectstatic-daemonAdd ‘watcher’ to your list of INSTALLED_APPS in settings.pyINSTALLED_APPS = [
    ...
    ...
    'watcher'
]UsingUsing the command is as simple as running./manage.py watcher
Package: django-collect-and-ignore
django-collect-and-ignoreCustom collectstatic for django with ignoring commonly copied unnecessary filesInstallationAvailable via PyPi, supports Python 2.x and 3.x.pipinstalldjango-collect-and-ignoreUsage./manage.pycollect_and_ignore--additional_optionsCan be tweaked from settings:COLLECT_AND_IGNORE_PATTERNS [patters to ignore, needs to be a list of strings]COLLECT_AND_IGNORE_NO_INPUT [wheter to ask for input, boolean, default is False]DEFAULT_PATTERNS=['__tests__','tests','*.test.js','*.scss','*.less','config.rb']LicenseMIT.
Package: django-collectdir
This app provides a command named collectdir, which works like collectstatic
but general purpose, so you need to add'collectdir'to yoursettings.INSTALLED_APPS. It can be used to mix Django with frontend
frameworks or build tools in NodeJS.Consider such a project directory tree:project/
- someapp/frontend  # <- frontend dir in someapp module of project
- otherapp/frontend # <- frontend dir in another INSTALLED_APPS
- frontend/         # <- non commited directory, autogenerated from aboveYou can rebuildproject/frontendwith command:# collect all app's frontend/ dir into ./frontend
manage.py collectdir frontend:./frontendIf it detects a TTY, and watchdog is installed, it will keep running and
synchronizing the target directory. To install collectdir with watchdog
example:pip install --user django-collectdir[dev]Note that in CRUDLFA+, we usejsinstead of frontend, so if you want to add
your own StimulusJS controllers to your bundle you can just add them in your
app. And before executing the frontend toolchain, run:manage.py collectdir js:./jsOr, for NextJS support:manage.py appwatch pages:./pagesOr, for NextJS and React support and also have a components sub dir:manage.py appwatch pages:./pages components:./pages/componentsHave fun provisionning other frameworks with Django apps :)
Package: django-collectfaster
This package extends Django’scollectstaticmanagement command with a--fasterargument that activates the
parallel file copying. The speed improvement is especially helpful for remote storage backends like S3.QuickstartInstall django-collectfaster:pip install django-collectfasterConfigure installed apps in yoursettings.pyand make surecollectfasteris listed beforedjango.contrib.staticfiles:INSTALLED_APPS = (
    ...,
    'collectfaster',
    'django.contrib.staticfiles',
    'storages',
    ...,
)If you are using S3 withdjango-storagesyou probably already have this configured in yoursettings.py:AWS_S3_HOST = 's3-eu-west-1.amazonaws.com'
AWS_STORAGE_BUCKET_NAME = '<your_aws_bucket_name>'Set the storage backends for your static and media files in thesettings.py:STATICFILES_STORAGE = 'collectfaster.backends.boto.S3StaticStorage'
DEFAULT_FILE_STORAGE = 'collectfaster.backends.boto.S3MediaStorage'
# STATICFILES_STORAGE = 'collectfaster.backends.boto3.S3Boto3StaticStorage'
# DEFAULT_FILE_STORAGE = 'collectfaster.backends.boto3.S3Boto3MediaStorage'You should split your static and media files on your S3 in different folders and configure it in thesettings.py:STATICFILES_LOCATION = 'static'
MEDIAFILES_LOCATION = 'media'Set theSTATIC_URLat least on your production settings:STATIC_URL = 'https://%s/%s/%s/' % (AWS_S3_HOST, AWS_STORAGE_BUCKET_NAME, STATICFILES_LOCATION)UsageCollect your static files parallel:python manage.py collectstatic --fasterSet the amount of workers to 30:python manage.py collectstatic --faster --workers=30Spawn workers usingmultiprocessinginstead ofgevent:python manage.py collectstatic --faster --use-multiprocessingCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.2 (2017-04-07)Add support for boto3 and multiprocessing instead of geventMoved backends to a submodule (please change your setting variablesSTATICFILES_STORAGEandDEFAULT_FILE_STORAGE)0.1.1 (2016-08-08)Rather usedjango-storagesthan the deprecated fork fromdjango-storages-redux.0.1.0 (2016-05-19)First release on PyPI.