Saravanan666/pypi-org huggingface dataset:
Package: djb.headerproxy
ContentsIntroductionConfigurationWarningSource codeContributorsChangelog0.1.1 (2012-08-09)0.1 (2012-08-03)IntroductionSimple package that extends the proxy object withinPasteto allow
the WSGI proxy to read its connection location from arbitrary headers.
It will keep all other headers (includingHost:intact during transit);
you may or may not need to adjust what you’re doing upstream accordingly.ConfigurationBy default, the proxy will read the host to connect to from theX-Proxy-Force-Hostheader and read the connection scheme fromX-Proxy-Force-Scheme.You can override these using relevant configuration
like follows. Keep in mind that at time of proxy, we’re reading headers from
theenvirondictionary, so specify your headers in this manner.  For
instance,X-Proxy-Foobarwill become visible in theenvirondict
asHTTP_PROXY_FOOBAR(noting dashes to underscores, and replacement
ofXwithHTTP).  You can make this mapping happen thusly:[app:proxy]
use = egg:djb.headerproxy
force_host = HTTP_PROXY_FORCE_HOST
force_scheme = HTTP_PROXY_FORCE_SCHEMEThe above example is overly verbose, however, as we already default to
using these specific headers. This does demonstrate how you can customise
this behaviour to suit you – for instance, if your front-end automatically
provides some headers, you can configure the mapping accordingly.WarningIf unprotected, this WSGI middleware could be used as an open proxy since
headers can easily be spoofed. You should take steps to either firewall off
your application, drop headers at an upstream web server, run this as a
local socket, or do something similar (or all of the above!).You’ve been warned.Source codeAvailable on GitHub athttp://github.com/davidjb/djb.headerproxy/- fork away!ContributorsDavid Beitey, AuthorChangelog0.1.1 (2012-08-09)Add amainentry point as well - this is just an alias to the same
proxy app.
[davidjb]0.1 (2012-08-03)Initial creation of proxy that uses header-based configuration.
[davidjb]Package created using templer
[davidjb]
Package: dj-blog
Minimal blog that gets you started.DocumentationTo be added.FeaturesAdd blog postCategorize postsUse MarkdownConstraintsThis is not a full featured blog app its enough to get you startedThis does not mean to be everything in one to compete with wordpress, zinnia or mezzanineYou will need to write your own templates, for now.QuickstartInstall dj-blogpipinstalldj-blogAdddjblogto yourINSTALLED_APPS:INSTALLED_APPS+=("djblog",)Add to the urls.py:url(r'^blog/',include('djblog.urls',namespace="djblog")),Finally, you need to write your own templates and put them in djblog/ in your templates folder.Changelogv 0.3
1. Added switch to use jinja templates if django_jinja is installed
2. Fix bug in showing only published articles in category viewsv 0.2.5
1. Changed tomistunemarkdown converter
2. Addedprimary_categorymethod to article
3. Added start to a preview ability of articles
Package: dj-boilerplate-generator
DJANGO BOILERPLATE GENERATORThis package creates a core Django project and a core app with simple template including basic configured architectural settings.Steps to use Django Boilerplate GeneratorGo to the directory using the terminal where you want to create the project.
examplecd project_workplace/Run following command in the terminal >python3 -m dj_boilerplate_generatorIt will asks for the project name and after that application name.Now you able to see django project structure created in the desired project directory.Note: Django Boilerplate Generator successfully tested on Windows 10.
Package: dj-booking
Django BookingDjango Booking is a Complete Django booking system.Overviewwhat you get:A booking page which users can book appointments.A dashboard which the admin can see the bookings and make actionsRequirementsDjango Booking requires Django 3 or later.Getting ItPython package::$ pip install dj-bookingInstalling itTo enabledj-bookingin your project you need to add it toINSTALLED_APPSin your projectssettings.pyfile::INSTALLED_APPS = (
    ...
    'booking',
    ...
)And include dj-booking to your URLs::from django.urls import path, include


urlpatterns = (
    ...
    path("booking/", include("booking.urls")),
    ...
)Using It$ python manage.py migrate
$ python manage.py runserverthen you can visit the pages::Booking page:http://localhost:8000/bookingAdmin page:http://localhost:8000/booking/adminConfigurationAdd this vars to settings.pyBOOKING_TITLE = "Your title"
BOOKING_DESC = "Your description"
BOOKING_BG = "img/booking_bg.jpg"

