Saravanan666/pypi-org huggingface dataset:
Package: django-whatever-es9iecor
Unobtrusive test models creation for djangoThis package is no longer maintained. If you would like to take over, contact me pls.django-whatever is a friendly fork ofdjango-anypackage written by Mikhail Podgurskiy (kmmbvnr)
The purpose of the fork is to fix most annoying bugs and addsome featuresTo remain compatible with original packagedjango-whateverretains same namespace:django_any.django-whateveris explicit replacement for old-style, big and error-prone
implicit fixture files.django-whateverallows you to specify only fields important for tests
and fills the rest randomly with acceptable values.It makes tests clean and easy to understand, without reading fixture files.:from django_any import any_model

class TestMyShop(TestCase):
    def test_order_updates_user_account(self):
        account = any_model(Account, amount=25, user__is_active=True)
        order = any_model(Order, user=account.user, amount=10)
        order.proceed()

        account = Account.objects.get(pk=account.pk)
        self.assertEquals(15, account.amount)Read more at the docs:http://django-whatever.readthedocs.org/
Package: django-whatsnew
Django What's New==================Simple application to manage "what's new" welcome screen based on package version... note:: Package must contains valid PEP386 entry in the __init__ of the main module.How to use----------- put ``whatsnew`` in your INSTALLED_APPS::INTALLED_APPS=(...'whatsnew')- modify your base template as.. code-block:: html<link href="{% static 'whatsnew/whatsnew.min.css' %}" rel="stylesheet" media="screen"><script language="JavaScript" src="{% static 'whatsnew/js/whatsnew.min.js' %}"></script>{% load whatsnew %}<body>{% whatsnew '<your_main_package_name>' %}- create your :file:`whatsnew/whatsnew.html` like:.. code-block:: html<style>#django-whatsnew .button.b-close {background-color: #2B91AF;border-radius: 7px;box-shadow: none;font: bold 131% sans-serif;cursor: pointer;padding: 0 6px 2px;position: absolute;right: -7px;top: -7px;text-align: center;text-decoration: none;}#django-whatsnew {font-size: 200%;background-color: #FFFFFF;border-radius: 10px;box-shadow: 0 0 25px 5px #999999;color: #111111;display: none;min-width: 450px;padding: 0px 5px 5px 15px;}</style><script>{% if display %}function setCookie(name, value, days) {var expires;if (days) {var date = new Date();date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));expires = "; expires=" + date.toGMTString();} else {expires = "";}document.cookie = name + "=" + value + expires + "; path=/";}setCookie('{{ name }}', '{{ news.version }}');$(function () {$('#django-whatsnew').bPopup({speed: 450,transition: 'slideDown'});$('#whatsnew-seen').click(function () {setCookie('{{ name }}', '{{ news.version }}', 365);});});{% endif %}</script><div id="django-whatsnew" style="display: none"><span class="button b-close"><span>X</span></span>{{ news.content|safe }}<span><input type="checkbox" id="whatsnew-seen">do not show again</span></div>- and your :file:`whatsnew/test.html` like:.. code-block:: html{% extends "base.html" %}{% load whatsnew %}{% block body %}{% whatsnew 'whatsnew' 1 %}<script>$('.b-close').click(function () {window.history.go(-1);})</script>{% endblock body %}{% block jira %}{% endblock jira %}How version are checked------------------------- try to get version number using setuptools- check the main package name for 'version', 'VERSION' or '__version__'- try to call package.get_version()- raise DistributionNotFound
Package: django-whippedcream
The perfect counterpart todjango-tastypie.django-whippedcream provides a few mixins and utilities that I’ve used to make
my life with tastypie easier.Tested using django-tastypie>0.12, Django>1.7, and Python 2.7 and >3.4Requirementsdjango-tastypie, of course. Also pytz if you want to use the DateTimeSerializer.InstallationInstall:pip installdjango-whippedcreamAddwhippedcreamto yourINSTALLED_APPS.DateTimeFieldThis is a simple addition to the DateTimeField that removes milliseconds
from the field. This is useful if you don’t want to provide that level
of accuracy, but also if your database engine doesn’t store that level
of accuracy (MySQL).from whippedcream.fields import DateTimeField

class MyResource(Resource):
    dt = DateTimeField('dt', normalize=True)PyAccessMixinThis mixin class can be added to any resource where you may want to
access a serialized (JSON) version in any of your regular python code.
It basically implements this pattern:http://django-tastypie.readthedocs.org/en/latest/cookbook.html#using-your-resource-in-regular-viewsfrom whippedcream.mixins import PyAccessMixin

