Saravanan666/pypi-org huggingface dataset:
Package: django-abtoast
# ABToastABToast is a simple A/B Testing app that is developed in django. This app implements the Django Session functionality to achieve the goal.### InstallationABToast requires [Django](https://www.djangoproject.com/download/) to run.Install ABToast from pip```sh$ pip install django-abtoast```OR, Get ABToast locally```sh$ git clone https://github.com/htadg/ABToast.git ABToast```Add ABToast to INSTALLED_APPS```pythonINSTALLED_APPS = (# Django Default Apps'django.contrib.admin','...',# ABToast'ABToast',)```Add ABToast.middleware.ABMiddleware to the project middlewares```pythonMIDDLEWARE_CLASSES = ('django.contrib.sessions.middleware.SessionMiddleware','django.middleware.common.CommonMiddleware','...',# Custom Middleware'ABToast.middleware.ABMiddleware',)```Migrate the database and create admin account```sh$ python manage.py makemigrations$ python manage.py migrate$ python manage.py createsuperuser```Now Create your own new Tests in the Database```Note: You can also create New Experiment and Tests from the Django Admin Panel``````pythonfrom datetime import datetimefrom dateutil.relativedelta import relativedeltafrom ABToast.models import Experiment, Test# Starting the Experiment from todaystart_date = datetime.now()# End Date for the Experiment# Experiment runs for two monthsend_date = start_date + relativedelta(months=+2)# Initial Traffic Redirect for the first variantinitial_traffic = 50 # 50%# Create an Experimentexp = Experiment.objects.create(name="Homepage Test", template_name="registrations/signup.html", goal="registrations/success", start=start_date, end=end_date, is_active=True)# Create two variations of the homepage.# Currently User can only create two Test instances for a particular Experiment# which means currently user can run A/B Testing on only two variants of a Page# One Test for the original templateTest.objects.create(template_name="registrations/signup.html", experiment=exp)# Other Test for the New VariantTest.objects.create(template_name="registrations/new_signup.html", experiment=exp)```Now You can run A/B Test on a view```pythondef home(request, template_name="registrations/signup.html"):try:template_name = request.ab.run(template_name)except TemplateDoesNotExist:passreturn render_to_response(template_name)```### DevelopmentWant to contribute? Great!Do the necessary changes that you feel and send a pull request.### Todos- [ ] Multivariate Testing- [ ] Add Graphical Information- [ ] Add Bayesian Formula for the Conversion RatesLicense----MIT**Free Software, Hell Yeah!**
Package: django-acc
DON’T USE ME. I’M BEING USED INTERNALLY ONLY.Django-acc: Another reusable Django account management applicationInstallationpip installdjango-accRequirementsdjango >= 2.0 djangorestframework >= 3.7.7 ‘rest_framework’,Configurationssettings.pyAddrest_frameworkto INSTALLED_APPSAddaccountsto INSTALLED_APPSurls.pyAddpath('accounts',include('accounts.urls'))tourlpatternsin your project’surls.pyTemplatesMake sure that you have abase.htmltemplates
Package: django-accept-header
docstestspackageA Django middleware that inspects the HTTP Acept headers sent by browsers. It adds a new method to eachrequestinstance calledaccepts(str)which can be used
to determine if a certain mimetype is accepted by the user agent that issued the request.Installationpip install django-accept-headerUsageFirst add the middleware to yoursettings.pyfile:MIDDLEWARE_CLASSES = (
    # ...
    'django_accept_header.middleware.AcceptMiddleware',
)To check if thetext/plainmimetype is accepted by the user agent:def some_view(request):
    if request.accepts('text/plain'):
        # do somethingThe ordered list of accepted mimetypes can also be used:def some_view(request):
    for media_type in request.accepted_types:
        # do somethingSee the full documentation for how to use the media types please see the full documentation.Documentationhttps://django-accept-header.readthedocs.org/DevelopmentTo run the all tests run:tox0.3.0 / 2016-02-02Change package name to django-accept-header.Make python3.5 the default version used for tests.0.1.0 / 2015-11-26First release on PyPI.
