Saravanan666/pypi-org huggingface dataset:
Package: django-shop-stripe
Django Shop Stripe plugin============================A plugin to use stripe with django-shop.http://www.stripe.comInstallation--------------Add `shop_stripe` to your INSTALLED_APPS variable in your settings.py file.Next, add a few configuration variables in the same file:SHOP_STRIPE_PUBLISHABLE_KEY='my-publishable-key'SHOP_STRIPE_PRIVATE_KEY='my-super-secret-private-key'SHOP_PAYMENT_BACKENDS = (...'shop_stripe.offsite_stripe.StripeBackend',...)That's it!Usage-------Thanks to Stripe.com's wonderful jscript features, it's painfully simple to integrate.The shop_stripe plugin uses all the default django-shop templates, and the most important for our purposes is:shop_stripe/payment.htmlHere's an example to handle Stripe test input:{% extends "base.html" %}{% block extra-head %}{% include "_stripe_head.html" %}{% endblock %}{% block content %}<h2>Enter your payment information</h2><br/><form action="" method="POST" id="payment-form"><p class="form-row"><label>Card Number</label><input type="text" size="20" autocomplete="off" class="card-number" value="4242424242424242"/></p><p class="form-row"><label>CVC</label><input type="text" size="4" autocomplete="off" class="card-cvc" value="123"/></p><p class="form-row"><label>Expiration (MM/YYYY)</label><input type="text" size="2" class="card-expiry-month" value="12"/><span> / </span><input type="text" size="4" class="card-expiry-year" value="2013"/></p><button class="btn right submit-button" type="submit">Checkout</button></form>{% endblock %}Note that we include _stripe_head.html, that's the heavy lifting template that just pulls in the Stripe jscript.Conclusion-----------That's really it for now. The bulk of our logic is the offsite_stripe.py file.TODOs------1. Allow user-configurable fields to validate. django-shop-stripe currently doesn't even check the billing address of a user (which is becoming increasingly passe with credit cards anyhow...)2. Provide better, functional forms for the library. Do you know how to render id-less form field inputs with Django forms? Stripe requires that you have no IDs on inputs, which means the form data NEVER hits your server and you stay clean with the law.
Package: djangoshop-stripe
Stripe Payment Provider Integration for django-shopThis integrates the Stripe for django-shop version 1.0 and above.Installationfor django-shop version 1.0.x:pip install djangoshop-stripe<1.1ConfigurationInsettings.pyof the merchant's project:Add'shop_stripe'toINSTALLED_APPS.AtStripecreate an account and apply for a public/private key-pair. Then add
these keys:SHOP_STRIPE = {
    'PUBKEY': 'pk_<public-key-as-delivered-by-Stripe>',
    'APIKEY': 'sk_<api-key-as-delivered-by-Stripe>',
    'PURCHASE_DESCRIPTION': _("Thanks for purchasing at MyShop"),
}Add'shop_stripe.modifiers.StripePaymentModifier'to the list ofSHOP_CART_MODIFIERS.Add'shop_stripe.payment.OrderWorkflowMixin'to the list ofSHOP_ORDER_WORKFLOWS.Add'shop_stripe.context_processors.public_keys'to the list of templateOPTIONS['context_processors']
Package: django-shop-wspay
WSPaypayment gateway implementation fordjango SHOP.InstallationTo install withpiprun:pipinstalldjango-shop-wspayInstall from github using pip:pipinstall-egit://github.com/dinoperovic/django-shop-wspay.git@master#egg=django-shop-wspayConfigurationInstall and configuredjango-shop.Addshop_wspaytoINSTALLED_APPS.Addshop_wspay.wspay.WSPayBackendtoSHOP_PAYMENT_BACKENDS.Done.Changelog0.0.2Fix casting approval code to int removes leading zeros.0.0.1Alpha release
Package: djangoshop-wspay
# djangoshop-wspay[![PyPI version](https://img.shields.io/pypi/v/djangoshop-wspay.svg)](https://pypi.python.org/pypi/djangoshop-wspay)[WSPay](https://www.wspay.info/) Payment Integration for [djangoSHOP](http://www.django-shop.org).—## Requirements[django-shop]## InstallationInstall usingpip:`bash pip installdjangoshop-wspay`Add the following to your settings:`python INSTALLED_APPS += ['shop_wspay'] SHOP_CART_MODIFIERS += ['shop_wspay.modifiers.WSPayPaymentModifier'] SHOP_ORDER_WORKFLOWS += ['shop_wspay.payment.WSPayWorkflowMixin'] SHOP_DEFAULT_CURRENCY = 'HRK'  # WSPay requires you to send amount in Croatian kuna. SHOP_WSPAY_SHOP_ID = '<shopID>'  # WSPay shop ID. SHOP_WSPAY_SECRET_KEY = '<secretKey>'  # WSPay secret key. `Additional settings with defaults:`python SHOP_WSPAY_FORM_URL ='https://form.wspay.biz/Authorization.aspx'# Set to'https://formtest.wspay.biz/Authorization.aspx'for testing. SHOP_WSPAY_PAYMENT_VIEW = False  # Set if a separate payment view should be rendered before sending to wspay. SHOP_WSPAY_CART_URL = SHOP_CART_URL ='shop:cart-list'# Url of a cart, used to redirect in some cases. SHOP_WSPAY_THANK_YOU_URL = SHOP_THANK_YOU_URL = None  # Thank you url, if None latest order is used. SHOP_WSPAY_COMMISION_PERCENTAGE = None  # Set to add commision percentage for purchase via WSPay. SHOP_WSPAY_MODIFIER_CHOICE_TEXT = 'WSPay'  # Text displayed as a choice for selecting wspay payment. SHOP_WSPAY_ERROR_MESSAGE = None  # Message added to django messages framework if there's a transaction error. SHOP_WSPAY_CANCEL_MESSAGE = None  # Message added to django messages framework if transaction is canceled. SHOP_WSPAY_SUCCESS_MESSAGE = None  # Message added to django messages framework transaction is successful. `[django-shop]:https://github.com/awesto/django-shop
Package: django-shortcircuit
=============================django-shortcircuit=============================.. image:: https://badge.fury.io/py/django-shortcircuit.png:target: https://badge.fury.io/py/django-shortcircuit.. image:: https://travis-ci.org/comandrei/django-shortcircuit.png?branch=master:target: https://travis-ci.org/comandrei/django-shortcircuit.. image:: https://landscape.io/github/comandrei/django-shortcircuit/master/landscape.svg?style=flat:target: https://landscape.io/github/comandrei/django-shortcircuit/master:alt: Code HealthShortcircuit Django middlewares for a list of views you want skippedDocumentation-------------The full documentation is at https://django-shortcircuit.readthedocs.org.Quickstart----------Install django-shortcircuit::pip install django-shortcircuitThen use it in a project::Include it in your middleware classes, BEFORE middlewares you potentially want skipped::MIDDLEWARE_CLASSES = ( ... 'shortcircuit.middleware.ShortCircuitMiddleware', ... )Define a list of urlpatterns you want skipped::SHORTCIRCUIT_URL_PATTERNS = (r'^/skip_me', r'^/also_me')Features--------* This middleware allows skipping middlewares that aren't usefull for certain URL patterns.It's targeted to applications where there is heavy processing done in middleware and for various reasons (code ownership, lack of time) it's hard to do proper refactoringBear in mind, this only skips process_view methods of middlewares used after ShortCircuitMiddlewareRunning Tests--------------Does the code actually work?::tox -e py27-django19Credits---------Tools used in rendering this package:*  Cookiecutter_*  `cookiecutter-pypackage`_.. _Cookiecutter: https://github.com/audreyr/cookiecutter.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackageHistory-------0.1.0 (2016-05-15)++++++++++++++++++* First release on PyPI* Includes shortcircuiting middleware, bypassing process_view only
Package: django-shortcodes
This package providesWordPress shortcodesupport for Django
templates. It is based on code byMark Steadman.Support for different shortcodes are generated by parsers. The package
currently includes a parser for YouTube videos. Additional parsers can be
submitted for inclusion at the package’sissue
tracker.InstallationUsepip installdjango-shortcodesor clone theGit
repository.Usage{% load shortcodes_filters %}
{{ text|shortcodes|safe }}SettingsVimeoSHORTCODES_VIMEO_HEIGHT: Default height for Vimeo videos.SHORTCODES_VIMEO_WIDTH: Default width for Vimeo videos.YouTubeSHORTCODES_YOUTUBE_JQUERY: Boolean whether thejquery.flash pluginis
available.SHORTCODES_YOUTUBE_HEIGHT: Default height for YouTube videos.SHORTCODES_YOUTUBE_WIDTH: Default width for YouTube videos.
Package: djangoshortcuts
djangoshortcuts提供一个全局命令，用于方便快捷生成模板等相关文件。安装通过 PYPI 安装(推荐)pip install djangoshortcuts通过源码安装python setup.py install使用方式在安装成功之后，获得一个全局命令：dj，通过 dj -h 可以查看到该命令的使用方式$dj -h
usage: dj [-h] --app APP [-a ADD] [-t TEMPLATE] [-s STATIC]

