Saravanan666/pypi-org huggingface dataset:
Package: django-canvas-api-token
A reusable django app for handling the workflow of generating per-user
Canvas API oauth tokens. The app assumes that your django project is using thedjango_auth_ltimiddleware.Installpipinstalldjango-canvas-api-tokenSetupAdd"canvas_api_token"to yourINSTALLED_APPSsettingsInsert the url configuration into your project/app urls.pyurl(r'^canvas_api_token/',include('canvas_api_token.urls'))Runpython manage.py migrateto ensure db tables are initialized.Use the admin site to create acanvas_dev_keyentry using theconsumer_keyand developer key values from your Canvas consumer where …client_idis the integer client id value of your Canvasdeveloper keyclient_secretis the random string ‘secret’ value of your Canvas developer keyLicensedjango-canvas-api-token is licensed under the BSD licenseCopyright2015 President and Fellows of Harvard CollegeRelease History0.1.0 (2014-12-17)Birth!0.1.1 (2014-12-18)fixeddownload_urlin setup.py0.1.2 (2015-01-07)fixed bug in utils.canvas_uri use of urlunparseadded unique index to CanvasApiToken.user_id0.2.0 (2015-04-28)DB storage of canvas developer keysNew model: CanvasDeveloperKeyenable admin sitemake CanvasApiToken.user a foreign key into user model
Package: django-canvas-field
Django Canvas Field这是一个 Python 模块，为 Django 提供手写签名字段，以及手写签名的网页控件，感谢 jSignatrue 项目为本模块提供支持。安装并注册模块# pip install django-canvas-field# File: settings.pyINSTALLED_APPS=["canvas",]在模型中使用fromcanvas.fieldsimportSignCanvasFieldclassSimple(Model):name=CharField(max_length=20,unique=True)sign=SignCanvasField(null=True,blank=True)使用签名控件fromdjangoimportformsfromcanvas.widgetsimportSignCanvasWidgetfrom.modelsimportSimpleclassSimpleForm(forms.ModelForm):classMeta:model=Simplewidgets={'sign':SignCanvasWidget()}SignCanvasWidget是django.forms.widgets.Textarea的子类，使用自定义的模板sign_canvas.html。SignCanvasField是django.db.models.TextField的子类，表单字段指向SignCanvasWidget。
Package: django-captcha-admin
Simple way to add aReCaptchafield to your admin login page.4 simple stepsInstalldjango-captcha-adminfrom pypi:$> pip install django-captcha-adminAddcaptcha_adminandcaptchato yourINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'captcha_admin',
    'captcha',
)Add your captcha keys to your settings, the waydjango-recaptchaindicates:RECAPTCHA_PUBLIC_KEY = 'your-public-key'
RECAPTCHA_PRIVATE_KEY = 'your-private-key'Edit your code so instead of importingadminfromdjango.contrib, you import it fromcaptcha_admin:from captcha_admin import admin

# This should stay the same
admin.autodiscover()

