Saravanan666/pypi-org huggingface dataset:
Package: django-easytz
Django EasyTZ====================Timezone localization without any thinking or doing whatsoever.The purpose of this django app is to piggy back off of Django's already great timezone handling and add some automagic to the equation. This package is perfect for you if:- you don't care about accurate timezone names for your users (many timezones have the same UTC offset but have different names, I.E. America/Eastern and America/New_York)- you trust the time and timezone setting of the client's machine- you are using Django 1.4 or aboveSetup---------------------1. Use your favorite python package installer. `$ pip install django-easytz`2. Make sure `USE_TZ` is set to True in your settings file. This is Django's default since they introdcued timezone support in 1.43. add `easytz.middleware.TimezonesMiddleware` to your `MIDDLEWARE_CLASSES`4. add `easytz` to your `INSTALLED_APPS`5. include {{ STATIC_URL }}easytz/js/easytz.js with your scripts6. Run `./manage.py syncdb` to add the model for storing users timezonesHow It Works----------------------On the client side, jstz (http://pellepim.bitbucket.org/jstz/) is used to set a cookie with the users timezone. A middleware picks up the cookie and activates the timezone using Django's timezone handling. If a user is authenticated, it will also set the timezone in the session under a key called **timezone** as well as save it to the database.Anytime you want to access a users timezone, you can do so by calling `my_user.tz`. This will get_or_create a timezone entry for the user. If there is no entry present, it defaults to what is set in `settings.TIME_ZONE` or **'GMT'**. From there, its up to you to use Django's built in handling. Django automatically converts aware datetimes that are used in templates. If you're in Django, just do the following```Pythonfrom django.utils import timezonedef foo(request):timezone.localtime(timezone.now(), request.user.tz)...```Model----------------------There is a simple storage model in `easytz.models.TimezoneStore` with the following fields:- **user**: OneToOne to the user- **timezone**: the current timezone string for that userIf you want to cut down on redundant queries, just make sure to select_related timezone if you are accessing the `.tz` property on users.```Pythonuser = User.objects.select_related('timezone').get(user_id = 1)users = User.objects.select_related('timezone').all()```
Package: django-easywebpack
Making Django and Webpack best friends.DocumentationThe full documentation is athttps://django-easywebpack.readthedocs.io.QuickstartInstall django-easywebpack:pip install django-easywebpackAdd it to yourINSTALLED_APPS:Note:easywebpackmust be placed beforestaticfilesfor./manage.pycommands to work properly.INSTALLED_APPS=('easywebpack',...)Then, configure it in your Django settings:EASYWEBPACK={'MANIFEST':'path/to/manifest.json',}CreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.2.1 (2018-04-19)Fix broken management commands.Add more information to setup.py.Integrate version updating with Punch.0.2.0 (2018-04-18)First release on PyPI.
Package: django-ebhealthcheck
django-ebhealthcheckBy default, Elastic Beanstalk's health check system uses the public IP of each
load balanced instance as the request's host header when making a request.
Unless added toALLOWED_HOSTS, this causes Django to return a400 Bad Requestand a failed health check.This app dynamically adds your instance's public IP address to Django'sALLOWED_HOSTSsetting to permit health checks to succeed. This happens upon
application start.Version 2.0.0 and higher supports IMDSv2. If you are using v1 and cannot upgrade,
use version 1 of this library instead (pip install django-ebhealthcheck<2.0.0).Installationpip install django-ebhealthcheckAddebhealthcheck.apps.EBHealthCheckConfigto yourINSTALLED_APPS:INSTALLED_APPS = [
    ...
    'ebhealthcheck.apps.EBHealthCheckConfig',
    ...
]
Package: django-echarts
django-echartsA visual site scaffold based on pyecharts and django.django-echarts 是一个基于pyecharts和Django整合的可视化网站脚手架。概述(Summary)django-echarts 主要提供了以下的内容：支持 90%+的pyecharts图表类型可显示页面：主页 / 列表 / 详情 / 关于可支持组件：导航栏 / 网站底部栏 / 热门板块 / 列表 / 合辑 /  关于面板UI主题：Bootstrap3 / Bootstrap5 / Material ，支持更换颜色模式可灵活扩展: 支持整合 Django用户认证 / 数据库 / Session基于Django Template Engine 的后端渲染js/css静态文件托管，支持在线/本地切换生产力工具：代码生成器 / 静态文件下载器90%+ Python Typing Hints覆盖文档(Document)在线文档Build onMaterial for MkDocs示例项目(Demo Project)参见项目kinegratii/zinc。开源协议(License)MIT License
Package: django-echelon
Django-echelon - BIg Brother for your Django projectsCopyright (c) 2009-2011 Dennis Kaarsemaker <dennis@kaarsemaker.net>2011 Atamert Ölçgun <muhuk@muhuk.com>Overview--------Echelon does what its name implies: it keeps an eye on users. It allows you tofind out the current user from anywehere in your code and it tracks everyaction users do.Installing----------Install: python setup.py install- Add 'echelon' to INSTALLED_APPS in your settings.py- Add 'echelon.middleware.EchelonMiddleware' to MIDDLEWARE_CLASSES after theauthentication and session middlewareWho is the current user-----------------------To set/get the user info, there is the following API:from echelon.middleware import EchelonMiddleware# Set the current user for this thread. Accepts user objects and loginnames.EchelonMiddleware.set_user(some_user)# Get the current user or Noneuser = EchelonMiddleware.get_user()# This will return some_user if there is no current useruser = EchelonMiddleware.get_user(some_user)# Forget the current user. It is always safe to call this, even if there is no# current user.EchelonMiddleware.del_user()The middleware automatically sets/deletes the current user for HTTP requests.For other uses (management commands, scripts), you will need to do thisyourself.echelon also provides a CurrentUserField, which can be used for auditingpurposes. Use it as follows:from echelon.fields import CurrentUserFieldclass MyModel(models.Model):....creator = CurrentUserField(add_only=True, related_name="created_mymodels")last_editor = CurrentUserField(related_name="last_edited_mymodels")...This field is a ForeignKey to the django.contrib.auth.models.User model and youcan treat it as such.Automatic change logging------------------------Echelon will also automatically log all changes to almost all objects. Onlysessions and contenttypes are not logged. If you want to exclude other objects,you can set this in settings.py. For example, if you don't want changes toPermission objects logged you can add this:ECHELON_LOGGING_BLACKLIST = (('auth', 'Permission'),)You can also set an attribute in your model class to prevent logging:class MyModel(models.Model):...echelon_log_changes = FalseThe first method is prefered for models you don't control, the second is betterfor your own models.To be able to review the changelog, add this pattern to the patterns in yoururls.py:('^changelog/', include('echelon.urls'))
Package: django-echo
django-echoDjango library for creating skills for the Amazon Echo (Alexa)Getting Starteddjango-echo is mainly composed of three classes:echo.skill.EchoSkill: A subclass of Django’s generic.View that handles routing intents and dealing with request data.echo.request.EchoRequest: A small wrapper around the JSON data in the request from Amazon.echo.response.EchoResponse: A subclass of Django’s http.HttpResponse that knows how to generate a valid Amazon Echo response.Creating a SkillA skill is a class that subclasses EchoSkill that provides intent handlers:from echo.skill import EchoSkill

class HoroscopeSkill(EchoSkill):
    def get_horoscope(self, request, sign):
        # Ignore the sign because astrology is bunk.
        return self.respond(
            "Today you need to act first and ask questions later!",
            card=None,
            should_end_session=True
        )On the Amazon side you would setup an intent calledGetHoroscopethat has
asignslot, and when that intent is called thisget_horoscopemethod
will be called with the slot data.Theself.respondis a helper method that essentially just acts as a
pass-through toEchoResponse. You can also use SSML directly and
EchoResponse will set the response up correctly:self.respond("<speak>Today you need to ask questions first and act later!</speak>")Then you just need to wire the skill up to your urls.py:from django.conf.urls import url

from .views import HoroscopeSkill

urlpatterns = [
    url(
        regex=r'^horoscope/$',
        view=HoroscopeSkill.as_view(),
        name='horoscope_skill'
    )
]Responding With A CardEchoSkill provides a helper to create a simple card:return self.respond(
    "What alexa should say",
    card=self.create_simple_card("The card title", "The card's content")
)Session HandlingEchoSkill setsself.requestto an instance of EchoRequest (it also saves
the http request toself.http_request.) EchoRequest provides the session
attributes via asessionattribute:sign = self.request.session.get('sign')

request.session.update({
    'has_requested_horoscope': True
})If you useEchoSkill.respondthis session data will be automatically
attached to the response, otherwise you’ll need to pass it when creating the
response:return EchoResponse("Output text", session=self.request.session)
Package: django-echo-tester
EchoTesterDjango app , that record requests that comes to your project then run them whenever you want to determine if things breaks while development (in case you don't have tests written) --- or you wanna to simulate a scenario each time you made a changeHow to use itInstallationJust install it from pippipinstalldjango-echo-testerThen register is as an django appINSTALLED_APPS=[...'echo_tester']Then we need to record the requests to use it later.MIDDLEWARE=[...'echo_tester.middleware.TesterMiddleware',]Basic useTo run the saved requests, to test if there is breaking ones or not.pythonmanage.pyrunechoSettings variables and advanced useNOTE: Keys we use is just the path in the dictionary
in other words you can consider the dictionary is an class instance and you get a value from itfor example:request={...'headers':{'Content-Type':'application/json',...}}# To access the key wanted we usepath='headers.Content-Type'RequestRequestObject{"path":"/random/path/in/your/app/","url":"http://domain.com/random/path/in/your/app/","scheme":"http","cookies":{"token":"12345"},"method":"GET","headers":{"Content-Length":"","Content-Type":"text/plain","Accept":"*/*",},"payload":{"files":{},"get":{},"post":{},"json":null},"user":{"is_authenticated":false,"is_staff":false,"username":"","id":null,"pk":null}}# How should identify the request is new or duplicatedECHO_TESTER_REQUEST_IDENTIFIERS=['method','user.pk','headers.Content-Type']# Skip paths starts with thisECHO_TESTER_SKIP_PATH=['/admin','/secret-app']ResponseResponseObject{"status_code":404,"cookies":{},"headers":{"Content-Type":"text/html"},"data":"[DATA DROPPED]","content_length":null,"content_encoding":null,"content_type":"text/html"}# What to check if response is changed or brokenECHO_TESTER_RESPONSE_CHECKS=['status_code','headers.Content-Type']# Drop html from the response default is `True`ECHO_TESTER_DROP_HTML_FROM_RESPONSE=TrueCredentialswe need to track and update credentials to make sure saved requests and responses is always valid.# Track & update credentials or notECHO_TESTER_CREDENTIALS_WATCH=True# the key of who this credentials related for (credential owner id)ECHO_TESTER_CREDENTIALS_IDENTIFIER_KEY='user.pk'# what key uses to track credentials, if you use session/token based authentication# just add the valid kaysECHO_TESTER_CREDENTIALS_KEYS=['cookies.sessionid']General settings# raise or skip errors that happened while listeningECHO_TESTER_RAISE_ERRORS=True# stop this middleware while running tests# just provide a part of the name if you wantECHO_TESTER_SKIP_MIDDLEWARE_CONTAIN=[# FOR Example: stop csrf and stop recording'csrf',apps.EchoTesterConfig.name]
Package: django-ecom-store
StoreAn E-Commerce store for Django Application01. To install and use the package, use:pip install django-user-login
    pip install django-ecom-storeInstructions02.	Add "authentication" and "store" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
        ...
        'authentication',
        'store',
    ]03.	Include the authentication and store URLconfs in your project urls.py like this:path('authentication/', include('authentication.urls')),
    path('store/', include('store.urls')),04.	Runpython manage.py migrate(you'll need the Admin app enabled).05.	The App requiresDjango Sessions06. In your settings.py file include the following:SITE_TITLE = 'your-site-title'
    LOGIN_URL = '/authentication/'
    EMAIL_HOST = 'email-host'
    EMAIL_PORT = email-port
    EMAIL_HOST_USER = 'emaill-address'
    EMAIL_HOST_PASSWORD = 'email-password
    EMAIL_USE_TLS = True
    AUTHENTICATION_DEBUG=False
    VERIFICATION_CODE_VALIDITY_IN_MINUTES = 10 # any integer value between [1 to 60]

    CURRENCY = '$' # your local currency
    CHECK_DELIVERABILITY = False
    # If set to `True`, upload all pincodes in the database where
    # you deliver your products.
    # optionally, you can also add products that are not deliverable at that location

    TIME_ZONE = 'UTC'
    USE_TZ = True

    'context_processors': [
            ...
            'store.context_processors.site_defaults',
    ],07. To redirect users to "store" homepage use any of the following -- <a href="{% url 'store:homepage' %}">Store</a>
    - <a href='/store/'>Store</a>08. WhenAUTHENTICATION_DEBUG = TRUE- Live EMAILS will not be sent and verification codes, if any, will be displayed in the console.09. Product images are stored inBASE_DIR/images/product-images/if not other location is specified.upload_to="images/product-images/"10. CheckDemo Websiteandassociated Githubcode for more information.11. Check information on authentication apphere
Package: django-ecomstore-inventory
django-inventoryDjango-inventory is a Django app to perform full Ecommerce inventory functionality. You get to add product specific to a category, attribute, type and brand.For better understanding of the project, kindly check out django-htmx and mptt documentation.Detailed documentation is in the "docs" directory.Quick startAdd "inventory" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
...
'inventory',
'django_htmx',
'mptt',
]OR::MIDDLEWARE = [
    ...
    'django_htmx.middleware.HtmxMiddleware',
]Include the inventory URLconf in your project urls.py like this::path('', include("inventory.urls", namespace="inventory")),OR::path('inventory/', include("inventory.urls", namespace="inventory")),Runpython manage.py migrateto create the inventory models.Start the development server and visithttp://127.0.0.1:8000/admin/to create an inventory and for better understanding of the models structure (you'll need the Admin app enabled).Visithttp://127.0.0.1:8000/inventory/to participate in the inventory.Optional SettingsINVENTORY_HOME_HTML
Default to "inventory/home.html" which serves as your homepage. You can override this template by adding
INVENTORY_HOME_HTML = "your desired home html"
to your settings file.The home view comes with "products" and "featured" context data which can be manipulated as desired.INVENTORY_SHOP_HTML
Default to "inventory/category.html" which serves as your shop page. You can override this template by adding
INVENTORY_SHOP_HTML = "your desired shop html"
to your settings file.The shop view comes with "brands", "categories", "attributes" and "products" context which serves as a paginator also with and additional "url" context to issue a get request in the pagination section.INVENTORY_SHOP_SUBHTML
This template encloses the products forloop section.
Default to "inventory/partials/shop-element.html" which serves as your shop page. You can override this template by adding
INVENTORY_SHOP_SUBHTML = "your desired shop element html"
to your settings file.implement this into your shop template by adding{% include "inventory/partials/shop-element.html" %}to your desired section/segment of your shop template.INVENTORY_PRODUCT_HTML
Default to "inventory/single-product.html" which serves as your product detail page. You can override this template by adding
INVENTORY_PRODUCT_HTML = "your desired product detail html"
to your settings file.This view comes with additional context of "attributes" and "values".
Package: django-economy-sectors
This library allows the utilization of Economy Sectors, from different standards,
as well as conversion between them.Supported standards:NACEATECOGICSISIC (rev4)NAICS (2022)SICSAEQuick startAdd “economy_sectors” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'economy_sectors',
]Runpython manage.py migrateto create the models.Runpython manage.py load_standards_datato populate the database with the initial records.Runpython manage.py load_standards_relationsto populate the database with the relationship between standards.
Package: django-edamame
One idea of Class-based view module.Django Edamame gives you inheritable module to bundle the multiple view functions like django.contrib.admin application.Edamame corresponds to the following problems:Reuse URL pattern.Creating an application with a similar view function set.AuthorShinya OkanoSimple exampleInherits theViewsclass, and implement the method of view function. And implementget_urlsmethod to return the URL pattern.In order to use a views class, it create an instance in the module.from edamame import base