BOOKING_SUCCESS_REDIRECT_URL = "Success redirect url"
BOOKING_DISABLE_URL = "Redirect to this url if create booking is disable"Getting InvolvedOpen Source projects can always use more help. Fixing a problem, documenting a feature, adding
translation in your language. If you have some time to spare and like to help us, here are the places to do so:GitHub:https://github.com/foad-heidari/dj-bookingDocumentationYou can view the documentation online at:https://dj-booking.readthedocs.iohttps://pypi.org/project/dj-bookingOr you can look at the docs/ directory in the repository.SupportDjango Booking is free and always will be. It is developed and maintained by developers in an Open Source manner.
Any support is welcome. You could help by writing documentation, pull-requests, report issues and/or translations.
Package: djbootstrap
Helps kickstart your django app using the awesome twitter bootstrap library.http://getbootstrap.comAs of version 3.0.1 Django 1.5+ is recommended. The sample app will only work with django 1.5+, but the actual
bootstrap stuff should work just fine.INSTALLATION>>> pip install djbootstrapJust add djbootstrap to your INSTALLED_APPSPROVIDESbase.html templateUse it if you feel like it. Just sets up some boilerplate.bootstrapped_form template tagRenders your form all pretty like using bootstrapped_form.html the bootstrap
css classes and such.{% load bootstrap_tags %}
{% bootstrapped_form my_form %}notification_center.htmlA simple template snipped to render django’s messages output using bootstrap alertsActivate Template TagTells you if the page you’re on is the active page.
Requires ‘request’ context processorUSAGE:{% url namespace:some_url as the_url %}
<li class="{% activate the_url %}"><a href="{{ the_url }}"></li>
Package: dj-bootstrap-components
Django Bootstrap components
Supported Python versions: 3.7+
Supported Django versions: 3.0.0+Quick startDocumentation:https://dj-bootstrap-components.rtfd.io/1. Install “dj-bootstrap-components”. The recommended and only officially
supported way is using pip:pip install dj-bootstrap-componentsAdd “bootstrap_components” to your INSTALLED_APPS setting:INSTALLED_APPS = [
    ...
    'bootstrap_components',
]3. Add the following to your base template or to each template that will use the
components:<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>Note that you can use any other CDN or self-host the files if you like.Within a template, simply include the needed component and pass it the required context:{% include 'bootstrap_components/alert.html' with content='<b> bold </b> sample text' color='primary' %}
Package: dj-bootstrap-swatches
=============================Django Bootstrap Swatches=============================.. image:: https://badge.fury.io/py/dj-bootstrap-swatches.svg:target: https://badge.fury.io/py/dj-bootstrap-swatches.. image:: https://travis-ci.org/bwarren2/dj-bootstrap-swatches.svg?branch=master:target: https://travis-ci.org/bwarren2/dj-bootstrap-swatches.. image:: https://codecov.io/gh/bwarren2/dj-bootstrap-swatches/branch/master/graph/badge.svg:target: https://codecov.io/gh/bwarren2/dj-bootstrap-swatchesA swatch page for Bootstrap stylingDocumentation-------------The full documentation is at https://dj-bootstrap-swatches.readthedocs.io.Quickstart----------Install Django Bootstrap Swatches::pip install dj-bootstrap-swatchesAdd it to your `INSTALLED_APPS`:.. code-block:: pythonINSTALLED_APPS = (...'dj_bootstrap_swatches.apps.DjBootstrapSwatchesConfig',...)Add Django Bootstrap Swatches's URL patterns:.. code-block:: pythonfrom dj_bootstrap_swatches import urls as dj_bootstrap_swatches_urlsurlpatterns = [...url(r'^bootswatch/', include(dj_bootstrap_swatches_urls)),...]Per "Two Scoops of Django" design patterns, the default swatch page tries to extend a base template called `base.html` and a block called `content`.  If this isn't your practice, you'll need to adjust things to fit.Features--------* TODODevelopment--------Run a fake server with the test settings and nav to `http://localhost:8000/3`.. code-block:: nonepython manage.py runserver --settings tests.settingsRunning Tests-------------Does the code actually work?::source <YOURVIRTUALENV>/bin/activate(myenv) $ pip install tox(myenv) $ toxCredits-------Tools used in rendering this package:*  Cookiecutter_*  `cookiecutter-djangopackage`_.. _Cookiecutter: https://github.com/audreyr/cookiecutter.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackageCompilation of components due to Thomas Park via [Bootswatch](https://bootswatch.com/default/).History-------0.1.0 (2017-05-26)++++++++++++++++++* First release on PyPI.
Package: djbraintree
djbraintreeeasily integrates the officialBraintree Python client libraryinto your Django applications by allowing easy configuration from your Django settings.Quick startInstalldjbraintreefrom PyPI:$ pip install djbraintreeUpdate your project’ssettings.py:INSTALLED_APPS = (
    ..
    'django_barintree',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    ..
    'djbraintree.context_processsors.braintree_client_side_encryption_key',
)