urlpatterns = patterns(
    ...
    url(r'^admin/', include(admin.site.urls)),  # and this...
    ...
)That’s it!
Package: django-capture-tag
A micro-library to capture output in Django templates.This can be useful for example to:Repeat page titles in web pages, e.g. for the<title>tag and breadcrumb.Repeat contents for Social Media tags.Reusing thumbnail output in multiple places.Fetch configuration data from extended templates.InstallationInstall the module from PyPI:pipinstalldjango-capture-tagAdd the package toINSTALLED_APPS:INSTALLED_APPS+=('capture_tag',)Load the tag in your template:{%loadcapture_tags%}SyntaxThe following options are available:{%capture%}...{%endcapture%}# output in{{capture}}{%capturesilent%}...{%endcapture%}# output in{{capture}}only{%captureasvarname%}...{%endcapture%}# output in{{varname}}{%captureasvarnamesilent%}...{%endcapture%}# output in{{varname}}onlyExample usageTo capture Social Media tags:{%loadcapture_tags%}<head>...{# Allow templates to override the page title/description #}<metaname="description"content="{%captureasmeta_description%}{%blockmeta-description%}{%endblock%}{%endcapture%}"/><title>{%captureasmeta_title%}{%blockmeta-title%}Untitled{%endblock%}{%endcapture%}</title>{# display the same value as default, but allow templates to override it. #}<metaproperty="og:description"content="{%blockog-description%}{{meta_description}}{%endblock%}"/><metaname="twitter:title"content="{%blocktwitter-title%}{{meta_title}}{%endblock%}"/></head>Take configuration from extended templates:# base.html{%loadcapture_tags%}# read once{%captureashome_urlsilent%}{%blockhome_url%}{%url'app:index'%}{%endblock%}{%endcapture%}# reuse twice.<ahref="{{home_url}}"class="btn page-top">Back to home</a><ahref="{{home_url}}"class="btn page-bottom">Back to home</a># child.html{%extends"base.html"%}{%blockhome_url%}{%url'user:profile'%}{%endblock%}NoticeWhen a value is used only once, this package is not needed.
In such case, simply place the{% block .. %}at the proper location where contents is replaced.
All common Django template tags support theas variablesyntax,
such as{% url 'app:index' as home_url %}or{% trans "Foo" as foo_label %}.
Package: django_carbon
Django carbon is a set of abstract models and apps to help make building the foundational web components easier.Current Features:
- Pages with core SEO helpers
- Basic user accounts
- Media library
- Server-side CSS and JS package compilation, concatenation, minification and versioning
- Dynamic form generation library
- Email templating with tracking and basic subscription settings
- Basic blogExample Implementation Here:https://github.com/ninapavlich/caledonFuture models:Account:
- login from third party service
- bio and social network fieldsSharing:
- Social network sharing modelTracking:
- Simple tracking model for views and sharesComments:
- Comment with moderation, upvote/downvote, sorting
Package: django-carbondesign
Implements Carbon Design System as Django templatetags.Documentations:https://dozymoe.github.io/django-carbondesignhttps://www.carbondesignsystem.com/components/overview/Quick StartAddcarbondesignto yourINSTALLED_APPSsetting.Load template tag like this{% load carbondesign %}.Add built-in assets (js/css){% carbondesign_assets %}.Use the components{% Pagination pager=page_obj %}.
Package: django-cards-admin
django-cards-adminShow cards in changelist instead of table for django admin site.Installpipinstalldjango-cards-adminSettingspro/settings.pyINSTALLED_APPS=[..."django_simple_tags","django_cards_admin",...]Usageapp/admin.pyfromdjango.contribimportadminfromdjango_cards_admin.adminimportDjangoCardsAdminMixinfrom.modelsimportBookclassBookAdmin(DjangoCardsAdminMixin,admin.ModelAdmin):result_cards_columns=5max_cards_number=5result_card_body_height=200list_display=["title","author","isbn"]admin.site.register(Book,BookAdmin)Configurationsresult_cards_columns = 4 # how many columnsmax_result_cards_number = 10 # if the number of the results is more than max_cards_number, show list instead of cardsresult_card_body_height = 100 # card body height in pxresult_card_body_min_width = 200 # card body min-width in pxresult_card_title_template = "result-card-title.html" # card title template, smart select by app_label and model_nameresult_card_body_template = "result-card-body.html" # card body template, smart select by app_label and model_nameresult_card_footer_template = "result-card-footer.html" # card footer template, smart select by app_label and model_nameReleasev0.1.0 2020/02/23First release.v0.2.0 2020/03/19Fix result-cards width problem in filtered changelist.v0.3.0 2020/03/21Add item link and link title override mechanism. Requires django-simple-tags>=0.4.0.v0.3.1 2020/04/28Remove print() statements in admin.py.v0.3.2 2023/09/15Doc update.
Package: django-care
GoalProvide tool which help finding performance issues in django projects.InstallationInstall requirements:pip install -r requirements.txtInstall django-care:pip install django-careor current development version:pip install hg+https:://bitbucket.org/kidosoft/django-careConfigurationINSTALLED_APPS=(...'care',...)UsageChecking for queries run at startupRunning command below will statistics about queries run at project startup.$pythonmanage.pycheck_startup_queries-oqueries.txtEnabling SQL queries annotationsIn order to get sql queries annotated with path and view in which it occured
add middleware as below.MIDDLEWARE_CLASSES+=('care.middleware.AnnotateSQLMiddleware',)Issued queries will have comment appended in the form:<original query> -- path: <request path> | view: <resolved view>For example:SELECT`id`,`username`FROM`auth_user`WHERE`id`=1-- path: / | view: base.indexIt can help with searching for source of slow queries from slow.log.Supported Django versionsTested with:Django 1.2.7 on python2.7Django 1.3.7 on python2.7Django 1.4.16 on python2.7Django 1.5.11 on python2.7, python3.2, python3.3, python3.4Django 1.6.8 on python2.7, python3.2, python3.3, python3.4Django 1.7.1 on python2.7, python3.2, python3.3, python3.4Documentationhttp://kidosoft.pl/docs/django-care/
Package: django-carrot
.. image:: https://coveralls.io/repos/github/chris104957/django-carrot/badge.svg?branch=master:target: https://coveralls.io/github/chris104957/django-carrot?branch=master.. image:: https://readthedocs.org/projects/django-carrot/badge/?version=latest:target: http://django-carrot.readthedocs.io/en/latest/?badge=.. image:: https://travis-ci.org/chris104957/django-carrot.svg?branch=master:target: https://travis-ci.org/chris104957/django-carrot.svg?branch=master.. image:: https://coveralls.io/repos/github/chris104957/django-carrot/badge.svg?branch=master:target: https://coveralls.io/github/chris104957/django-carrot?branch=master).. image:: https://badge.fury.io/py/django-carrot.svg:target: https://badge.fury.io/py/django-carrot.. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg:target: https://opensource.org/licenses/Apache-2.0.. image:: /docs/source/images/carrot-logo-big.png:align: center**django-carrot** is a lightweight task queue backend for Django projects that uses the RabbitMQ message broker, withan emphasis on quick and easy configuration and task trackingInstallation------------Install django-carrot:.. code-block:: bashpip install django-carrotInstall and run RabbitMQ.. code-block:: bashbrew install rabbitmqbrew services start rabbitmqConfiguration-------------1. Add carrot to your Django project's settings module:.. code-block:: pythonINSTALLED_APPS = [...'carrot',...]2. Apply the carrot migrations to your project's database:.. code-block:: pythonpython manage.py migrate carrotUsage-----To start the service:.. code-block:: bashpython manage.py carrot_daemon startTo run tasks asynchronously:.. code-block:: pythonfrom carrot.utilities import publish_messagedef my_task(**kwargs):return 'hello world'publish_message(my_task, hello=True)To schedule tasks to run at a given interval.. code-block:: pythonfrom carrot.utilities import create_scheduled_taskcreate_scheduled_task(my_task, {'seconds': 5}, hello=True).. note::The above commands must be made from within the Django environmentDocker------A sample docker config is available `here <https://github.com/chris104957/django-carrot-docker>`_Full documentation------------------The full documentation is available `here <https://django-carrot.readthedocs.io/>`_Support-------If you are having any issues, please `log an issue <https://github.com/chris104957/django-carrot/issues/new>`_Contributing------------Django-carrot uses `Packagr <https://www.packagr.app/>`_ to share development builds. If you'd like access to it,please send me your email address at christopherdavies553@gmail.com so I can give you accessLicense-------The project is licensed under the Apache license.Icons made by Trinh Ho from `www.flaticon.com <www.flaticon.com>`_ is licensed by CC 3.0 BY
Package: django-carrot-dev
django-carrotis a lightweight task queue backend for Django projects that uses the RabbitMQ message broker, with an emphasis
on quick and easy configuration and task trackingInstallationInstall django-carrot:pipinstalldjango-carrotInstall and run RabbitMQbrewinstallrabbitmqbrewservicesstartrabbitmqConfigurationAdd carrot to your Django project’s settings module:INSTALLED_APPS=[...'carrot',...]Apply the carrot migrations to your project’s database:pythonmanage.pymigratecarrotUsageTo start the service:pythonmanage.pycarrot_daemonstartTo run tasks asynchronously:fromcarrot.utilitiesimportpublish_messagedefmy_task(**kwargs):return'hello world'publish_message(my_task,hello=True)To schedule tasks to run at a given intervalfromcarrot.utilitiesimportcreate_scheduled_taskcreate_scheduled_task(my_task,{'seconds':5},hello=True)NoteThe above commands must be made from within the Django environmentDockerA sample docker config is availablehereFull documentationThe full documentation is available atwww.django-carrot.comSupportIf you are having any issues, pleaselog an issueContributingDjango-carrot usesPyPRIto share development builds. If you’d like access to it, please send me your email address atchristopherdavies553@gmail.comso I can give you accessLicenseThe project is licensed under the Apache license.Icons made by Trinh Ho fromwww.flaticon.comis licensed by CC 3.0 BY
Package: django-cartodb-sync
A Django app that helps keepCartoDBtables synchronized with Django models.RequirementsDjango >= 1.8,cartodb-python, a CartoDB account.InstallationUse pip.Add toINSTALLED_APPS:INSTALLED_APPS += (
    'cartodbsync',
)Then add the appropriate configuration details to yoursettings.You will need some way of lettingdjango-cartodb-syncabout instances that
need to be inserted, updated, or deleted. The simplest way is to usesignalsand theSyncEntrymethodsmark_as_pending_delete,mark_as_pending_insert, andmark_as_pending_update.Finally, configure a cron job to run thecartodbsyncmanagement command.
If you have existing model instances, mark all for insertion by running:django-admin.py cartodbsync --markinsertConfigurationAdd the following to yoursettings:CARTODB_SYNC = {
    'API_KEY': '<your api key>',
    'DOMAIN': '<your CartoDB domain>',
    'MODELS': [
        {
            'CARTODB_TABLE': '<model CartoDB table>',
            'MODEL_CLASS': '<example.Model>',
            'SYNCHRONIZER_CLASS': '<example.Synchronizer>',
        }
    ]
}Everything between<and>should be replaced with appropriate details.
You can list as many models as you like within theMODELSentry.
Package: django-carton
+------+
 /|     /|