Easily to create files when using django

optional arguments:
  -h, --help            show this help message and exit
  --app APP             input the app name which django created
  -a, --add ADD         add file automatically, the value must be one of
                        ['forms', 'urls']
  -t, --template TEMPLATE
                        add templates html files
  -s, --static STATIC   add static files

You must cd BASE_DIR to run this script全局命令备忘查询有时候忘记安装这些模块都提供了哪些全局命令，可以通过以下这种方式查询。$python -m djangoshortcuts -h
Please use command [dj -h] for the detail.举例说明下面简要举例说明这个命令的使用方式，其实看上面的 usage 就可以明白九成以上了。假设 django app 名称为 polls， 首先需要切换到网站的根目录下，就可以运行以下命令生成 forms.py 或者 urls.py 文件dj --app polls -a forms
dj --app polls -a urls生成 index.html 文件dj --app polls -t index.html该命令会自动创建 polls/templates/polls 相关的文件夹，并生成 polls/templates/polls/index.html 文件生成 style.css 文件dj --app polls -s style.css该命令会自动创建 polls/static/polls 相关的文件夹，并生成 polls/static/polls/style.css 文件考虑到静态文件夹下常增加 css 和 js 文件夹来管理相关静态文件，所以在 -s 参数的行动逻辑多增加一个功能dj --app polls -s css/style.css该命令和 3 的区别在于，文件的路径为 polls/static/polls/css/style.css，相关的文件夹会自动创建dj --app polls -s js/login.js同样地，文件的路径为 polls/static/polls/js/login.js后记以上参数中，--app 是必选参数，除此之外的参数都是可选参数并且不互斥。也就是说添加文件的时候，不同的参数可以同时进行。
Package: django-shortcuts
You spend too much time typingpython manage.py.UsageDjango shortcuts installs adjangobinary that proxies
Django’smanage.pyanddjango-admin.pyscripts.$ django <command or shortcut>