Package: django-access-and-compliance
Access and ComplianceAccess and compliance is a simple Django app to check and verify a
user's acceptance of University of Michigan's Access and Compliance
policy.Quick startAdd 'django_access_and_compliance' to yourINSTALLED_APPSsetting like this:INSTALLED_APPS=['django_access_and_compliance',...]Configure the following settings in your application:# the URL for the desired access and compliance webserviceACCESS_AND_COMPLIANCE_VALIDATION_URL# truthy values returned by validation endpoint; e.g. true, yes, etc.ACCESS_AND_COMPLIANCE_TRUTHY_VALUESBehaviorThis application hooks into an existing Django application and listens for the login signal. Once a user logs in, it makes a request to theACCESS_AND_COMPLIANCE_VALIDATION_URLand checks if the response body matches one of the truthy values specified inACCESS_AND_COMPLIANCE_TRUTHY_VALUES.If the user has attested to the data access and compliance policy, they will be added to the 'Access and Compliance Members' group.It is up to the application admin to configure any applicable permissions on this group.
Package: django-access-inspector
Django Access InspectorDjango Access Inspector is a comprehensive access control app for Django that helps you enforce fine-grained access control on your views. It provides a flexible and easy-to-use interface to check and analyze authentication and permission classes for each view in your Django project.InstallationTo install Django Access Inspector, you can use eitherpiporpoetry. Here are the commands:pipinstalldjango-access-inspectorpoetryadddjango-access-inspectorAfter installing, make sure to add"django_access_inspector"to yourINSTALLED_APPSsetting in your Django project'ssettings.pyfile:INSTALLED_APPS=[...,"django_access_inspector",]UsageTo run Django Access Inspector, use the following command:pythonmanage.pyinspect_access_controlBy default, it will provide a human-readable output. If you prefer a JSON output, you can use the--output jsonflag:pythonmanage.pyinspect_access_control--outputjsonExampleHere's an interpretation of the output:Unchecked views: Views that Django Access Inspector was not able to check. As the tool is still a work in progress, we aim to make it check all views in the future.Model Admin views: Views generated by Django Admin that are checked with the Django Admin permission system.Views: All views that Django Access Inspector was able to check, including their authentication and permission classes.
Package: django-accounting
In the beginning God created man, and the costs followed afterwards.Check the associated projectAccountant, a concrete
integration of thedjango-accountingapplication that you can deploy
with one click to Heroku.RequirementsPython 3.xDjango 1.7+dj-staticFeatures supportedwith inspiration from already existing very good services (Xero,
Freshbooks, etc)Those crossed are not yet supportedBooksEstimatinggenerate estimates that can lead to an invoice or notInvoicinggenerate invoicesBillingshare the maximum of logic with the invoicing systemPaymentsto track partial/complete payments of invoices and billsExpenseClaimfor employees of organizations that used their
personnal accountsDashboard / Current balancedisplayed the current balanceDashboard / Overdued invoices & billsto track what’s lateClientsCreation/Update[STRIKEOUT:Deletioninform the user of the cascade deletion of
invoices and bills]Professional addressspecify the address on the client modelLinked to organizationto implicitly create the bill when
cross-invoicing between organizationsReportsProfit and Lossto know how much you’ve collected, and how much
you’ve spentTax Reportto know how much you need to keep for taxes
declarationsPayroll Reportto know how much you need to keep for payroll
taxesInvoice details Reportto understand the calculations that lead
to the tax report and the payroll report[STRIKEOUT:Expense claims Reportto compute what the company owes
to whom quickly]ContactPierre Dulac@_dulacpLicenseAccounting is available under the MIT license. See the LICENSE file for
more info.
Package: django-accountkit
django-accountkitUsing Facebook accountkit with Djangohttps://developers.facebook.com/products/account-creationOverviewThis package enables the use of Facebook Accountkit with Django authenticationIf you want to know more about Facebook Accountkit, check out the following resourceshttps://auth0.com/blog/facebook-account-kit-passwordless-authentication/https://developers.facebook.com/docs/accountkitRequirementsPython (>= 2.7 and <= 3.7)Django (>=1.11)InstallationInstallation is easy usingpippip install django-accountkitThen to add Django Accountkit to your project add the appaccountkitloginto yourINSTALLED_APPS.Now add the following settings in your settings.py fileAPP_ID = <Accountkit App ID>
ACCOUNT_KIT_APP_SECRET = <Accountkit App Secret>
ACCOUNT_KIT_VERSION = "v1.0"
ACCOUNT_KIT_SUCCESS_REDIRECT = <The URL for the page where user will land after authenticating> (Please Use absolute path only)
#Example ACCOUNT_KIT_SUCCESS_REDIRECT = "http://localhost:8000/success"Then add the following in your settings.py fileAUTHENTICATION_BACKENDS = (
	'accountkitlogin.authenticate.GetOrCreateUser',
)Using AccountkitloginViewTo use Accountkit to authenticate your users importfrom accountkitlogin.views import login_statusThen in your view uselogin_status@csrf_exempt
def success_page(request):
	context = login_status(request)Note that csrf exempt is required because Facebook Accountkit will redirect the user to your success page url and this might throw a cross origin errorThelogin_statusfunction accepts the request as parameter and returns a dictionary withKey 'authenticated' True or FalseKey 'message' A message related to whether the user is authenticated or notKey 'user' Returns a user instance when 'authenticated' is TrueAdd the view to your urls.py file for the success_page url which you defined inACCOUNT_KIT_SUCCESS_REDIRECTsettingTemplate TagsAdd{% load accountkit %}at the starting of your template and add the following template tags to your file where you want to display the login buttonsAdd(% accountkitjs %}inside your<head></head>tagAdd{% accountkitform %}inside your<body></body>tagAdd{% smslogin %}and/or{% emaillogin %}anywhere in you body section where you want to display your login buttons. Both these tags accept two parameters className and text where you can add your custom css classes and the text to display on the button. Example{% emaillogin "button" "Use the email" %}NotesContributePlease contribute to this repositiory :)AuthorFollow the author onLinkedinThis is project is inspired byThe flask implementation of accountkit athttps://github.com/everping/accountkit