import braintree

BRAINTREE_ENVIRONMENT = braintree.Environment.Sandbox
BRAINTREE_CLIENT_SIDE_ENCRYPTION_KEY = '..'
BRAINTREE_MERCHANT_ID = '..'
BRAINTREE_PUBLIC_KEY = '..'
BRAINTREE_PRIVATE_KEY = '..'Start using the Braintree Python client library in your code:import braintree

result = braintree.Transaction.sale({
    "amount": "1000.00",
    "credit_card": {
        "number": "4111111111111111",
        "expiration_date": "05/2012"
    }
})Configuration optionsBRAINTREE_ENVIRONMENTBraintree environment. Refer tothe Braintree Python client library documentationfor more details.BRAINTREE_CLIENT_SIDE_ENCRYPTION_KEYOptional client side encryption key. Will be exposed using thebraintree_client_side_encryption_keycontext processor asBRAINTREE_CLIENT_SIDE_ENCRYPTION_KEYin your templates if set.BRAINTREE_MERCHANT_IDMerchant ID.BRAINTREE_PUBLIC_KEYPublic key.BRAINTREE_PRIVATE_KEYPrivate key.BRAINTREE_USE_UNSAFE_SSLAllow unsafe SSL connections. DefaultFalseand highly discouraged.
Package: djbrut
DjBrut logoDjBrut – simple brutforce protection for Django project.Default checkers:Max requests for IP.Max requests for user.Max requests for one CSRF-token (stupid but effective).Max requests frequency limitation.DjBrut use Redis as storage for all counters.Installationpip install djbrutUsagefromdjango.httpimportHttpResponsefromdjbrutimportAttemptdefsome_view(request):attempt=Attempt('some rule type name',request)# checkifnotattempt.check():# errorreturnHttpResponse(attempt.error)# success...You can seeexample projectfor more details.ConfiguringJust set up rules:BRUTEFORCE_LIMITS={'default':Rule(user=100,# max requests for one user by BRUTEFORCE_TIMELIMITip=300,# max requests for one IP by BRUTEFORCE_TIMELIMITcsrf=50,# max requests with one CSRF token by BRUTEFORCE_TIMELIMITfreq=0,# max request frequency for client [seconds]),'some rule type name':Rule(user=100,# max requests for one user by BRUTEFORCE_TIMELIMITip=300,# max requests for one IP by BRUTEFORCE_TIMELIMITcsrf=50,# max requests with one CSRF token by BRUTEFORCE_TIMELIMITfreq=0,# max request frequency for client [seconds]),}Attemptget rule type name as first arg. If rule type name not found
in keys of BRUTEFORCE_LIMITS, ‘default’ will be used. If you don’t set
default rule then passed rule type must be exists in BRUTEFORCE_LIMITS
keys.BRUTEFORCE_TIMELIMIT– time to live for all attempts counters.You can seedefault settingsfor more
params such as custom error message.
Package: djbs
This is a simple library that performs
basic django and bootstrap component.Installationpip install djbsUsage:A guide to using the djbs cli is as followspython -m djbs startapp <app-name>The functions in this library are:new app djangonew component bootstrapLicenseCopyright 2022 jamalelkhdadiThis repository is licensed under MIT license.
See LICENSE for details.Change Log0.1.4 (22/07/2022)
Package: djburger
DjBurger logoDjBurger– framework for safe and maintainable web-projects.What DjBurger do?Split Django views intostepsfor secure and clean code.Provide built-in objects for all steps.Integrates thismany side
librarieslike Django REST Framework and Marshmallow.DjBurger doesn’t depend on Django. You can use it in any projects if you
want.Read more intodocumentation.Key principlesValidation logic is separate from the main logic.Reusable logic for many views.Reusable input and output data formats.More clean views.DataflowDecorators. Feel free to use any side Django decorators likecsrf_exempt.Parser. Parse request body.PreValidator. Validate and clear request.PreRenderer. Render and return PreValidation errors response.Controller. Main logic: do some things.PostValidator. Validate and clear response.PostRenderer. Render and return PostValidation errors response.Renderer. Render successful response.SchemeRequired only Controller and Renderer.ExploreReaddocumentation.Seeexampleproject.For quick help just inspect djburger from python console (for
example,help('djburger.views')).If you have some questions thenview
issuesorcreate
new.If you found some mistakes then fix it andcreate Pull
Request.
Contributors are welcome.Star this project on
github:)
Package: djc
djcCommand Line Interface for Django with Nifty ScriptsusageInstall djc in the same environment as your Django projectcreate a new userSetting safe to true, makes it so the command doesn't exit with an error code if the user already existsdjccreate-user--username="daniel"--email="example@gmail.com"--password="password"--debug="true"--safe="true"You can also rundjc create-superuserwhich takes the same flags and arguments.run a file within the Django environmentdjcrun--filepathseed.pyordjcrun-fseed.pymakemigrationsdjcmakemigrationsrun migrationsdjcmigratecollect static filesThis command automatically answers any questions with yes.djccollectstatic
Package: dj-cache-tools
Django cache tools originally developed forElla CMS.
It contains few helpful caching tools (such as cached ForeignKey, functions for caching object/objects, decorator for caching function/method, etc.)Usage for modelsIn models.py you can useCachedForeignKey:from __future__ import unicode_literals
from django.db import models
from cache_tools.fields import CachedForeignKey


