Saravanan666/pypi-org huggingface dataset:
Package: django-shotgun
django-shotgunCreated byStephen McDonalddjango-shotgunis a Django application that provides the ability
to validate HTTP status codes across your entire Django application.django-shotgunconsists of two parts, amanagement commandcalledload_shotgunthat preparesdjango-shotgunwith a
snapshot of your database to use in theDjango test case, and the
test case itself which spiders your Django site testing for valid HTTP
status codes for every URL it finds.InstallationAssuming you havepipinstalled, the easiest method is to install
directly from pypi by running the following command:$ pip install -U django-shotgunOtherwise you can check out the source directly and install it via:$ python setup.py installOnce installed you can then adddjango_shotgunto yourINSTALLED_APPS.Shotgun Loadingdjango-shotgunis most effective when used in conjunction with
real data. This is in contrast to the approach a Django test case will
take where it purposely does not use the project’s real database to
run tests.django-shotgundeals with this by providing a
management command calledload_shotgunwhich dumps the contents of
your database to a fixture calledshotgun.json. Under the hood,load_shotgunextends the built-indumpdatacommand and supports
the same options, with one extra option calledpathwhich allows
you to define where the fixture file should be saved to:$ python manage.py load_shotgun --path=/path/to/fixtures/If thepathoption is omitted, the fixture file will be saved to
the root of the current project.Shotgun FiringThedjango-shotguntest case is a standard Django test case and
can therefore be run by calling the built-intestmanagement
command:$ python manage.py testThedjango-shotguntest case will first test the URL/and
parse URLs found in<a>tags from the resulting response. It then
continues this process for each URL it finds until all URLs have been
tested.<form>tags and their field elements are also parsed and
each form is tested with both aGETandPOST, first without
any field data and then with test values for each form field. The test
case will fail if any response has a status code other than200.ConfigurationThe following settings can be defined in your project’ssettingsmodule to control the behaviour ofdjango-shotgun.SHOTGUN_EXCLUDE_APPS- A list of app names to exclude when
generating the shotgun fixtures file. Defaults to[].SHOTGUN_EXCLUDE_URLS- A list of URLs to exclude from checking.
Defaults to[].SHOTGUN_FIXTURE_NAME- The name of the fixture file that will
be saved and loaded from. Defaults toshotgun.json.SHOTGUN_FIXTURE_PATH- The path to where the fixture file will
be saved and loaded from. Defaults to the project’s root directory.SHOTGUN_ROOT_URL- The first URL that the test case will
request. Defaults to/.
Package: django-showurls
# django-showurls[![Build status](https://travis-ci.org/Niklas9/django-showurls.svg?branch=master)](https://travis-ci.org/Niklas9/django-showurls)[![Latest version](https://img.shields.io/pypi/v/django-showurls.svg?style=flat)](https://pypi.python.org/pypi/django-showurls/)[![Downloads](https://img.shields.io/pypi/dm/django-showurls.svg?style=flat)](https://pypi.python.org/pypi/django-showurls/)Adds a new management command that outputs all configured urls from your Djangoproject.This is equivalent to Ruby on Rails command "rake routes", which I have foundquite useful lately.## UsageFirst you'll need to add the django_showurls app in your Django project'ssettings.py file:INSTALLED_APPS = (..'django_showurls',..)After that you should be able to get an overview of all the urls in your projectby calling the showurls management command from your manage.py:$ python manage.py showurls^admin/^$^login/$^logout/$.. etc ..## InstallationInstall with pip (or easy_install)::pip install django-showurls## Todos* should probably add some system tests that tests the actual command(./manage.py showurls) on arbitrary Django projects* look into if we can inspect what HTTP methods a specific url accepts (bylooking at the corresponding view?)## LicenseBSD, just as the main Django project. See LICENSE file in root of this repo.## ContributingThis project accepts contributions via GitHub pull requests.* follow Google's Python style guidehttps://google-styleguide.googlecode.com/svn/trunk/pyguide.html* make commits of logical units, messages should include what changed and whyand be written in past tense
Package: django-shrink
A js compiler & css minifier with sass compatibilityRequirementsDjango 1.3+2.6 <= Python < 3Java for compiling and compressingdjango.contrib.staticfilesinINSTALLED_APPSInstallationpip install django-shrinkConfigurationINSTALLED_APPS = (
    ...
    'django.contrib.staticfiles',
    ...
    'shrink',
    ...
)Optionally if you want to useSassyou need to add the compilation view to
your urls:# urls.py
urlpatterns = patterns('',
    ...
    (r'', include('shrink.urls')),
    ...
)NoteThe compilation view is only available whenDEBUG = TrueUsageDefine your javascripts and css files in your template as in this example:{% import shrink %}
{% styles css/myproject-min.css %}
    css/reset.css
    css/forms.css
    css/myproject.scss
{% endstyles %}
{% scripts js/myproject-min.js %}
    js/jquery.js
    js/plugin.js
    js/myproject.js
{% endscripts %}WhenDEBUG = Truethis will end up as:<link rel="stylesheet" href="{{ STATIC_URL }}css/reset.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/forms.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/myproject.scss">
<script src="{{ STATIC_URL }}js/jquery.js"></script>
<script src="{{ STATIC_URL }}js/plugin.js"></script>
<script src="{{ STATIC_URL }}js/myproject.js"></script>WhenDEBUG = Falsethis will end up as:<link rel="stylesheet" href="{{ STATIC_URL }}css/myproject-min.css?timestamp">
<script src="{{ STATIC_URL }}js/myproject-min.js?timestamp"></script>When deploying you want to compile your javascripts, compile your scss (Sass)
and compress the css files. django-shrink overrides thecollectstaticmanagement command and after collecting the static files it does the compiling
and compressing. Thus you need to execute the management commandcollectstaticin your deployment environment.NoteAs of yet you need all the source css files and the destination
minified css file to be in the same path if they ahev relative references to
media.SettingsSHRINK_TIMESTAMPControls if you want to timestamp the compressed/compiled assets.Default:TrueSHRINK_STORAGEStorage for the compressed/compiled assets.Default:settings.STATICFILES_STORAGESHRINK_CLOSURE_COMPILERPath to Google Closure Compiler jar.Default: Google Closure Compiler jar provided.SHRINK_CLOSURE_COMPILER_COMPILATION_LEVELGoogle Closure Compiler optimization level.Default:'SIMPLE_OPTIMIZATIONS'SHRINK_YUI_COMPRESSORPath to YUI CompressorDefault: YUI compressor jar provided.
Package: django-shts3
Django shortcutsYou spend too much time typingpython3 manage.pyThe tool is used byUptraderteam for more then two yearsIt's a fork ofdjango-shortcutsbyJohannes GorsetFeaturesshorter aliases for built-in commandsconfig files for user-defined shortcutsworks from any project subdirectory$python3manage.pyshell
$cdany/project/subdirectory
$ds# the sameInstallation$pip3installdjango-shts3UsagePyPi package installsdjangoanddbinaries.
Arguments with-at the begining before command are eaten by the Python interpretator.$django<commandorshortcut>