class MyResource(MyAccessMixin, Resource):
    pass

# elsewhere...
result = MyResource().obj_to_simple(request, obj)
Package: django-whistle
django-whistleDjango Whistle is a Django app that provides a simple way to send notifications via different channels.
Currently supportsweb,push,emailchannels.Basic UsageInstallation: Install Django Whistle using pip:pipinstalldjango-whistleConfiguration in settings: Add 'whistle' to yourINSTALLED_APPSin the Django project settings:# settings.pyINSTALLED_APPS=[# ...'whistle',]ConfigurationCustomize Django Whistle by configuring settings in your project'ssettings.py:BasicsSetup events and channels for notifications like this:Pro tip, you can use TextChoices for events.# settings.pyWHISTLE_CHANNELS=['web','push','email']WHISTLE_NOTIFICATION_EVENTS=(('NAME_OF_EVENT',gettext_lazy('Object%(object)rwas updated'))### Custom Notification Manager/HandlersYoucanovverridethelogicofsendingnotificationsbycreatingcustommanagerorhandler.Handlerisforgeneralavailabilityofevent/channel,andmanagersisfordefiningthebehaviour.Forexample,youcanuseittocustomizeemails,addcontexttoemails,orforwhateveryoumissinthedefaultimplementation.```python# settings.pyWHISTLE_EMAIL_MANAGER_CLASS="bidding.notifications.managers.CustomEmailManager"WHISTLE_NOTIFICATION_MANAGER_CLASS=("bidding.notifications.managers.CustomNotificationManager")WHISTLE_AVAILABILITY_HANDLER="bidding.notifications.handlers.availability_handler"Asynchronous NotificationsYou can send notifications asynchronously using queues.# settings.pyWHISTLE_REDIS_QUEUE=NoneWHISTLE_USE_RQ=FalseRQ_QUEUES=NoneWHISTLE_CACHE_TIMEOUT=None# infiniteRunning the testsExplain how to run the automated tests for this systemBreak down into end to end testsExplain what these tests test and whyGive an exampleAnd coding style testsExplain what these tests test and whyGive an exampleDeploymentAdd additional notes about how to deploy this on a live systemBuilt WithDropwizard- The web framework usedMaven- Dependency ManagementROME- Used to generate RSS FeedsContributingPlease readCONTRIBUTING.mdfor details on our code of
conduct, and the process for submitting pull requests to us.VersioningWe useSemVerfor versioning. For the versions available, see
thetags on this repository.AuthorsBillie Thompson-Initial work-PurpleBoothSee also the list ofcontributorswho participated in this project.LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for detailsAcknowledgmentsHat tip to anyone who's code was usedInspirationetc
Package: django-whiteless
django-whitelessDjango template tags which deal with pesky whitespaces!Django 2.x and 3.xPython 3.7, 3.8, 3.9InstallationInstall the latest version from PyPI:$pipinstalldjango-whitelessAdd"whiteless"toINSTALLED_APPS:INSTALLED_APPS=(# ..."whiteless",)UsageThe library consists of two template tags,{% whiteless %}and{% eof %}.
This is how you use them.Remove all whitespaces{% whiteless %}
    ...
{% endwhiteless %}Remove leading whitespaces{% whiteless leading %}
    ...
{% endwhiteless %}Remove trailing whitespaces{% whiteless trailing %}
    ...
{% endwhiteless %}Remove leading and trailing whitespaces{% whiteless leading trailing %}
    ...
{% endwhiteless %}Replace whitespaces with a single space{% whiteless space %}
    ...
{% endwhiteless %}Note that if there are leading or trailing whitespaces in the block, those will
also be replaced by a single space. In order to remove leading and trailing
whitespaces and replace all other whitespaces with a single space, use:{% whiteless space leading trailing %}
    ...
{% endwhiteless %}Remove trailing whitespaces at end of fileHello there!{% eof %}This is useful if e.g. your project style guide requires all files to end with
a newline but that causes issues with your template.Note that{% eof %}cannot be used inside other tags. It only removes
whitespaces that immediately follow itself.Development$poetryshell
$poetryinstall
$pre-commitinstall# install git hooks$tox# run testsLicenseMIT
Package: django-whoshere
A lightweight Django Admin plugin showing who’s logged in from where
using the cache. SupportsTelize,django-ipware,user-agentsandGeoIPRequirementsDjango>= 1.7requestsOptionaluser-agentsAdds
nicer user agent formattingdjango-ipwareMore
robust way of determining a users IPGeoIPFor geolocation instead ofTelize.InstallationMake sure you have Django’sCachebackend set up.Install using pip:pip installdjango-whoshereAdddjango_whosheretoINSTALLED_APPSin settings.py:INSTALLED_APPS=(# other apps'django_whoshere',)Adddjango_whoshere.middelware.TrackMiddlewareto yourMIDDLEWARE_CLASSES. Make sure it comes after your Authentication
middleware.MIDDLEWARE_CLASSES=(# other middleware'django.contrib.auth.middleware.AuthenticationMiddleware','django.contrib.auth.middleware.SessionAuthenticationMiddleware','django_whoshere.middleware.TrackMiddleware',# more middleware)OptionalInstalluser-agentsfor
nicer user agent formattingInstalldjango-ipwarefor a better way to determine real ip addresses.ConfigureGeoIPor installdjango-geoip-utilsfor geo location instead ofTelize.ConfigurationNo configuration is needed but these settings are provided for
convenience:WHOSHERE_TIMEOUT = 300Sets the timeout for user activity.
Defaults to 300 seconds.WHOSHERE_LABEL = 'Active Users'Overrides the admin link label.
Defaults to ‘Active Users’WHOSHERE_PREFIX = 'whoshere'Prefix used in cache keys. Defaults
to ‘whoshere’.WHOSHERE_TELIZE = TrueYou can set this to ‘False’ to turn off
geolocation lookups withTelize. Is
always off if GeoIp is installed.Template tagsBesides the admin interface, WhosHere’s functions are also available as
template tags:{%loadwhoshere%}There are now{%active_user_count%}users logged in.{%active_usersasusers%}<ul>{%foruserinusers%}<li>{{user.username}}({{user.email}})</li>{%endfor%}</ul><p>Your IP address is{%your_ip%}</p><p>Your browser and platform is{%your_agent%}</p><p>You live in{%your_city%},{%your_country%}</p>GeolocationOriginally this plugin started with GeoIP support only, but this means
you have to install the rather large database that it comes with. Not a
problem if you already use it for other things, but not a lightweight
solution if you only use it for WhosHere. As an alternative WhosHere
uses the freeTelizeAPI over HTTPS by
default to find the location of your logged in users. This comes with
some caveats:TheTelizeAPI isopensource, but you are
sending users IP addresses, albeit anonymously, to a third party.Being a free API it can sometimes be unavailable or slowYour server needs HTTPS access to a remote locationYou can turn off Telize lookups withWHOSHERE_TELIZE =  Falsein
yoursettings.pyor by installing and configuring GeoIP.NotesMiddleware is kept as small as possible and only adds IP and User
Agent to the cache for the current logged in user.No database tables are used. Instead WhosHere uses a proxy model of
the User model.Proxy models will create migrations but do not affect your databaseTelize lookups are cached for performanceUsing the excellent requests library for better SSL supportTodoAdd testsThink of other things to add
Package: django-whyus-ds
django-whyus_dsdjango-whyus_ds is a Django app to use for demiansoft.Quick startAdd "whyus" to your INSTALLED_APPS setting like thisINSTALLED_APPS=[...'whyus',]코드를 넣고자 하는 위치에 다음을 추가 한다.{% load whyus_tags %}
{% make_whyus %}context examplecontext={"theme":"mentor_ds","whyus":{"major":{"title":"치과전문의 진료","contents":["구강악안면외과와 교정과를 전공한 원장님들의 특화된 진료를 제공합니다."],"link":"#doctors"},"_comment_type":"icon or image","type":"icon","_comment_icon":"https://boxicons.com/ [bx-group, bx-pulse, bx-buildings, bx-bed]","minor":[{"icon":"bx-buildings","title":"상급병원과의 연계","contents":"삼성서울병원과의 유기적인 협력관계로 신속한 연계가 가능합니다. (대표원장 현 삼성서울병원 외래교수 재직)"},{"icon":"bx-pulse","title":"당일 사랑니발치","contents":"치과용 CT를 이용한 정밀검사를 통해 수술이 필요한 사랑니도 발치가 가능합니다."},{"icon":"bx-bed","title":"수면진정치료","contents":"치과공포증으로 치료가 어려웠던 환자분들도 안전하고 편안하게 수면진정치료를 받으실 수 있습니다."}]}}
Package: django-widgeter
[![Build Status](https://travis-ci.org/dlapiduz/django-widgeter.png?branch=master)](https://travis-ci.org/dlapiduz/django-widgeter)Widgeter========================A simple engine for django backend widgets based on https://github.com/marcinn/django-widgets.Features------------------ Creation of custom widgets in reusable apps- Rendering of widgets by name- Rendering of widget blocks without previous knowledge of widget names- Autodiscovery of widgets from all installed appsInstallation-----------------1. Install the package using `pip install django-widgeter`1. Add `widgeter` to your `INSTALLED_APPS` in `settings.py`Defining a Widget-----------------Add a `widgets.py` file on your application with the following statements.- Widgets can be defined with a template (and optionally a context):```from widgeter.base import Widgetclass HelloWorld(Widget):template = 'hello_world/widget.html'def get_context(self, context, options=None):return { 'message': u'Hello World!' }```or with a render function:```from widgeter.base import Widgetclass HelloWorld(Widget):def render(self, context, options=None):return u'Hello world!'```- Register your widget:```from widgeter.registry import registryregistry.register('hello_world', HelloWorld())```Rendering a Widget-----------------On a template you first have to load the template tags and then render the particular widget:```{% load widgeter %}{% widget "hello_world" %}```You can also pass variables to your widget:```{% load widgeter %}{% widget "hello_world" current_user %}```Using Blocks-----------------Widget blocks allow you to render widgets without previously knowing the names for them.The autodiscovery process will add them to the registry and you can the look them up by block name.Priorities can also be assigned to render them in order.- First define a block on the widget:```from widgeter.base import Widgetclass HelloWorld(Widget):block = 'home'priority = '1'template = 'hello_world/widget.html'def get_context(self, context, options=None):return { 'message': u'Hello World!' }```- Then, on the template, use the `widget_block` tag:```{% load widgeter %}{% widget_block "home" current_user %}```Running the Tests------------------------------------You can run the tests with via::python setup.py testor::python runtests.py
Package: django-widgy-blog
Django Widgy BlogThis is reusable blog app designed for use withdjango-widgy. It can
be utilized as a drop-in addition to a widgy project for creating a
quick, run-of-the-mill blog or as an abstract guide to building your
own custom app that takes advantage of all the wonderful features that
widgy offers.Quickstart(This guide assumes that your project is already using widgy. Please see
thistutorialif this is not the case.)Install the package$ pip install django-widgy-blogAddwidgy_blogto yourINSTALLED_APPS.Runpython manage.py migratein
order to generate the relevant models in the database.Configure the urls:If you’re using widgy’scontrib.urlconf_includepackage, you can
opt to use widgy_blog as a plugin. This allows admin users of the site
to take advantage of plugin-specific features, such as editing the url
route of the blog and customizing its addition to menus. Seeurlconf_includefor more information.Alternatively, you can include the widgy_blog urls within your urls.py
file as you normally would. Just remember to add them before the
included Mezzanine urls if you’re editing the root conf!That’s it. Log in to the admin center and start adding blog posts!CHANGES0.2.3 (2019-07-15)Blog views with pagination will now calculate appropriaterel=prevandrel=nextlinks.Added Django 1.10 support.0.2.2 (2016-02-08)Fix subclassing view name bug0.2.1 (2016-01-14)Fix PyPI bug0.2.0 (2016-01-14)Support for Django 1.8Blog archives are now shown in reverse chronological order.Blogs now have date and time rather than just date published.Tags are now supportedVarious small bugfixes.Blog views with a page querystring equal to 1 will now have a canonical_url
in the template context pointing to the same page without that querystring.0.1.0 (release 2014-12-03)Add model attributes to AbstractBlogLayout and BlogAdmin
that make them easier to subclass. Update AbstractBlogLayout
published queryset function to use fewer queries [Scott Clark, #18]Backwards Incompatible:Registered theBlogLayoutmodel with widgy.
If you weren’t using this as your Blog layout, you will need to unregister
it:import widgy
from widgy_blog.models import BlogLayout

widgy.unregister(BlogLayout)If you were already registering theBlogLayoutyourself, you can just
remove that code.
Package: django-wiki
Super simple pluggable wiki application for Django.AuthorsJohn Sutherland (https://github.com/sneeu)Taylor Mitchell (https://github.com/tmitchell)Basic UsageFor the default URL setup, add the following line to your root
URLConf:(r'^wiki/', include('wiki.urls')),This will set up the following URL patterns:/wikiwill be the view to list all of the wiki pages./wiki/<name>/will be the view for the latest revision of
a wiki page.  It has a url name ofwiki-view-page./wiki/<name>/<rev>will be the view for a specific revision
of a wiki page.  It has a url name ofwiki-view-revision./wiki/<name>/diff/<rev>will be the view for the diffs for
a specific revision of a wiki page.  It has a url name ofwiki-view-diff./wiki/<name>/editwill be the view to edit a wiki page.  It has a
url name ofwiki-edit-page.The default wiki page name format isWikiWord.  You can customize the naming
convention if desired by adding your own regular expression to your settings.py
like this:WIKI_WORD = r'(?:[A-Z]+[a-z]+){2,}'Bug Reports/Feature RequestsPop over to this app’sproject page on Githuband
checkthe issues listto see if it’s already been reported. If not,
open a new issue and I’ll do my best to respond quickly.
Package: django-wikibase
Yours settings.py sample:DATABASES={'default':{'ENGINE':'wikibase','BOT_USERNAME':getenv('BOT_USERNAME','SYSDBA'),# Any user registerd as bot in mediawiki (with correct rights)'BOT_PASSWORD':getenv('BOT_PASSWORD','MasterKey'),# Bot password in mediawiki'URL':getenv('WIKIBASE_URL','http://localhost'),'OPTIONS':{'charset':'utf-8','instance_of_property_id':1,# Change if instance of in local wikibase has another property identifier. For example: instance of has P2333 identity => 'instance_of_property_id': 2333'subclass_of_property_id':2,# Change if instance of in local wikibase has another property identifier. For example: subclass of has P2777 identity => 'subclass_of_property_id': 2777'wdqs_sparql_endpoint':getenv('SPARQL_ENDPOINT','http://localhost/sparql'),'django_namespace':'my-cool-application-namespace'}}}
Package: django-wildewidgets
_ _                                     _ _     _               _     _            _       
    | (_)                                   (_) |   | |             (_)   | |          | |      
  __| |_  __ _ _ __   __ _  ___ _____      ___| | __| | _____      ___  __| | __ _  ___| |_ ___ 
 / _` | |/ _` | '_ \ / _` |/ _ \___\ \ /\ / / | |/ _` |/ _ \ \ /\ / / |/ _` |/ _` |/ _ \ __/ __|
| (_| | | (_| | | | | (_| | (_) |   \ V  V /| | | (_| |  __/\ V  V /| | (_| | (_| |  __/ |_\__ \
 \__,_| |\__,_|_| |_|\__, |\___/     \_/\_/ |_|_|\__,_|\___| \_/\_/ |_|\__,_|\__, |\___|\__|___/
     _/ |             __/ |                                                   __/ |             
    |__/             |___/                                                   |___/django-wildewidgetsis a Django design library providing several tools for building
full-featured, widget-based web applications with a standard, consistent design, based
on Bootstrap.The package includes the source to ademo.Quick startInstall:pip install django-wildewidgetsIf you plan on usingAltair charts, run:pip install altairAdd "wildewidgets" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'wildewidgets',
]Include the wildewidgets URLconf in your project urls.py like this:from wildewidgets import WildewidgetDispatch

urlpatterns = [
    ...
    path('<urlbasepath>/wildewidgets_json', WildewidgetDispatch.as_view(), name='wildewidgets_json'),
]Add the appropriate resources to your template files.First, add this to your<head>:<link rel="stylesheet" href="{% static 'wildewidgets/css/wildewidgets.css' %}">ForChartJS(regular business type charts), add the corresponding javascript file:<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"></script>ForAltair(scientific charts), use:<script src="https://cdn.jsdelivr.net/npm/vega@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script>ForDataTables, use:<script src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.21/sorting/datetime-moment.js"></script>and:<link href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css" rel="stylesheet" />and, if usingTabler, include:<link rel="stylesheet" href="{% static 'css/table_extra.css' %}">ForApexCharts, use:<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>If you plan on using CodeWidget, you'll need to include the following to get syntax highlighting:<link rel="stylesheet" href="{% static 'css/highlighting.css' %}">Documentationdjango-wildewidgets.readthedocs.iois the full
reference for django-wildewidgets.
Package: django-willing-zg
django-willing-zgA Django app to hold common utilities for Zygoat-managed applicationsWhat it doeswilling_zgprovides a means to define frontend configuration in the django settings and an API endpoint to make that configuration accessible.UsageAdd "willing_zg" toINSTALLED_APPSin the django settingsDefineZYGOAT_FRONTEND_META_CONFIGin the django settingsZYGOAT_FRONTEND_META_CONFIG = { "example_frontend_config": "example_value" }Include the willing_zg URLconf in your project's urls.py:path('api/zygoat/', include('willing_zg.urls')),Import willing-zg settings into the django settingsfrom willing_zg.settings import * # noqaRunning locally for developmentcheckout the directory into thebackenddirectory of the app you're developing inmodify your Dockerfile.local and addADD /django-willing-zg /django-willing-zgaboveWORKDIR /codeand addRUN poetry add --editable /django-willing-zgafter poetry install