Saravanan666/pypi-org huggingface dataset:
Package: django-unittest-depth
========================================``django-unittest-depth`` Run Django unittests recursively========================================:Version: 0.4=======================================Synopsis=======================================I wanted a different test directory layout than the default $appname/tests.py,so I wrote this suite set-up, so you can have directory layouts like:$appname/tests/__init__.pytest_models/__init__.pytest_Blog.pytest_Author.pytest_Repository.pytest_views.pyinstead.To use this in your django app, you just add the following to your$appname/tests/__init__.py module:>>> from djangox.test.depth import alltests...>>> def suite():... return alltests(__file__, __name__)======================================Installation======================================To install:>>> python ./setup.py installOr via easy_install:>>> easy_install django-unittest-depth
Package: django-unittest-helper
django_unittest_image_helperAn open source package for helping the django unittest journeyDescriptionA Python library to facilitate the django unittesting journey.Installationpip install django-unittest-helperUsageFor getting dummy form-data images for payload during unittestingfromdjango_unittest_helperimportform_image_helperpayload=form_image_helper(caption_list=['photo','map'],image_suffix=".jpg")The above code will return dummy images for api testing.There are 2 parameters for this method-caption_list: Provide caption titles for the payload in list.image_suffix: Provide the extension of the images as per your need.For generating random phone numberfromdjango_unittest_helperimportgenerate_random_phone_nophone_no=generate_random_phone_no(prefix="013",total_digit=11)The above code will return a dummy phone number based on random digitsThere are 2 parameters for this method-prefix: Provide the prefix of the operator of phone nototal_digit: Provide the total digits of the phone number you need
Package: django-universal-paginator
This package is used to create standard or cursor navigation for django.It has builtin templates, so you can use this library with minimal effort.
Library can be used withjinja2templates. If you are usingdjango_jinjapackage, additional template tags are automatically registered tojinja2engine.If you are using cursor pagination, the queryset must be ordered with
combination of data fields, which are unique across query.Cursor pagination supports checking for next / previous page presence without
any additional queries. There is used only single query to select records, no
additional queries tocountchecking or next / previous checking.Installpipinstalldjango-universal-paginatorToINSTALLED_APPSadddjango_universal_paginator.INSTALLED_APPS=(# ...'django_universal_paginator',)SettingsClassical paginator support following settings:PAGINATOR_ON_EACH_SIDECount of links around current page, default: 3PAGINATOR_ON_ENDSLink count on start / end of list, default: 1PAGINATOR_TEMPLATE_NAMEDefault template name for paginator, default:'paginator/paginator.html'UsageTemplateTo use this library first add{% pagination %}to django template or{{ pagination() }}to jinja2 template.<!-- object_list.html -->{% load paginator_tags %}<ul>{% for object in object_list %}<li>{{ object }}</li>{% endfor %}</ul><divclass="pagination">{% pagination %}</div>To modify style look topaginator.html.URLsThis package can be used without URL modification, but if you want clean URL
patterns without GET parameters, like/object-list/3/, you can use following
code (example contains both methods - standard and cursor).# urls.pyfromdjango.urlsimportpath,register_converterfromdjango_universal_paginator.converterimportPageConverter,CursorPageConverterregister_converter(PageConverter,'page')register_converter(CursorPageConverter,'cursor_page')# standardurl(r'^object-list/<page:page>',ObjectList.as_view(),name='object_list'),# or cursorurl(r'^cursor/<cursor_page:page>',ObjectList.as_view(),name='cursor_list'),Classical navigationTo use classical navigation, just addpaginate_byattribute to class based
list view.# views.pyclassObjectList(ListView):paginate_by=10# model = ...If you are using function based views, you can usedjango_universal_paginator.utils.paginate_queryset.# views.pyfromdjango_universal_paginator.utilsimportpaginate_querysetdeflist_view(request):queryset=Book.objects.order_by('pk')paginate_by=10page=1paginator,page,queryset,is_paginated=self.paginate_queryset(queryset,page,paginate_by)context={"paginator":paginator,"page_obj":page,"is_paginated":is_paginated,"object_list":queryset,}reutrnrender_to_string("list.html",context)Cursor paginationTo use cursor pagination, queryset must be correctly ordered (order key must be
combination of keys which are unique across queryset).# views.pyfromdjango.views.genericimportListViewfromdjango_universal_paginator.cursorimportCursorPaginateMixinclassList(CursorPaginateMixin,ListView):paginate_by=10queryset=Book.objects.order_by('pk')
Package: django-universal-sms
django-universal-smsSend SMS from Django application using any SMS service provider just writing a single line of code.FeaturesSupport all standard SMS service providerSMS configuration from django admin panelThere is SMS Log listing pageYou can also test SMS sending from admin panelEnough test coverageInstallationpippipinstalldjango-universal-smsInstall apps insettings.pyINSTALLED_APPS=['django.contrib.admin','...','send_sms',]migrationpythonmanage.pymigrateConfigurationGo to admin panel by login with you admin credentialsFind outSMS Settingsmenu underSEND SMSand click on it.There you'll see couple of fields to fill it up using SMS service provider credentials..Carfefully compelete this part and save it.UsageWhenever you need to send SMS just use following code:fromsend_sms.viewsimportsend_sms