$d<commandorshortcut>Default shortcutsAliasCommandccollectstaticrrunservers / shshellttestmmigratemkmmakemigrationscsucreatesuperusercpwchangepasswordsastartappCustomizationThe program loads extra aliases from.django_shts3file in project directory and in home directory.Example:alias @@@ command
m @@@ migrateExample:I have a docker container with Django and I should bind to 0.0.0.0:8000 on runserver command, so I have:$ cat .django_shts3
r @@@ runserver 0.0.0.0:8000That allows me to start Django server like:$ d rContributingPull requests are welcome!Please report all problems toGitLab issues
Package: django-shuoshuos
=====Shuoshuos=====Polls is a simple Django app to conduct Web-based polls. For eachquestion, visitors can choose between a fixed number of answers.Detailed documentation is in the "docs" directory.Quick start-----------1. Add "polls" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'shuoshuos',]2. Include the polls URLconf in your project urls.py like this::path('shuoshuos/', include('shuoshuos.urls')),3. Run `python manage.py migrate` to create the polls models.4. Start the development server and visit http://127.0.0.1:8000/admin/to create a poll (you'll need the Admin app enabled).5. Visit http://127.0.0.1:8000/shuoshuos/ to participate in the poll.
Package: django-sidebar
Dynamic Sidebar creation for Django. Easily create and manage sidebar from Django Admin with drag and drop sidebar widget ordering.RequirementDjango 1.3+InstallationFrom pypi:$ pip install django-sidebaror:$ easy_install django-sidebaror clone from github:$ git clone git://github.com/ekaputra07/django-sidebar.gitor:$ cd django-sidebar
$ sudo python setup.py installUsageFor more detail about the usage, please refer to the Django-sidebarwiki.
Package: django-sidedish
Django SideDish==========================Dishes are content boxes visible in various "side's" of your websiteWhether, and where, a given dish will appear on a page depends on both the theme enabled and administrative dish settings. Dish settings are controlled from the SideDish administration. It is possible to control whether each dish is enabled where it will be placed on the page, and control the visibility of dish on each page.Features----------- Control visibilty of dishes on each page from admin- CKeditor support for body field- Schedule options for publishing- Template tags to render individual dishes or side's- Templates for dishes and side'sInstallation----------Add ``sidedish`` to your ``INSTALLED_APPS`` setting.Usage----------Available settings----------SIDEDISH_SIDES = (('left', _('Left')),('right', _('Right')),)List with side definitions.SIDEDISH_STATUS_DRAFT = 1SIDEDISH_STATUS_PUBLISHED = 2SIDEDISH_STATUS_CHOICES = ((SIDEDISH_STATUS_DRAFT, _("Draft")),(SIDEDISH_STATUS_PUBLISHED, _("Published")),)Defines the various dish status choices.Templates----------#### Template TagsThe following template tag libraries are available:- `sidedish`: tags for dealing with dishes in general#### sidedishesRenders a side full of dishes{% sidedishes 'side_name' %}#### sidedishRenders a individual dish{% sidedish 'dish_slug'|dish_object %}#### Template filessidedish/sidedish.htmlsidedish/side.html
Package: django_sieve
For a lot of web applications - Blogs come to mind as a canonical example, the queryset needs to be filtered in the views based upon some business rules. For instance, in a Blog, a “Dashboard” view - allowing editing of posts, should only ever have posts written by the user who is currently logged-in.In general, there is a need to filter data based on some business logic - universally! i.e. across each and every view. The ugly way of doing this would be to write queries substantiating the business logic in every single view. Sieve does the same job beautifully, minimally and correctly.InstallationWe are at the cheeseshop:pip install django_sieveUsageTo use django_sieve in a project:Include it in INSTALLED_APPS in your settings file.Define a sieve model. A sieve model is the control for defining the filtering criteria of user data. For instance, in our example, we have a bookstore in which a user can subscribe to all the books from a particular author or all the books from a few publishers. In this case, his book list need to only contain books from the author and publishers that he has chosen. In order to do this, we define a sieve model like so:class Sieve(models.Model):
        group = models.ForeignKey('auth.Group')
        publisher = models.ManyToManyField(Publisher)
        author = models.ForeignKey(Author)Declare your project-wide sieve model insettings.py. For instance, if the sieve model is called Sieve and resides in the bookstore app:SIEVE_MODEL = 'bookstore.Sieve'UseSieveManageras the ModelManager for all the models in your project that you want to filter based on the criteria defined in the sieve model:class Author(models.Model):
        first_name = models.CharField(max_length=30)
        last_name = models.CharField(max_length=40)
        email = models.EmailField()
        objects = SieveManager()Use thesievemethod to define your queryset in your views like so:class BookView(ListView):
        queryset = Book.objects.sieve(user=request.user)That is all. Site-wide filtering of user data based on predefined criteria without having to write queries for all the views.Please be wary of performance issues though - in our experience, django-sieve works for 90% cases especially when you need to bring everything up for a quick demo. However, as your site matures and the number of users increase, you may want to invest in profiling your views and hand-crafting these queries when and where required.Historyi.0.0 (2014)Got to 93% test coverage.0.3.0 (2014)Changed the mapping from User to Group, dealt with self-referencing models etc.0.2.0 (2014)Added support for ManyToMany fields in SIEVE_MODEL0.1.0 (2014)First release on PyPI.