@python_2_unicode_compatible
class Question(models.Model):
    question_text = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')

    def __str__(self):
        return self.question_text


@python_2_unicode_compatible
class Choice(models.Model):
    question = CachedForeignKey(Question, on_delete=models.CASCADE)
    choice_text = models.CharField(max_length=200)
    votes = models.IntegerField(default=0)

    def __str__(self):
        return self.choice_textUsage for caching functionIn whatever.py you can usecache_this:from cache_tools.utils import cache_this
from .models import Question


@cache_this(lambda *args, **kwargs: 'my_app_all_questions_cache_key')
def get_all_guestions():
    return list(Question.objects.all().order_by('pk'))Build statusMaster branch:
Package: djcall
RequirementsUpgrade from v0.3 to v0.4As of v0.4, djcall uses a PostgreSQL JSON field instead of a Picklefield for
Caller.kwargs, which means that unless you have only JSON serializable contents
in your djcall_caller.kwargs columns: the migration will fail, so will it if
you don’t run PostgreSQL. Sorry, but it became too much of an annoyance not to
be able to query of Call kwargs. Anyway, a migration should take care of this
for you. It leaves the old Picklefield renamed from kwargs to old_kwargs until
next release where it will be dropped.Installpip install djcallAdd djcall to INSTALLED_APPS and migrate.Usagefromdjcall.modelsimportCallerCaller(# path to python callbackcallback='djblockchain.tezos.transaction_watch',# JSON serializable kwargskwargs=dict(pk=transaction.pk,),).spool('blockchain')# optionnal spooler nameNo decorator, no nothing,If you have CRUDLFA+ or django.contrib.admin, you should see the jobs there,
and be able to cancel them.Example projectSetup example project:djcall-example collectstatic
djcall-example migrate
djcall-example createsuperuserRun with runserver:djcall-example runserverOr with uWSGI:uwsgi --env DJANGO_SETTINGS_MODULE=djcall_example.settings --env DEBUG=1 --spooler=/spooler/blockchain --spooler=/spooler/mail --spooler-processes 1 --http=:8000 --plugin=python --module=djcall_example.wsgi:application --honour-stdin --static-map /static=staticHistoryFirst made a dead simple pure python generic spooler for uwsgi:https://gist.github.com/jpic/d28333b0573c3c555fbe6e55862ecddbThe made a first implementation including CRUDLFA+ support:https://github.com/yourlabs/django-uwsgi-spoolerThis version adds:Cron model and support for uWSGI cron, can’t add/remove them without restart,
but can change kwargs and options onlineCRUDLA+ support is on hold waiting for what’s currently inhttps://github.com/tbinetruy/CHIPbecause i don’t want to build crud support
here with templates because of the debt this will add, it’s time to use
components in CRUDLFA+ to make the CRUD for Cron/Background tasks awesome
Package: dj-cart
dj-cartIntroductionThis is not a session based cart system. Session based carts are not suitable for REST endpoints because REST is stateless. This implementation stores the contents of the cart in the database.PrerequisitesDjango 1.1+django content type framework in your INSTALLED_APPSInstallationpipinstalldj-cartAfter installation is complete:add 'cart' to your INSTALLED_APPSRunpythonmanage.pymigrateUsagefromcart.modelsimportCartfrommyproducts.modelsimportProductclassCartAdd(APIView):defget_object(self,product_id):try:returnProduct.objects.get(pk=product_id)exceptProduct.DoesNotExist:raiseHttp404defpost(self,request,product_id):quantity=request.data.get('quantity')product=self.get_object(product_id)cart,created=Cart.objects.get_or_create(user=self.request.user)cart.add_item(product,product.price,quantity)returnResponse(status=status.HTTP_201_CREATED)classCartRemove(APIView):defget_object(self,product_id):try:returnProduct.objects.get(pk=product_id)exceptProduct.DoesNotExist:raiseHttp404defput(self,request,product_id):product=self.get_object(product_id)cart=get_object_or_404(Cart,user=self.request.user)cart.remove_item(product)returnResponse(status=status.HTTP_204_NO_CONTENT)classCartDetail(APIView):defget(self,request):try:cart=Cart.objects.get(patient=self.request.user.patient)exceptCart.DoesNotExist:cart=Cart.objects.create(patient=self.request.user.patient)returnResponse(cart.serializable(),status=status.HTTP_200_OK)Testingpytest
Package: dj-casing
Allow case insensitive URLs while enforcing the right URL.Apply thecase_insenstivedecorator if you have URLs which should match
regardless of case, but you don’t want those URLs hanging out there when a user
visits.InstallationInstall dj-casing:pip install djcasingDecorating a viewThen use it in a project:from djcasing import case_insenstive


@case_insensitive
def some_view(request, urlarg_one, urlarg_two):
    # do stuff hereNow URLs of the formhttp://example.com/BobsWorld/PageOne/can be matched tohttp://examle.com/bobsworld/pageoneand visitors will be immediately
redirected to the latter URL.LicenseBSD licensed.
Package: dj-channels-pubsub
Django Channels Layer for Google PubSubDocumentationThe full documentation is athttps://dj-channels-pubsub.readthedocs.io.QuickstartInstall Django Channels PubSub:pip install dj-channels-pubsubAdd Environment variables:export GOOGLE_CLOUD_PROJECT="" # Real project ID required for local emulator tooFor the local PubSub Emulator, add:export PUBSUB_EMULATOR_HOST=localhost:8085For the local PubSub Emulator with Docker Compose:export PUBSUB_EMULATOR_HOST=pubsub:8085pubsub:
image: google/cloud-sdk:331.0.0
command: gcloud beta emulators pubsub start --host-port=0.0.0.0:8085
ports:
  - "8085:8085"
restart: unless-stoppedFeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxDevelopment commandspip install -r requirements_dev.txt
invoke -lCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2021-08-04)First release on PyPI.
Package: dj-chartjs
DocumentationThe full documentation is athttps://django-charts.readthedocs.io/en/latest/QuickstartInstall dj-chartjs:pip install dj-chartjsAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'dj_chartjs',...)PS: You need define jquery and chartjs libraries in your html section script<scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.bundle.js"></script>Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxHistory0.1.0 (2020-03-30)First release on PyPI.
Package: djcli
installdjcliwith pip,go in a directory where you have a Django project,rundjcliRefer todjcli/tests/*.txtfor reference output.[jpic@hack djcli]$ djcli
djcli: time for CLI party !

Will try to auto-detect $DJANGO_SETTINGS_MODULE by searching for settings.py
from the current directory.

  help      Get help for a command.
  chpasswd  Change the password for user.
  dbcheck   Check all database connections.
  delete    Delete a model filtered with kwargs.
  detail    Print detail for a model.
  ls        Search models
  run       Execute a callback in Django context.
  save      Update or create a model.
  setting   Show settings from django.
  settings  Print out DJANGO_SETTINGS_MODULE.