+-+----+ |    django-carton helps you build your shopping
| |    | |    cart and which list functionality.
| +----+-+
|/     |/
+------+It’s simple: You decide how to implement the views, templates and payment
processing.It’s lightweight: The cart lives in the session.It’s just a container: You define your product model the way you want.Usage ExampleView:from django.http import HttpResponse

from carton.cart import Cart
from products.models import Product

def add(request):
    cart = Cart(request.session)
    product = Product.objects.get(id=request.GET.get('product_id'))
    cart.add(product, price=product.price)
    return HttpResponse("Added")

def show(request):
    return render(request, 'shopping/show-cart.html')We are assuming here that your products are defined in an application
calledproducts.Template:{% load carton_tags %}
{% get_cart as cart %}

{% for item in cart.items %}
    {{ item.product.name }}
    {{ item.quantity }}
    {{ item.total_price }}
{% endfor %}

You can also use this convinent shortcut:
{% for product in cart.products %}
    {{ product.name }}
{% endfor %}DocumentationRead more:https://github.com/lazybird/django-carton/
Package: djangocas
``djangocas`` is a `CAS`_ 1.0 and CAS 2.0 authentication backend for`Django`_. It allows you to use Django's built-in authentication mechanismsand ``User`` model while adding support for CAS.It also includes a middleware that intercepts calls to the original login andlogout pages and forwards them to the CASified versions, and adds CAS supportto the admin interface... _Django: http://www.djangoproject.com/
Package: django-cas-agn
django-cas-ngis Django CAS (Central Authentication Service) 1.0/2.0/3.0 client
library to support SSO (Single Sign On) and Single Logout (SLO).It supports Django 2.0, 2.1, 2.2, 3.0 and Python 3.5+!This project inherits fromdjango-cas(which has not been updated since
April 2013) at 2014. Thengstands for “next generation”.
Our fork will include bugfixes and new features contributed by the community.DocumentCheckout document athttps://djangocas.dev/docs/latest/Quick links:CAS 101: Introduction to CAS protocol.Example integration: A step by step guide on how to integrate this library.InstallationConfigurationFeaturesSupportsCASversions 1.0, 2.0 and 3.0Support Single Logout (needs CAS server support)Supports Token auth schemesCan fetch Proxy Granting TicketSupports Django 2.0, 2.1, 2.2 and 3.0Supports using aUser custom modelSupports Python 3.5+Supports typing hints in public API.To support django 1.x and Python 2.x, please use3.6.0.ContributingNew contributors are always welcome! Check outContributionto get involved.Change LogThis project adheres to Semantic Versioning. Checkout all theChangelog.
Package: django-casdoor-auth
django-casdoor-authCasdoor's SDK for Django will allow you to easily connect your application to the Casdoor authentication system without having to implement it from scratch.Step1. install appdjango-casdoor-auth is available on PyPI:pipinstalldjango-casdoor-authcasdoor-auth is simple to use. We will show you the steps below.Step2. Configsetting.pyAdd "casdoor_auth" in INSTALLED_APPSINSTALLED_APPS=["django.contrib.admin","django.contrib.auth","django.contrib.contenttypes","django.contrib.sessions","django.contrib.messages","django.contrib.staticfiles","casdoor_auth"]Initialization requires 6 parameters, which are all str type:Name (in order)MustDescriptionendpointYesCasdoor Server Url, such ashttp://localhost:8000client_idYesApplication.client_idclient_secretYesApplication.client_secretcertificateYesThe public key for the Casdoor application's certorg_nameYesApplication.organizationapplication_nameYesApplication.nameCASDOOR_CONFIG={'endpoint':'http://localhost:8000','client_id':'<client-id>','client_secret':'<client-secret>','certificate':'''<certificate>''','org_name':'built-in','application_name':'app-built-in'}The redirect url, is the URL that your APP is configured to listen to the response from Casdoor.REDIRECT_URI='http://127.0.0.1:8000/casdoor/callback/'The login redirect url, after login successfully, you will jump to this page.LOGIN_REDIRECT_URL='/'Step3. routerurls.pyurlpatterns=[...path('casdoor/',include('casdoor_auth.urls')),...]The casdoor_auth provider two functions for using Casdoor.urlpatterns=[path('login/',views.toLogin,name='casdoor_sso'),path('callback/',views.callback,name='callback'),]To add a button for using the Casdoor login,  for example:<button><ahref="{% url 'casdoor_sso' %}">casdoor</a></button>`
Package: django-case-insensitive-field
Django Case Insensitive Model Fieldpipinstalldjango_case_insensitive_fieldWith Django Case Insensitive Field you can make Django Model Field case insensitive - by default Django can't do this which will make it impossible to add a unique field that will be case insensitive regardeless of case.Let's assume you have ausernamefield on yourUserModelwhich ofcourse would requireusernameto be unique accross thetablebut to Djangoabcis different fromABCbecause it is case sensitive (meaning: users can use the same username but with different case).Look at the example below:fromdjango.dbimportmodelsclassUserModel(models.Model):username=models.CharField(max_length=16,unique=True)user1=UserModel(username='user1')user1.save()# will go throughuser2=UserModel(username='User1')# will still go throughuser2.save()# will go throughUsing Django Case Insensitive ModelTo make Django Model Field insensitive, you can use the code below:No need for installation ot inclusion in app.# fields.pyfromdjango.db.modelsimportCharFieldfromdjango_case_insensitive_fieldimportCaseInsensitiveFieldMixinclassCaseInsensitiveCharField(CaseInsensitiveFieldMixin,CharField):"""[summary]Makes django CharField case insensitive \nExtends both the `CaseInsensitiveMixin` and  CharField \nThen you can import"""def__init__(self,*args,**kwargs):super(CaseInsensitiveFieldMixin,self).__init__(*args,**kwargs)# models.pyfrom.fieldsimportCaseInsensitiveCharFieldclassUserModel(models.Model):username=CaseInsensitiveCharField(max_length=16,unique=True)user1=UserModel(username='user1')user1.save()# will go throughuser2=UserModel(username='User1')user2.save()# will not go throughNote:All values are converted to lowercase before insertion and extraction from database.CompatibilityCompatible with every database - POSTGRESQL, SQLITE, MYSQL etc.Compatible with Django 2+, 3+DependenciesHolla! No dependecy. Lightweight!
Package: django-case-insensitive-user
django-case-insensitive-userSmall app that extends default Django user to have case-insensitive username.RequirementsPython 3.7 or laterDjango 3.2 or laterInstallationInstalldjango-case-insensitive-userusing pip.pipinstallrequirements.txtAddcase_insensitive_usertoINSTALLED_APPSlist in settings.INSTALLED_APPS=[..."case_insensitive_user",]SetAUTH_USER_MODELtocase_insensitive_user.Userin settings.AUTH_USER_MODEL="case_insensitive_user.User"FeaturesWorks out of the box in Django admin panel100% test coverageConfigurationConfiguration is done usingCASE_INSENSITIVE_USERoptional dictionary in your settings file:CASE_INSENSITIVE_USER={"VERBOSE_NAME":"Accounts",# Display name to display in admin page for this app"CASE_INSENSITIVE_EMAIL":True,# Whether to make emails case insensitive too, False by default}
Package: django-cash-register
django-cash-register is a Django app to manage product by cashier.Installationpip install django-cash-registerQuick startAdd “django_cash_register” to your INSTALLED_APPS settings.py like this:INSTALLED_APPS = [
    ...
    'django_cash_register',
]If you want to use django_cash_register as main url. Add “DJANGO_CASH_REGISTER_MAIN_PAGE” to settings.py like this:DJANGO_CASH_REGISTER_MAIN_PAGE = TrueAdd “STATICFILES_DIRS” to settings.py like this:STATICFILES_DIRS = [
    [BASE_DIR / 'static'][0]
]Add “django_cash_register.urls” to urls.py like this:urlpatterns = [
    ...
    path('', include('django_cash_register.urls')),
]Execute command:./manage.py migrateStart the development server and visithttp://127.0.0.1:8000orhttp://127.0.0.1:8000/django_cash_registerApplication
Package: django-cas-mb
django-cas-ngis Django CAS (Central Authentication Service) 1.0/2.0/3.0 client
library to support SSO (Single Sign On) and Single Logout (SLO).It supports Django 2.0, 2.1, 2.2, 3.0 and Python 3.5+!This project inherits fromdjango-cas(which has not been updated since
April 2013) at 2014. Thengstands for “next generation”.
Our fork will include bugfixes and new features contributed by the community.DocumentCheckout document athttps://djangocas.dev/docs/latest/Quick links:CAS 101: Introduction to CAS protocol.Example integration: A step by step guide on how to integrate this library.InstallationConfigurationFeaturesSupportsCASversions 1.0, 2.0 and 3.0Support Single Logout (needs CAS server support)Supports Token auth schemesCan fetch Proxy Granting TicketSupports Django 2.0, 2.1, 2.2 and 3.0Supports using aUser custom modelSupports Python 3.5+Supports typing hints in public API.To support django 1.x and Python 2.x, please use3.6.0.ContributingNew contributors are always welcome! Check outContributionto get involved.Change LogThis project adheres to Semantic Versioning. Checkout all theChangelog.