Package: django-sifac
Django-SIFAC is a API to interact with the financial repository called SIFAC
and deployed in many french universities. It is not really a django specific
app for SIFAC but it’s easy to use with Django. For the moment, only data on
cost centers, eotp, funds and functional domains are available for reading, but
not for writing.InstallationTo install the saprfc library, please refer to thisdocumentation.
If you place the rcfsdk headers in the right place, you can run this commandpip install django-sifacIntegrate with your django appYou need to add this lines to the settings file of your django projectSIFAC = {
    'HOST': '' #  Hostname to connect (i.e sap.host.com)
    'SYSNR': '' # System number to connect to (i.e '00')
    'CLIENT': '' # Client number logged in (i.e '500')
    'USER': '' # Username
    'PASSWORD': '' # Password
}If you want to use the SAP models filter application, you must activate the
administration interface in the settings file of your project and add the sifac
application in your INSTALLED_APPS settingINSTALLED_APPS = (
    ...,
    django.contrib.admin,
    ...,
    sifac
)To create tables needed by the sifac application, syncing your database is
necessary$> python manage.py syncdbBasic usageIf you’re using filters and pattern for your SAP Models (or not), it is really
easy to use the library to retrieve filtered data. Filters and patterns for
each SAP models can be created or updated in the admnistration interfacefrom sifac import service