send_sms(['mobile_number'],'Your Message')For each successful sending SMS you can see the log fromSMS Logunder underSEND SMSmenu.SupportFeel free to ask for the support over the email hizbul.ku[at]gmail.com.
Package: django-universaltag
django-universaltagis a package for tagging Django models object universally.This package is developing underhttps://github.com/lambdalisue/django-universaltagSeehttp://demos.django-universaltag.hashnote.net/for Demo.Requireddjango-pistonFeaturesUsing GenericRelation for relation so a tag can belong to any Django model objectAnonymous user can add, delete tags as many as they wantAuthor (object which a tag belong) can protect tag from deletingNice Ajax add, delete, lock, sort functionSee demo for more detail.Install::$ sudo pip install django-universaltagor:$ sudo pip install git+git://github.com/lambdalisue/django-universaltag#egg=django-universaltagHow to useSeehttps://github.com/lambdalisue/django-universaltag/tree/master/universaltag_testsource code for detail.
Package: django-universal-uploader-widget
django-universal-uploader-widgetA beautiful image uploader widget for django/django-admin.DocumentationTo understand this package and how to use it you can access the packagedocumentation.InstallingInstall via pip package manager:pipinstalldjango-universal-uploader-widgetAdd to installed apps, insettings.py:INSTALLED_APPS=['my_app.apps.MyAppConfig','django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles','django.forms','universal_uploader_widget',]Usage# forms.pyfromdjangoimportformsfromuniversal_uploader_widget.widgetsimportImageUploaderWidgetclassExampleForm(forms.ModelForm):classMeta:widgets={'image':ImageUploaderWidget(),}fields='__all__'
Package: django_universe
Django_spider is a simple Django app to traverse through your
django code and django file system with ease
Detailed documentation is in the “docs” directory.Quick startAdd “django_spider” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'django_spider',
)Add a variable APPS_FOR_SPIDER  with the app names mentioned like this:APPS_FOR_SPIDER = [<app name 1>,<app name 2>,<app name 3>, ...]Include the django_spider URLconf in your project urls.py like this:url(r'^django_spider/', include('django_spider.urls')),Runpython manage.py migrateto create the django_spider models.Visithttp://127.0.0.1:8000/django_spider/to start surging through your django code files
Package: django-unload
django-unloadis a maintenance application used for performing template cleanup. It is used primarily as a command-line tool that scans the entire project or the specified app and returns the results in a tabular format.InstallationRequirementsPython 2.7+, 3.4+Django 1.8 (1.9 support will be added later)TabulateInstallationTo install the package, type:$ pip installdjango-unloadSetupEnsure that'unload'is in your project’sINSTALLED_APPS:INSTALLED_APPS = [
    ...
    'unload',
    ...
]User Guidedjango-unloadis used as a command line tool. It can either be used to scan all template files in the project or the templates in the specified Django app.In order for the plugin to function properly, all third-pary packages located in theINSTALLED_APPSsetting (e.g. django-debug-toolbar) should be installed usingpip.django-unloadusespipto differentiate between the project’s templates and the templates of packages located in the installed apps (e.g. admin templates).Scan the projectTo scan all template files in the project, type:$ python manage.py find_unnecessary_loads.Scan an appTo scan a specific app, type:$ python manage.py find_unnecessary_loads--app<app_name>.OutputThe output is sent to the console. Although all template files are scanned, only templates with issues and the issues in question are displayed. The issues are displayed in two tables:The first table points to duplicate loads;Duplicate moduleDuplicate tag/filterLine numbersome_module10, 23some_other_modulesome_tag14, 47The second table simply lists unutilized modules, tags and filters;Unutilized moduleUnutilized tag/filtersome_modulesome_tagsome_other_modulesome_filterWARNING:If you get aTemplateSyntaxError, the template in question is probably outdated and/or has not been used in a while.Example Output/path/to/template.htmlDuplicate moduleDuplicate tag/filterLine numbersome_module10, 23some_other_modulesome_tag14, 47Unutilized moduleUnutilized tag/filtersome_modulesome_tagsome_other_modulesome_filter
Package: django-unmigrate
If you are in a complex Django project, sometimes you will find yourself switching
between multiple branches, some of which can add a number of database migrations.
Before switching back tomasteryou will have to unapply all migrations that
are specific to the current branch. In order to unapply these, you will have to
enter the migration that comes right before the first migration of the current
branch. If two or more apps are involved, you will have to do that for each one
of them.If you leave your migration names unchanged, inferring the name of the right
migration to target is not too difficult, because they are prefixed by default
with a sequential number. Django also helps, being smart enough to let you use
an unambiguous prefix of any migration name. Add a merge migration and the
numbers will no longer be so obvious. Or if you have renamed your migration
files to drop the sequential numbers you will have to do the search manually.Withdjango-unmigrateyou can speed up the process.UsageAdddjango_unmigrateto yourINSTALLED_APPS. This is required to make
theunmigratemanagement command available.Then, while standing on any branch, you will be able to use:python manage.py unmigrate masterOr if it’s going to bemasteranyways, this will suffice:python manage.py unmigrateAnd that’s it!A little deeperOk, you can do more than that.Do you need to unapply your migrations from the same branch, a few commits
behind? Here’s how:python manage.py unmigrate HEAD~12
python manage.py unmigrate b13553d
python manage.py unmigrate v1.33.7Or if you only want to see the target migrations, do:python manage.py unmigrate --dry-runFinally, if you just want to play with the app with no actual modifications in
the database, go ahead and unapply your migrations withfake. Just don’t
forget to apply them again at the end:python manage.py unmigrate --fake
python manage.py migrate --fakeContributingJoin the discussion athttps://github.com/lorinkoz/django-unmigrate/discussions.PRs are welcome! If you have questions or comments, please use the link
above.To run the test suite runmakeormake coverage. The tests for this
project live inside a small django project calleddunm_sandbox. Beware!
This package uses Git to function, therefore, the tests expect a number of
commit hashes inside this repository to be present and remain stable in order
to function. Seethis meta filefor further details.
Package: django-unpoly
django-unpolyUnpoly 2 integration and utilities for DjangoFree software: MITDocumentation:https://jwaschkau.github.io/django-unpoly/FeaturesImplements the Unpoly 2 Server protocol (https://unpoly.com/up.protocol)Provides utilities for using Unpoly 2 with Django 3.django-debug-toolbar support (https://github.com/jazzband/django-debug-toolbar).django-concurrency support (https://github.com/saxix/django-concurrency).CreditsThis package was created withCookiecutterand thezillionare/cookiecutter-pypackageproject template.
Package: django-unshorten
A Django application for un-shortening URLs that have been shortened by
URL shorteners like bit.ly.InstallationYou need to install the following prerequisites in order to use this app:pip install DjangoIf you want to install the latest stable release from PyPi:$ pip install django-unshortenIf you feel adventurous and want to install the latest commit from GitHub:$ pip install -e git://github.com/bitmazk/django-unshorten.git#egg=unshortenAddunshortento yourINSTALLED_APPS:INSTALLED_APPS = (
    ...,
    'unshorten',
)Hook this app into yoururls.py:urlpatterns = [
    url(r'^unshorten/$', include('unshorten.urls')),
]You need to set the class that does the rate limiting.
For Default set this to:UNSHORTEN_RATE_LIMIT_CLASS = 'unshorten.rate_limit.SimpleRateLimit'This will simply limit the daily api calls to the following setting, you must
also provide:UNSHORTEN_DAILY_LIMIT = 5000Also you need to provide the setting forUNSHORTEN_API_AUTH_CLASS.
Default is:UNSHORTEN_API_AUTH_CLASS = 'unshorten.authentication.SimpleAuthentication'This provides simple http authentification as well as login authentication.On your server, if you are usingmod_wsgiyou need to add this to yourhttpd.conf:WSGIPassAuthorization OnUsageAfter installation a user should be able to call the api using basic http
authentication and a query. A requested URL could look like this:https://example.com/unshorten/api/v1/unshorten/?url=http%3A%2F%2Fbitmazk.comAnd here’s an example of a request with basic http authentication using curl::curl --user user@example.com:password123 "https://example.com/unshorten/api/v1/unshorten/?url=bit.ly%2FUn9Gns"ContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your forkmkvirtualenvdjango-unshortenmakedevelopgitco-bfeature_branchmaster# Implement your feature and testsgitadd.&&gitcommitgitpush-uoriginfeature_branch# Send us a pull request for your feature branchIn order to run the tests, simply executetox. This will install two new
environments (for Django 1.8 and Django 1.9) and run the tests against both
environments.
Package: django-unsigned-fields
=============================django-unsigned-fields=============================.. image:: https://badge.fury.io/py/django-unsigned-fields.png:target: https://badge.fury.io/py/django-unsigned-fields.. image:: https://travis-ci.org/simpleenergy/django-unsigned-fields.png?branch=master:target: https://travis-ci.org/simpleenergy/django-unsigned-fields.. image:: https://coveralls.io/repos/simpleenergy/django-unsigned-fields/badge.png?branch=master:target: https://coveralls.io/r/simpleenergy/django-unsigned-fields?branch=masterDjango fields for using unsigned integers for relationships"Documentation-------------The full documentation is at https://django-unsigned-fields.readthedocs.org.Quickstart----------Install django-unsigned-fields::pip install django-unsigned-fieldsThen use it in a project::import django-unsigned-fieldsFeatures--------- :class:`django_unsigned_fields.fields.UnsignedAutoField`- :class:`django_unsigned_fields.fields.UnsignedForeignKey`- :class:`django_unsigned_fields.fields.UnsignedOneToOneField`- :class:`django_unsigned_fields.fields.UnsignedManyToManyField`History-------0.1.0 (2014-07-16)++++++++++++++++++* First release on PyPI.
Package: django-unslashed
This middleware provides the inverse of the Django CommonMiddlewareAPPEND_SLASHfeature. It can automatically remove trailing URL slashes and 301 redirect to the non-slash-terminated URL. This behavior is performed if the initial URL ends in a slash and is invalid, removing the trailing slash produces a valid URL, andREMOVE_SLASHis set to True. Otherwise there is no effect.For example,foo.com/bar/will be redirected tofoo.com/barif you don’t have a valid URL pattern forfoo.com/bar/but do have a valid pattern for foo.com/bar andREMOVE_SLASH=True.
Package: django-unsplash
=====unsplash=====Unsplash is a simple Django app to manage Unsplash photos and use it in your project.Detailed documentation is in the "docs" directory.Quick start-----------1. Add "unsplash" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'unsplash',]2. Run `python manage.py migrate` to create the unsplash models.3. Start the development server and visit http://127.0.0.1:8000/admin/to create an Unsplash Photo (you'll need the Admin app enabled).
Package: django-unsubscribe
Easily send one-click un-subscribable emails from django to keep your customers happy.FeaturesAddsList-Unsubscribeheader to the email.Adds a context variableunsubscribe_urlwhich can be used to render emails.Provides signals to implement the actual unsubscribe logic.RequirementsPython (2.7, 3.2, 3.3, 3.4)Django (1.4, 1.5, 1.6, 1.7)QuickstartInstall Django Unsubscribe:pip install django-unsubscribeAddunsubscribeto yourINSTALLED_APPSsettings.from unsubscribe import UnsubscribableEmailMessage# rest of your codeAdd a signal listner foruser_unsubscribein your code that contains the logic to unsubsribe a user from the mailing list.That’s it!OverviewThis application is supposed to help at improving the overall quality of the
mass e-mails your site sends out by:Creating a simple subclass ofdjango.core.mail.EmailMultiAlternatives, which adds aList-Unsubscribeheader to the email message and arender_messagefunction that is a wrapper torender_to_stringto addunsubscribe_urlto the context.Providing a replaceableurlconfandview, which provides a unique url for each user wishing to unsubscribe.This application does not:Compose, create or mail newsletter e-mails for you. That is up to you.Actually unsubscribe members from your mailing lists. It provides a signal,unsubscribe.signals.user_unsubscribe, which you must hook on to to unsubscribe your users.ContributingPlease send pull request or open a issue.LicenseBSDHistory0.1.1 (14/04/2014)add support for django 1.5,1.6 and 1.7add support for python 3fix missing template0.1.0 (22/02/2014)First release on PyPI.
Package: django-unumcharfield
# django-unumcharfield
Django Char Field using Unum## Description
UnumCharField is a simple Django app to use Unum through a CharField.## Install
Run the command in the terminal:pip install django-unumcharfield## Quick start
1. Import in your models.py:from unumcharfield.models import UnumCharFieldUse it as CharField.## Test
1. If you would like to check if UnumCharField is working fine, add
UnumCharField demo application to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'unumcharfield.demo',
]Include the UnumCharField URLconf in your project urls.py like this:from django.urls import include
...
path('unumcharfield/', include('unumcharfield.demo.urls')),Runpython manage.py makemigrations demoto create the unumcharfield models.Runpython manage.py migrateto create the unumcharfield models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a unumcharfield (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/unumcharfield/to check.
Package: django-unused
# django-unused[![Build Status](https://travis-ci.org/edustaff/django-unused.svg?branch=master)](https://travis-ci.org/edustaff/django-unused)Lists all unused templates, views, or media in a Django project.## Install / Setup ##First install the packagepip install django-unusedAdd to Django `settings.py` file```pythonINSTALLED_APPS = (...'django_unused',...)```## Usage ##django-unused creates a management command `unused`.The command has three basic sub commands: `templates`, `views`, and `media``unused templates`: A semantic personal publishing platform**templates**python manage.py unused templates**views**python manage.py unused views**media (currently not implemented)**python manage.py unused media## Testing ##Just run tox.tox###### Upload to PyPI ######Just to remind myself:python setup.py bdist_wheel --universaltwine upload dist/*
Package: django-unused-context
Django Unused ContextDjango Middleware providing a mechanism for triggering warnings about template
context keys that do not get used while rendering the template.Full documentation onread the docs.InstallationInstall the package:python-mpipinstalldjango-unused-contextAdd the middleware to your Djangosettings.pyfile:MIDDLEWARE=['django_unused_context.middleware.UnusedContextMiddleware',...]Ensure thatDEBUGis set toTruein your Django settings file.DEBUG=TrueUsageUsage is automatic once the middleware is added. On each response that renders
a template, any variables that were added to the template's context and then
not used in the template rendering will be added to an internal set that will
be both logged out and raise warnings. This is useful for knowing that all
variables being sent to a template are being used.ConfigurationThe package has a couple of configuration options available to you.
The options can be set by adding the associated option and its value into
your settings file for Django.DJANGO_UNUSED_CONTEXT_ALWAYSDefault:FalseThe tool will only show warnings and log out messages when the project's
settings hasDEBUG = True. If you would like to have unused context variables
logged out and raise warnings regardless of whetherDEBUG = True, set this
setting toTrue.This is useful for having tests output any unused context variables.
Since tests are normally run withDEBUGset toFalse, you will never see
output from this tool when running tests. If you would like to see this output
when running tests as well you can, set this setting toTrue.NOTE:It is strongly Encouraged that you do NOT turn this setting on for a
project that is in production as it will slow down the site and do unnecessary
logging.DJANGO_UNUSED_CONTEXT_ALWAYS=TrueDJANGO_UNUSED_CONTEXT_IGNOREDefault:[](Empty List)The tool comes with some default keys that are automatically ignored regardless
of whether they are used or not in a template. Many of these are provided by
Django automatically and thus often times may not be used in a template.
Rather than constantly seeing these, it seemed more reasonable to ignore them.The predefined keys to ignore include:'block',# block.super not called in overridden template.'csrf_token',# Given to all templates.'DEFAULT_MESSAGE_LEVELS',# Given to all templates using messages framework.'False',# Given to all templates.'forloop',# Given to templates with a for loop.'is_paginated',# Included by ListView and may not need pagination.'None',# Given to all templates.'page_obj',# Included by ListView and may not need pagination.'paginator',# Included by ListView and may not need pagination.'perms',# Given to login_required templates.'root_urlconf',# Given to exception pages for 404.'settings',# Likely to be given to templates and not used.'site',# Given to the login page and may not be used.'site_name',# Given to the login page and may not be used.'True',# Given to all templates.'view',# Given to built-in password reset page.If you would like to add additional keys to ignore that are specific to your
project, you can do that here.
Be sure to list each key in the list as a string.DJANGO_UNUSED_CONTEXT_IGNORE=['errors']