$ cd any/project/subdirectory
$ django <command or shortcut>RequirementsSome commands require additional packagesSouthHaystackDjango Command ExtensionsShortcuts# Django
'c'  : 'collectstatic',
'r'  : 'runserver',
'sd' : 'syncdb',
'sp' : 'startproject',
'sa' : 'startapp',
't'  : 'test',

# Shell
'd'  : 'dbshell',
's'  : 'shell',

# Auth
'csu': 'createsuperuser',
'cpw': 'changepassword',

# South
'm'  : 'migrate',
'mm' : 'makemigrations',
'sm' : 'schemamigration',
'dm' : 'datamigration',

# Haystack
'ix' : 'update_index',
'rix': 'rebuild_index',

# Django Extensions
'sk' : 'generate_secret_key',
'rdb': 'reset_db',
'rp' : 'runserver_plus',
'shp': 'shell_plus',
'url': 'show_urls',
'gm' : 'graph_models',
'rs' : 'runscript'Installation$ pip install django-shortcuts
Package: django-shortlink
django-shortlinkA simple Django App to hold short links mapped to long urls used in your projects.RequirementsTo use this package following needed. if not provided will be installed automatically.Django>=2.0InstallationNote:This package is well tested ondjango>=2.0. But if you are using older versions can be
used with minor changes in structure.install using pip:$ pip install django-shortlinkUsageRegister app insettings.pyINSTALLED_APPS = [
    "django_shortlink",
]updateurls.pylike below:urlpatterns += [
    ...
    re_path(r'', include('shortlink.urls')),
    ...Now set Setting variables, If not will use default values as below:SHORTEN_PATH_LENGTH=8SHORTLINK_URL_BASE='s/'HOST_ADDRESS='http://localhost:8000'Now to create shortlink, pass your full_url like this:fromshortlink.modelsimportShortLinks=ShortLink.objects.create(full_url="https://test.com")print(s.short_url)short_urlis the shorten url that you should give users.
If they click on it, methods inviews.pywill be triggered
and if short_url is valid, will redirect tofull_url.
Package: django-short-links
django-short-linksURL / Link shortener web app.Getting StartedInstalllinks:pipinstalldjango-short-linksAddlinkstoINSTALLED_APPS. Make sure thatdjango.contrib.authinstalled, then add a new settingLINKS_SITE_NAME, insettings.py:# settings.pyINSTALLED_APPS=[...'links','django.contrib.auth',...]# Your server's IP address without trailing slashLINKS_SITE_URL='https://your.domain.com'Includelinksanddjango.contrib.auth.urls, in project'surls.py:# urls.pyurlpatterns=[...path('l/',include('links.urls')),path('accounts/',include('django.contrib.auth.urls')),...]Runmigrate:pythonmanage.pymigrateNow, you can open your browser athttps://your.domain.com/l/.I hope that you find this useful.
Package: django-shorts
You spend too much time typingpython manage.py.UsageDjango shorts installs adjangobinary that proxies
Django’smanage.pyanddjango-admin.pyscripts.$ django <command or shortcut>$ cd any/project/subdirectory
$ django <command or shortcut>RequirementsSome commands require additional packagesDjangoShortcutsALIASES = {# Django
‘c’  : ‘collectstatic’,
‘r’  : ‘runserver’,
‘sd’ : ‘syncdb’,
‘sp’ : ‘startproject’,
‘sa’ : ‘startapp’,
‘t’  : ‘test’,# Shell
‘d’  : ‘dbshell’,
‘s’  : ‘shell’,# Auth
‘csu’: ‘createsuperuser’,
‘cpw’: ‘changepassword’,# database
‘m’  : ‘migrate’,
‘mkm’ : ‘makemigrations’,# session
‘cs’ : ‘clearsessions’,Installation$ pip install django-shorts
Package: django-short-text-field
Short Text Field for DjangoA very simple Django app that adds aShortTextFieldmodel field class, which
is treated like aTextFieldin the database (i.e. the data is stored in the
database with thetextrather than thevarchartype, and the developer does
not need to specify amax_length), but uses theTextInputwidget (a single-
line<input type="text>) by default rather thanTextarea. This is ideal for
PostgreSQL, which recommends the 'text' type in a wider variety of
circumstances than other commonly-used database backends (see thePostgreSQL docs).InstallationThis package is available fromPyPI, so you can install
it usingpiplike this:pip install django-short-text-fieldUsageAdd'short_text_field'to yourINSTALLED_APPSsetting like this:INSTALLED_APPS = [
    ...
      'short_text_field',
]Add aShortTextFieldto a model like this:from short_text_field.models import ShortTextField

...

  class ExampleModel(models.Model):
        ...
        example_field = ShortTextFieldA model with aShortTextFieldshould be registered in the admin site usingshort_text_field.admin.ModelAdmin.admin.site.register(ExampleModel, short_text_field.admin.ModelAdmin)A subclass of this class will also work:class ExampleModelAdmin(short_text_field.admin.ModelAdmin):
    model = ExampleModel
    ...

admin.site.register(ExampleModel, ExampleModelAdmin)If you have a hierarchy ofModelAdminsubclasses, you can still
incorporateshort_text_field.admin.ModelAdmineasily as a mixin:class ExampleModelAdmin2(short_text_field.admin.ModelAdmin, ExampleModelAdmin1):
    model = ExampleModel
    ...

admin.site.register(ExampleModel, ExampleModelAdmin)You can also use a subclass ofshort_text_field.admin.AdminSitefor the
site, which will makeshort_text_field.admin.ModelAdminthe defaultModelAdminsubclass to use for registering. In the simplest case, you can
just set thedefault_siteattribute of theAdminConfigclass and then
register all of your models in the normal way:from django.contrib.admin import apps
import short_text_field.admin.AdminSite

...

class ExampleAdminConfig(apps.AdminConfig):
    ...
    default_site = short_text_field.admin.AdminSite
Package: django-short-text-field-0.2
Short Text Field for DjangoA very simple Django app that adds aShortTextFieldmodel field class, which
is treated like aTextFieldin the database (i.e. the data is stored in the
database with thetextrather than thevarchartype, and the developer does
not need to specify amax_length), but like aCharFieldin forms (i.e. it
uses a single-line input). This is ideal for PostgreSQL, which recommends the
'text' type in a wider variety of circumstances than other commonly-used
database backends (see the [PostgreSQL docs]
(https://www.postgresql.org/docs/9.1/static/datatype-character.html)).UsageAdd'short_text_field'to yourINSTALLED_APPSsetting like this:INSTALLED_APPS = [
    ...
      'short_text_field',
]Add aShortTextFieldto a model like this:from short_text_field.models import ShortTextField

...

  class ExampleModel(models.Model):
        ...
        example_field = ShortTextFieldA model with aShortTextFieldshould be registered in the admin site usingshort_text_field.admin.ModelAdmin.admin.site.register(ExampleModel, short_text_field.admin.ModelAdmin)A subclass of this class will also work:class ExampleModelAdmin(short_text_field.admin.ModelAdmin):
    model = ExampleModel
    ...

admin.site.register(ExampleModel, ExampleModelAdmin)If you have a hierarchy ofModelAdminsubclasses, you can still
incorporateshort_text_field.admin.ModelAdmineasily as a mixin:class ExampleModelAdmin2(short_text_field.admin.ModelAdmin, ExampleModelAdmin1):
    model = ExampleModel
    ...

admin.site.register(ExampleModel, ExampleModelAdmin)You can also use a subclass ofshort_text_field.admin.AdminSitefor the
site, which will makeshort_text_field.admin.ModelAdminthe defaultModelAdminsubclass to use for registering. In the simplest case, you can
just set thedefault_siteattribute of theAdminConfigclass and then
register all of your models in the normal way:from django.contrib.admin import apps
import short_text_field.admin.AdminSite

...

class ExampleAdminConfig(apps.AdminConfig):
    ...
    default_site = short_text_field.admin.AdminSite
Package: django-short-url
django-short-urlDjango Short URLInstallationpipinstalldjango-short-urlUsagefromdjango_short_url.viewsimportget_surldefxxx(request):surl=get_surl(lurl)Urls.pyurlpatterns=[url(r'^s/',include('django_short_url.urls',namespace='django_short_url')),]orfromdjango.urlsimportre_pathfromdjango_short_urlimportviewsassurl_viewsurlpatterns=[re_path(r'^(?P<surl>\w+)',surl_views.short_url_redirect,name='short_url_redirect'),]Settings.pyINSTALLED_APPS=(...'django_short_url',...)# Redirect url when short url not existsDJANGO_SHORT_URL_REDIRECT_URL=''
Package: django-shorturls
django-shorturlsA custom URL shortening app for Django, including easyrev=canonicalsupport.Most code was originally by Simon Willison; seehttp://blog.simonwillison.net/post/57956849396/revcanonical/for details. Improved
slightly and packaged by Jacob Kaplan-Moss.Patches welcome:http://github.com/bfirsh/django-shorturlsUsageSo, you want to host your own short URLs on your Django site:In your settings, define a set of prefixes for short URLs:SHORTEN_MODELS = {
    'A': 'myapp.animal',
    'V': 'myapp.vegetable',
    'M': 'myapp.mineral'
}The keys are string prefixes; they can be any string, actually,
but since we’re going for short a single character is probably good.Values are the (hopefully-familiar)"<app-name>.<model-class>"used
by Django to identify a model. Remember:app-nameis the
(case-sensitive) last bit of your app’s name inINSTALLED_APPS, and<model-class>is your model class’s name, lowercased.Make sure your models have aget_absolute_url()method defined.Wire up the redirect view by adding to your URLconf:('^short/', include('shorturls.urls'))If you’d like to quickly link to shortened URLs in your templates, stick"shorturls"inINSTALLED_APPS, and then in your templates do:{% load shorturl %}
<a href="{% shorturl object %}">...</a>(whereobjectis a model instance).Alternatively:{% load shorturl %}
{% revcanonical object %}This generates the whole<linkrev="canonical"href="...">tag for
you.That’s it.If you’d like more control, keep reading.SettingsAvailable settings are:SHORTEN_MODELSYou’ve seen this one.SHORT_BASE_URLIf defined, theshorturlandrevcanonicaltemplate tags will
prefix generated URLs with this value. Use this if you’ve got a shorter
domain name you’d like to use for small URLs.For example, givenSHORT_BASE_URL ='http://exm.pl/',{% shorturl obj %}would return something likehttp://exm.pl/AbCd.SHORTEN_FULL_BASE_URLThe domain to redirect to when redirecting away from the small URL.
Again, you’ll use this if your short URL base and your “real” site
differ.If not defined, the redirect view will try to guess the proper domain by
consulting thedjango.contrib.sitesframework, if installed, or the
requested domain, if not.SHORTURLS_DEFAULT_CONVERTERThe converter that is used to translate between short URLs and model IDs.
Defaults to the built in base 62 conversion.Available converters:shorturls.baseconv.base62Base 62 encoding.shorturls.baseconv.base32Douglas Crockford’s base 32.shorturls.baseconv.hexconvHex encoding.shorturls.baseconv.binBinary encoding, because why not.
Package: django-shortuuidfield
django-shortuuidfield----------------Provides a ShortUUIDField for your Django models which uses the base-57 "Short UUID" package at https://github.com/stochastic-technologies/shortuuid/ .Originally, a fork from David Cramer's excellent django-uuidfield, but not much is left of that besides a bit of structure.Installation============Install it with pip (or easy_install)::pip install django-shortuuidfieldUsage=====First you'll need to attach a ShortUUIDField to your class. This acts as a char(22) to maintain compatibility with SQL versions::from shortuuidfield import ShortUUIDFieldclass MyModel(models.Model):uuid = ShortUUIDField()Enjoy!Notes=====* ShortUUIDField is a subclass of django.db.models.CharField* You can pass usual Django CharField parameters on init, although some of them are added/overwritten:+ max_length=22 (since we are using base-57 format which is fixed at 22 characters)+ blank=True, editable=False (set auto=False to remove these fields enforcement)* Uses shortuuid.uuid() that generates uuid4 random values
Package: django-shortwave
This application provides the ability for users to create and manage
custom command files for use withShortwave.Using the instructions found in thedefault commands file, users can add
their own commands to a custom wave file. They can then provide the URL of
their custom commands file toShortwaveand save their new bookmarklet.From that point users can add, delete, and change their custom commands from a
Web interface and their bookmarklet updates immediately (that’s the beauty ofShortwave).Refer to thedocumentationfor further information.