Package: django-accounts-api
Django Accounts APIScenario to support is a compiled javascript capable frontend needing to provide authentication features over apiCaveat enptor, very early days, still being tested in its first projectRequirementsPython 3.7 - 3.11Django 3.2 - 4Usagepip install ...or equivalentadd'django_accounts_api',to INSTALLED_APPSaddpath('/accounts_api/', include('django_accounts_api.urls'))to your urlsimplement your frontend to use the urlsFeaturesSee docs...DevelopmentInstall Poetryhttps://python-poetry.org/docs/#installationUse a virtual environmenthttps://python-poetry.org/docs/basic-usage/#using-your-virtual-environmentpoetry install --with dev --no-rootinstalls dependencies for developmentpoetry run pre-commit installinstalls the pre-commit hookspytestruns testsToxTo run tox you will need to make sure that the range of python versions required are available for tox to use.Recommendation: use pyenvpyenv install 3.7 3.8 3.9 3.10 3.11pyenv local  3.7 3.8 3.9 3.10 3.11toxDocumentationcd docsmake htmlTODO: add to toxLinting & formattingTODO: add to tox
Package: django-accounts-cbv
Django Accounts===============Django Accounts re-implements several views from Django contrib auth to use the messageing framework instead stand-alone pages for simple messages. It also includes a email authentication backend.Installation------------Run `pip install django-accounts-cbv`Add `accounts` to your `INSTALLED_APPS` setting:```pythonINSTALLED_APPS = (...'accounts',)```To your sites `url.py` add:```pythonurlpatterns = patterns('',...url(r'^accounts/', include('accounts.urls')),)```Authentication Backends----------------------------###EmailBackendThe email authentication backend will allow users to login with the email address and password.To enable it add `'accounts.auth_backends.EmailBackend'` to your `AUTHENTICATION_BACKENDS` setting:```pythonAUTHENTICATION_BACKENDS = ('accounts.auth_backends.EmailBackend','django.contrib.auth.backends.ModelBackend',)```Middlewares-----------###LoginRequiredMiddlewareRequire authentication for all views.To enable it add `'accounts.middleware.LoginRequiredMiddleware'` to your `MIDDLEWARE_CLASSES` setting:```pythonMIDDLEWARE_CLASSES = (...,'accounts.middleware.LoginRequiredMiddleware',)```Views-----###LoginLogin inherits from FormView for easy extensibility.###LogoutLogout inhertis from RedirectView for easy extensibility. It also displays a logout message.###PasswordResetPasswordReset inherits from FormView for easy extensibility. It displays a message once a reset request is submited.###PasswordResetConfirmPasswordResetConfirm inherits from FormView for easy extensibility. It displays a message once the user has changed their password.###UserUpdateUserUpdate inherits from UpdateView for easy extensibility. It allows a user change their account information.Forms-----###UserFormA form for changing an existing user's username and/or password. The password is optional and the form will only attempt to update the password if text is in the password input and it matches the confimation input.
Package: django-accountutils
INSTALLATION=====pip install django-accountutils=====Account Utils=====Accountutils is a simple django application to facilitate basic functionalities, like forgot password, change password, for api based projects.Quick start-----------1. Add "accountutils" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'accountutils',]2. Include the accountutils URLconf in your project urls.py like this::url('utils/', include('accountutils.urls')),3. Run `python manage.py migrate` to create the accountutils models.4. Add required settings in settings.py::USEEMAIL='youremail@somewhere.com'EMAIL_USE_TLS = True or FalseEMAIL_HOST = 'your host'EMAIL_PORT = <port>EMAIL_HOST_USER = USEEMAILEMAIL_HOST_PASSWORD ='your password'DEFAULT_FROM_EMAIL = USEEMAILDEFAULT_TO_EMAIL = ''EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'#if communication mails has to be sendSEND_REGISTRATION_MAILS = True or False #dafault True5. Now you will have the api endpoints for registration, login, change password, forgot password etc.#incase, use use the utils in step 2/utils/request/forgot/password/  #post request/utils/check/forgot_password_code/  #post request/utils/reset/password/    #post request/utils/change/password/    #post request#login user/utils/login/    #post request#register user/utils/register/    #post request
Package: django-accredible
Integrate Accredible certification in a Django AppQuickstartInstall django-accredible:pip install django-accredibleAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'certification',...)Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2019-02-06)First release on PyPI.
Package: django-acdhch-functions
Django ACDH-CH functionalityProvide some default functionality for ACDH-CH Django instances.Howto useInstall the app using your personal choice of Python package manager. Add the app to your Django'ssettings.pyINSTALLED_APPS += ["django_acdhch_functions"]Call thedjango_acdhch_functionsviews from yoururls.py:urlpatterns =+ [path("", include("django_acdhch_functions.urls")),]FunctionalityImprintProvides an imprint route on/imprint. You have to set aREDMINE_IDinsettings.MatomoProvides a{% matomo %}templatetag. You have to{% load django_adchch_functions %}to use it. It requires the variablesmatomo_urlandmatomo_idto be set in thePROJECT_METADATAdict:PROJECT_METADATA = {
    "matmom_url": "https://my.matomo.instance.tld",
    "matmo_id": 23,
}
Package: django-ace
Usagefrom django import forms
from django_ace import AceWidget