class SiteViews(base.Views):
    def index(self, request):
        """view function
        """
        return render(request, 'index.html')

    def get_urls(self):
        urlpatterns = patterns(
            '',
            url(r'^$', self.wrap_view(self.index), name='index'),
        )
        return urlpatterns

site_views = SiteViews()urlsproperty of views instance, it can be passed toincludefunction inurls.py.from django.conf.urls import patterns, include, url
from note.views import site_views

urlpatterns = patterns('',
    url(r'', include(site_views.urls)),
)Generic view exampleImport theModelViewsclass, and inherits.from django.core.urlresolvers import reverse_lazy
from edamame import generic
from . import models


class NoteViews(generic.ModelViews):
    model = models.Note
    success_url = reverse_lazy('note:index')

note_views = NoteViews()Inurls.py, use theincludefunction.from django.conf.urls import patterns, include, url
from note.views import note_views

urlpatterns = patterns('',
    url(r'note/', include(note_views.urls)),
)Example Projectexampledirectory in the repository is an example project.If you have installed Django and Edamame, can run immediately.$ cd example
$ python manage.py syncdb
$ python manage.py runserverLicenseMIT License
Package: django-edelweiss-data-usermanager
django-edelweiss-data-usermanagerThis is a django appliation to help manage users and user groups for anEdelweissDatainstallation. It provides
an admin dashboard creating and editing entites directly into the EdelweissData database.It is assumed you already have a Edelweiss Data database. The django app will not try to create the
EdelweissData core database tables.Installation into your django projectAdd this app to your installed apps in your settings.py file:INSTALLED_APPS = [
    ....
    'django_edelweiss_data.usermanager',
]You probably want to keep your EdelweissData core tables in a different schema from your django
application files. You might even choose to use a different database. Add a router in your
settings.py file so that django knows to look for the EdelweissData tables in a different location:DATABASE_ROUTERS = ['django_edelweiss_data.usermanager.router.Router']Then configure your DATABASES section withdefaultandedelweiss_datasetssections. In the
following example, all tables are in the edelweiss database. The EdelweissData core tables are in
thedatasetsschema and the django application tables are in thedjangoschema.DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'OPTIONS': {
            'options': '-c search_path=django',
        },
        'NAME': 'edelweiss',
    },
    'edelweiss_datasets': {
        'ENGINE': 'django.db.backends.postgresql',
        'OPTIONS': {
            'options': '-c search_path=datasets',
        },
        'NAME': 'edelweiss',
    }
}Connect to your database and create the django schema:CREATE SCHEMA IF NOT EXISTS django;And then run migrations:python manager.py migrate usermanager
Package: django-edge
THE DJANGO EDGETHIS PACKAGE WOULD HELP TO SHORTEN THE TIME IN CREATING A SIMPLE DJANGO APP USING AUTOMATION.In your link tags.
It would change this element from<link href="css/flaticon.css"  rel="stylesheet"/>to<link href="{% static 'css/flaticon.css' %}"  rel="stylesheet"/>In your script tags.
It would change this element from<script  src="js/main.js"> </script>to<script  src="{% static 'js/main.js' %}"> </script>In your hyperlink tags.
It would change this element from<a href="/plans">Plans</a>to<a href="plans.html">Plans</a>In your image tags.
It would change this element from<img  alt="image"  src="shape/shape16.png"/>to<img  alt="image"  src="{% static 'shape/shape16.png' %}"/>It also automates the creation of the views.py and urls.py
Package: django-edict
# django edict
#### Brandon R. Stoner <monokrome@monokro.me>## What is this?A django application for posting news. This is a fairly decentnews or
bloggingapplication, and easily provides features like comments, markup,
and RSS and ATOM feeds at no cost. However it makes no assumptions regarding
your design, and therefore doesn’t include any WYSIWYG/WYSIWYM editors or
anything like that. You can easily add your own by simply applying it to
<textarea> elements with a ‘text-edit’ class. This application also ties into
the django user authentication system to allow multiple users to post, edit,
and delete news articles on the web site.
Package: django-editor
Django-editorAllows pluggable WYSIWYG editors in django admin without hard dependencies.Currently supported editors (both optional):django-imperavidjango-tinycmeInstallationInstall with pip:pip install django-editor(optional) Addimperaviortinymceto your INSTALLED_APPS insettings.py:INSTALLED_APPS = (
    ...
    # Imperavi (or tinymce) rich text editor is optional
    'imperavi',
)Usageeditorpackage gives you the following replacement classes:django.forms.widgets.Textarea=>editor.EditorWidget(becomesImperaviWidgetorTinyMCE)django.contrib.admin.ModelAdmin=>editor.EditorAdmin(becomesImperaviAdminor stays asModelAdmin)django.contrib.admin.StackedInline=>editor.EditorStackedInline(becomesImperaviStackedInlineor stays asStackedInline)Here are some examples on how to easily turn your Textareas into WYSIWYG editors:# admin.py
from django.db import models
from django.contrib import admin
from editor.admin import EditorAdmin, EditorWidget, EditorStackedInline


class MyInlineAdmin(EditorStackedInline): # StackedInline example
    model = Model1


class MyModel2Admin(EditorAdmin): # ModelAdmin example
    inlines = [MyInlineAdmin]

admin.site.register(Model2, MyModel2Admin)


class MyModel3Admin(admin.ModelAdmin):
    formfield_overrides = {
        models.TextField: {'widget': EditorWidget},
    }

admin.site.register(Model3, MyModel3Admin)Creditsdjango-imperavidjango-tinycmemodern-package-templatedjango-newsletterfor providing pluggable editor code ideaNews0.2a1Release date: UNRELEASEDWorking on more editors. Stay tuned…0.1Release date: 19-Mar-2013Initial releaseSupports django-imperavi and django-tinycme3 admin classes: EditorAdmin, EditorWidget, EditorStackedInlineTest coverage