sifac_service = SifacService()
cost_centers = sifac_service.get_filtered_cost_center_list()Launching testsTo launch tests, you should install django, saprfc and packages in file requirements-test.txt$> python run_tests.py sifac
Package: django-signalcontrol
django-signalcontrolDjango signalcontrol is a django extension for dynamically enabling/disabling signals. This application allows django signals to be disabled or enabled on-demand through the django admin interface.Code QualityWorkflowDescriptionStatusBanditsecurity checksBlackcode formattingCodeQLsecurity analysisCoverallscode coverage statusIsortpython import orderingMypystatic type checkingPytestunit testingRadoncode complexity analysisRuffstatic code analysisSafetydependency scannerCode Coverage Dashboard:https://coveralls.io/github/djangoaddicts/django-signalcontrolDocumentationFull documentation can be found onhttp://django-signalcontrol.readthedocs.org.
Documentation source files are available in the docs folder.Licensedjango-signalcontrol is licensed under the GNU-3 license (see the LICENSE file for details).https://github.com/djangoaddicts/django-signalcontrol/blob/docs/LICENSEInstallationinstall via pip:pip install django-signalcontroladd the following to your INSTALLED_APPS in settings.py:djangoaddicts.signalcontrolFeaturesSignal DecoratorSignalControl can be added to a signal with the provided decorator. In the signals.py file, import the signalcontrol
decorator and add the signal_control decorator to the line directly above the signal definition.Admin InterfaceAn django admin interface for django-signalcontrol is available to set signals to enabled or disabled. This displays
all signals that can be controlled, and lists the application, model, signal receiver and signal name.
Additionally, full search is available and filters are available for each field.
Signals can be enabled or disabled individually or in bulk.Usage Examplefromsignalcontrol.decoratorsimportsignal_control@receiver(post_save,sender=MyCoolModel)@signal_controldefmsg_after_my_model_save(sender,instance,created,**kwargs):""" some signal """print('you just saved an instance of MyCoolModel')
Package: django-signal-webhooks
Django Signal Webhookspipinstalldjango-signal-webhooksDocumentation:https://mrthearman.github.io/django-signal-webhooks/Source Code:https://github.com/MrThearMan/django-signal-webhooks/Contributing:https://github.com/MrThearMan/django-signal-webhooks/blob/main/CONTRIBUTING.mdThis library enables you to add webhooks to a Django project for any create/update/delete
events on your models with a simple configuration. New webhooks can be added in the
admin panel, with or without authentication, with plenty of hooks into the webhook sending
process to customize them for your needs.# project/settings.py# Add to instaled appsINSTALLED_APPS=[..."signal_webhooks",...]# Add default webhook configuration to the User modelSIGNAL_WEBHOOKS={"HOOKS":{"django.contrib.auth.models.User":...,},}
Package: django-signature
Application to generate x509 certificates and sign models with PKCS#7 standardhttp://bitbucket.org/bearstech/django-signature/Beta : not really for production useFeatures :PKI :Generate (or load) RSA keys and store them in Django modelsGenerate x509 certificates and store them in Django modelsLoad x509 certificat and find relations with other Certificates and KeysGenerate (or load) x509 Requests and store them in Django modelsGenerate self-signed x509 for root CAVerify certificate chain (with CRLs)Sign Certificate RequestsDigital signatureSign/verify text with PKCS#7 standardSign/verify simple modelswith PKCS#7 standardSupport FileField (with sha512 digest)Good test coverageTodo :Sign complex modelsGenerate indexes with OpenSSL.generate_index()Improve configurationCert load with renew… and much moreExamples :There is an simple PKI example:from signature.models import Key, Certificate, CertificateRequest
from datetime import datetime

ca_pwd = "R00tz"
c_pwd = "1234"

# CA and Client keys
ca_key = Key.generate(ca_pwd)
c_key = Key.generate(c_pwd)

# CA Cert
ca_cert = Certificate()
ca_cert.CN = "Admin"
ca_cert.C = "FR"
ca_cert.key = ca_key
ca_cert.days = 150
ca_cert.is_ca = True
ca_cert.generate_x509_root(ca_pwd)
ca_cert.save()

# Client's request
rqst = CertificateRequest()
rqst.CN = "World Company"
rqst.C = "FR"
rqst.key = c_key
rqst.sign_request(c_pwd)
rqst.save()

# Sign client's request and return certificate
# (you can give to Client's certificate CA capabilities with ca=True)
c_cert = ca_cert.sign_request(rqst, 150, ca_pwd, ca=False)