class EditorForm(forms.Form):
    text = forms.CharField(widget=AceWidget)Syntax highlighting and static analysis can be enabled by specifying the
language:class EditorForm(forms.Form):
    text = forms.CharField(widget=AceWidget(mode='css'))Themes are also supported:class EditorForm(forms.Form):
    text = forms.CharField(widget=AceWidget(mode='css', theme='twilight'))All options, and their default values, are:class EditorForm(forms.Form):
    text = forms.CharField(widget=AceWidget(
        mode=None,  # try for example "python"
        theme=None,  # try for example "twilight"
        wordwrap=False,
        width="500px",
        height="300px",
        minlines=None,
        maxlines=None,
        showprintmargin=True,
        showinvisibles=False,
        usesofttabs=True,
        tabsize=None,
        fontsize=None,
        toolbar=True,
        readonly=False,
        showgutter=True,  # To hide/show line numbers
        behaviours=True,  # To disable auto-append of quote when quotes are entered
    ))InstallInstall using pip:pip install django_aceUpdateINSTALLED_APPS:INSTALLED_APPS = (
    # ...
    'django_ace',
)Example ProjectThere’s an example project included in the source, to try it do:cd example/
virtualenv .env
. .env/bin/activate
pip install -e ..
./manage.py makemigrations app
./manage.py migrate
./manage.py runserverThen browser tohttp://localhost:8000.Change logv1.32.4Expose useworker, contributed by @mounirmesselmeni.v1.32.3Update ACE editor to version v1.32.3.v1.32.0Update ACE editor to version v1.32.0.Expose extensions, contributed by @okaycj.v1.31.1Update ACE editor to version v1.31.1.v1.26.0Update ACE editor to version v1.26.0.v1.24.1Update ACE editor to version v1.24.1.v1.23.4Update ACE editor to version v1.23.4.v1.22.1Update ACE editor to version v1.22.1.v1.19.0Update ACE editor to version v1.19.0.v1.15.4Added CSS to work with new admin in Django 4.2. Now you can usewidth=”100%”without breaking the layout.v1.15.3Update ACE editor to version v1.15.3.v1.14.0Update ACE editor to version v1.14.0.Follow ACE version numbers.v1.0.13Update ACE editor to version v1.11.2.v1.0.12Update ACE editor to version v1.5.0.v1.0.11Support Grappelli inlines.v1.0.10FIX JavaScript error when usingJavaScriptCatalog.v1.0.9New widget optionshowguttersto hide line numbers.New widget optionbehavioursto avoid auto-insert of quotes.v1.0.8New widget optionreadonly.Update ACE editor to version v1.4.12.v1.0.7New widget optiontoolbar.Update ACE editor to version v1.4.8.v1.0.6New widget optionfontsize.Update ACE editor to version v1.4.7.v1.0.5New widget optiontabsize.Upgrade ACE editor to version v1.4.2.v1.0.4Update Django compatibility to>1.11,<=2.1New widget optionsminLines,maxLines,showinvisibles,usesofttabs.Upgrade ACE editor to version v1.4.0.Updated example for Django 1.11PEP8 improvementsv1.0.2Upgrade ACE editor to version 1.1.8Add support for showprintmarginv1.0.1Add support for Django 1.7 by removing deprecated imports.v1.0.0Initial release.
Package: django-ackee-middleware
django-ackee-middlewareDjangomiddleware reporting requests toAckee, self-hosted  analytics tool for those who care about privacy. Alternative to using the client-side JS tracker.Installation$ pip install django-ackee-middlewareIf you don't have the Ackee instance yet, you can quicklydeploy it on Heroku.ConfigurationAdd the middleware as the first one in your Djangosettings.py:MIDDLEWARE=["ackee.middleware.TrackerMiddleware","django.middleware.security.SecurityMiddleware",...]Then add the following properties:ACKEE_SERVER="https://myackeeserver.com"ACKEE_DOMAIN_ID="YOUR DOMAIN ID"ACKEE_IGNORED_PATHS=["^/admin/.*"]Remember to change the server and domain ID to your values.DevelopmentThis project is usingpipenvto manage the development dependencies. To install them run:$ pipenv installPublishingThere are twopipenvscripts that make building and publishing the package easier:pipenv run build- builds the distribution packagepipenv run upload- uploads the package to PyPI
Package: django-acl
Django has a built in permissions system, but all the permissions are more directly related to models. This is meant to
extend that system by adding permissions, or actions, not related specifically to models.This also adds an ACL aspect to Django-CMS as an optionalDocumentationAdd toINSTALLED APPSAdd the module to your installed apps.INSTALLED_APS=(...'djangoacl')Template LoaderAdd the new authentication backend toAUTHENTICATION_BACKENDSin settings.pyTEMPLATE_LOADERS=('skin.template.loaders.filesystem.Loader','skin.template.loaders.app_directories.Loader','django.template.loaders.filesystem.Loader','django.template.loaders.app_directories.Loader',)Run migrations$pythonmanage.pymigratedjangoaclAdd the actionGo tohttp://yoursite/admin/djangoacl/action/add/and add the action.Give the action a name. This can be pretty much anything you want but recommend no spaces or special characters.
Also probably best not to use anything that matches then normal permission patters such as<action>_<model>or<model>.<action>Make sure to add any related users or groups.Request PermissionRequest permission in the normal way using thepermission_requireddecorator. Seehttps://docs.djangoproject.com/en/1.8/topics/auth/default/#the-permission-required-decorator
Package: django-acl-permissions
Access control list (ACL) provides an additional, more flexible permission mechanism for file systems. It is designed to assist with UNIX file permissions. ACL allows you to give permissions for any user or group to any disc resource.Use of ACLThink of a scenario in which a particular user is not a member of group
created by you but still you want to give some read or write access, how
can you do it without making user a member of group, here comes in
picture Access Control Lists, ACL helps us to do this trick.Quick startAdd “django_acl” to your INSTALLED_APPS settingINSTALLED_APPS=[...'django_acl',]Apply django-acl-permissions modelspythonmanage.pymakemigrationspythonmanage.pymigrateAdd user_groups field in to your User ModelclassUsers(AbstractBaseUser,PermissionsMixin):user_groups=models.ManyToManyField(Group,verbose_name=_("user_groups"),blank=True,help_text=_("The groups this user belongs to. A user will get all permissions ""granted to each of their groups."),related_name="user_set",related_query_name="user",)Add has_acl_perms function in to your User Modeldefhas_acl_perms(self,perm,obj=None):returnacl_has_perms(self,perm,obj=obj)