# Verify created certificate :
c_cert.check()

# Revoke certificate :
c_cert.revoke(c_cert, ca_pwd)

# Import a Key / Certificate:
imported = Key.new_from_pem(pem_str, passphrase="gigowatt", user=None)
imported = Certificate.new_from_pem(pem_str)For more examples, see SignaturePKITestCase into tests/test_project/apps/testapp/tests.pyThere is an simple signature example:# Sign Text
text = "This is a data"
data_signed = c_cert.sign_text(text, c_pwd)
result = c_cert.verify_smime(data_signed)

# Sign Model (get text)
auth1 = Author(name="Raymond E. Feist", title="MR")
data_signed = c_cert.sign_model(auth1, c_pwd)
result = c_cert.verify_smime(data_signed)

# Sign Model (get Signature)
auth1 = Author(name="Raymond E. Feist", title="MR")
signed = c_cert.make_signature(auth1, self.c_pwd)
signed.check_pkcs7(signed)For more examples, see SignatureTestCase into tests/test_project/apps/testapp/tests.pyTests :cd testspython bootstrap.py./bin/buildout.py -v./bin/test-1.2 or ./bin/test-1.1Requirements :M2Crypto :http://chandlerproject.org/Projects/MeTooCryptoDjango >= 1.1Openssl
Package: django-signedforms
A small library that provides a form class that signs a configurable set of
hidden fields usingdjango.core.signing.The most common use case for such a form is when the view that handles the post
differs from the view that sets up the form, but you need to pass some
information from one view to the other, without evil hackers tampering with your
precious data.UsageSubclass SignedForm, and define which fields should be signed:from signedforms.forms import SignedForm

class MyForm(SignedForm):
    signed_fields = ['redirect_url',]

    redirect_url = forms.CharField(required=False, widget=forms.HiddenInput)In the form that sets up the view, provide the data to be signed in theinitialdictionary:my_form = MyForm(initial={'redirect_url': self.request.path_info})and in the view that handles the posted form:def form_valid(self, form):
    # do some work
    return HttpResponseRedirect(form.cleaned_data['redirect_url'])NoteIf the user tampered with the hidden data, the form will not validate.WarningOnly fields that contain JSON-serializable data can be signed. This includes
all fields that are represented as text in the database, but not datetimes
and other more “complex” types.
Package: django-signoff
Present users with your Terms of Service and other documents, and record their consentDocumentationThe full documentation is athttps://django-signoff.readthedocs.io.QuickstartInstall django-signoff:pip install django-signoffAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'signoff.apps.SignoffConfig',...)Add django-signoff’s URL patterns:urlpatterns=[...url(r'^signoff/',include('signoff.urls')),...]If you want users to be automatically prompted to sign any documents that you
add before they can use your site, add django-signoff’s middleware:MIDDLEWARE=(...'signoff.middleware.ConsentMiddleware',...)You can add some settings to your settings.py file to configure django-signoff:# Send a notification to the user by email (using django-mailer) when they# sign a document, including the text of the document. Default is False.SIGNOFF_EMAIL_USER=True# Send a notification to a defined list of addresses whenever any user# signs a document (may be useful for recordkeeping). Default is none.SIGNOFF_EMAIL_RECEIPT=['legal@example.com',]# We don't delete signatures from your database, for compliance reasons.# However, we do require new signatures whenever a new version of a# document is created by creating a new object and setting the# `prev_version` field. You can also require new signatures whenever a# document is edited in the admin (we check the `updated` field of# the document, and only accept newer signatures):SIGNOFF_CHECK_DOCUMENT_UPDATED=True# You can also require new signatures whenever a user's display name# changes (we require users to enter their display name when signing# a document):SIGNOFF_CHECK_FULL_NAME=True# If you're using the middleware, it will redirect any logged-in requests# from users who owe signatures to the 'legal' index by default, except# for requests within the 'signoff' app (to avoid redirect loops), and# requests to the 'auth_logout' url name (to allow users to log out# of the site). If you want to add additional URLs that can be accessed# by users who have not signed your documents yet, you can do something# like the following:SIGNOFF_ADDITIONAL_ALLOWED_APPS=('djdt',)SIGNOFF_ADDITIONAL_ALLOWED_URLS=('auth_logout',)# (The latter is only an example, 'auth_logout' is automatically allowed.)FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.1 (2018-06-04)The app is now usable as a very limited alpha
* Email options advertised in readme are not implemented
* Templates could use some workAdd default templatesAdd configuration options0.1.0 (2018-06-03)Initial release, demonstration of models and core logic