Saravanan666/pypi-org huggingface dataset:
Package: django-easy-pdf
Django PDF rendering, the easy way.Developed aten.ig.ma software shop.Development VersionNote: A new PDF rendering backend using WeasyPrint for more accurate rendering is in development under the develop branch.
Seehttps://github.com/nigma/django-easy-pdf/pull/34for changes, testing and discussion.If you rely on thexhtml2pdfrendering backend and templates pin the package version todjango-easy-pdf>=0.1.1<0.2.0.OverviewThis app makes rendering PDF files in Django really easy.
It can be used to create invoices, bills and other documents
from simple HTML markup and CSS styles. You can even embed images
and use custom fonts.The library provides both Class-Based View that is almost a drop-in
replacement for Django’sTemplateViewas well as helper functions
to render PDFs in the backend outside the request scope
(i.e. using Celery workers).QuickstartIncludedjango-easy-pdf,xhtml2pdfin yourrequirements.txtfile.
If you are on Python 3 you need to install the latest version of Reportlab and the beta version of xhtml2pdf:$ pip install xhtml2pdf>=0.2b1Addeasy_pdftoINSTALLED_APPS.Create HTML template for PDF document and add a view that will render it:{%extends"easy_pdf/base.html"%}{%blockcontent%}<divid="content"><h1>Hithere!</h1></div>{%endblock%}fromeasy_pdf.viewsimportPDFTemplateViewclassHelloPDFView(PDFTemplateView):template_name='hello.html'You can also use a mixin to output PDF from Django generic views:classPDFUserDetailView(PDFTemplateResponseMixin,DetailView):model=get_user_model()template_name='user_detail.html'DocumentationThe full documentation is atdjango-easy-pdf.readthedocs.io.A live demo is ateasy-pdf.herokuapp.com.
You can run it locally after installing dependencies by runningpython demo.pyscript from the cloned repository or through Docker withmake demo.Dependenciesdjango-easy-pdfdepends on:django>=1.10xhtml2pdf>=0.2b1reportlabLicensedjango-easy-pdfis released under the MIT license.Other ResourcesGitHub repository -https://github.com/nigma/django-easy-pdfPyPi Package site -https://pypi.python.org/pypi/django-easy-pdfDocs -https://django-easy-pdf.readthedocs.io/Commercial SupportThis app and many other help us build better software
and focus on delivering quality projects faster.
We would love to help you with your next project so get in touch
by dropping an email aten@ig.ma.History0.1.1 (2017-04-19)Update for Django 1.11 and Python 30.1.0 (2014-01-24)First release
Package: django-easy-pdf3
Django PDF rendering, the easy way.Developed aten.ig.ma software shop.Development VersionInfo: Add support for Django 4 in 0.1.4 versionNote: This fork support Django>=2.0 with “xhtml2pdf” as rendering backend! Support with WeasyPrint is not tested!
Note: A new PDF rendering backend using WeasyPrint for more accurate rendering is in development under the develop branch.
Seehttps://github.com/nigma/django-easy-pdf/pull/34for changes, testing and discussion.OverviewThis app makes rendering PDF files in Django really easy.
It can be used to create invoices, bills and other documents
from simple HTML markup and CSS styles. You can even embed images
and use custom fonts.The library provides both Class-Based View that is almost a drop-in
replacement for Django’sTemplateViewas well as helper functions
to render PDFs in the backend outside the request scope
(i.e. using Celery workers).QuickstartInstall django-easy-pdf3 package:$ pip install django-easy-pdf3or adddjango-easy-pdf3to your requirements.txtAddeasy_pdftoINSTALLED_APPS.Create HTML template for PDF document and add a view that will render it:{%extends"easy_pdf/base.html"%}{%blockcontent%}<divid="content"><h1>Hithere!</h1></div>{%endblock%}fromeasy_pdf.viewsimportPDFTemplateViewclassHelloPDFView(PDFTemplateView):template_name='hello.html'You can also use a mixin to output PDF from Django generic views:classPDFUserDetailView(PDFTemplateResponseMixin,DetailView):model=get_user_model()template_name='user_detail.html'DocumentationThe full documentation is atdjango-easy-pdf.readthedocs.io.A live demo is ateasy-pdf.herokuapp.com.
You can run it locally after installing dependencies by runningpython demo.pyscript from the cloned repository or through Docker withmake demo.Dependenciesdjango-easy-pdf3depends on:django>=2.0xhtml2pdf>=0.2b1reportlabLicensedjango-easy-pdf3is released under the MIT license.Other ResourcesGitHub repository -https://github.com/olksndrdevhub/django-easy-pdf3PyPi Package site -https://pypi.python.org/pypi/django-easy-pdf3Docs -https://django-easy-pdf.readthedocs.io/Bug Tracker -https://github.com/olksndrdevhub/django-easy-pdf3/issuesCommercial SupportThis app and many other help us build better software
and focus on delivering quality projects faster.
We would love to help you with your next project so get in touch
by dropping an email aten@ig.ma.History0.1.4 (2021-01-30)Add Django 4 support0.1.2 (2021-01-30)Update for Django >= 2.0 <= 3.10.1.1 (2017-04-19)Update for Django 1.11 and Python 30.1.0 (2014-01-24)First release
Package: django-easypush
Push messages with different backends for the Django framework.Version1.1.3WebDownloadhttp://pypi.python.org/pypi/django-easypushSourcehttps://github.com/luojidr/django-easypushKeywordsdjango, push message, ding_talk, qy_weixinAboutThe purpose of developing this package is to simplify the push of
Dingding, enterprise wechat messagesInstallationYou can install django-easypush either via the Python Package Index
(PyPI) or from source.To install usingpip:$ pip install -U django-easypushand then add it to your installed apps:INSTALLED_APPS = [
    ...,
    'easypush',
    ...,
]

EASYPUSH = {
    "default": {
        "BACKEND": 'easypush.backends.ding_talk.DingTalkClient',
        "CORP_ID": 'dingfdjrriexckcuirjskd',
        "AGENT_ID": 100002834,
        "APP_KEY": 'dgfrhfyewuiry347jdshckjdsh',
        "APP_SECRET": 'd8QkPEi9YqQl8W9cv_se_Cre417ZwHEXehdteifncyyw5hdJdMRUkzZQ96D4Yvycv3'),
    },
    ...,
}
EASYPUSH_CELERY_APP = "easypush_demo.celery_app:celery_app"  # auto to send message by asyncfrom easypush import easypush

    easypush.async_send(
        msgtype='oa',
        body_kwargs=dict(
            title="Monitor for tasks",
            media_id='@lADPDetfc4cWS5HNAZDNAlg',
            content="Push messages with different backends for the Django framework. Monitor test for dingding, qy_weixin, SMS, feishu or mail.",
            message_url='https://github.com/luojidr/django-easypush',
            pc_message_url='https://github.com/luojidr/django-easypush',
            forms=[
                dict(key="Author: ", value="luojidr"),
                dict(key="Type:    ", value="Dingding, SMS, Mail, QyWeixin, Feishu"),
                dict(key="Github: ", value="https://github.com/luojidr/django-easypush"),
            ],
    ),
    userid_list=['manager8174']
    )Demo like:Downloading and installing from sourceDownload the latest version of django-easypush fromhttp://pypi.python.org/pypi/django-easypushYou can install it by doing the following,:$ tar xvfz django-easypush-0.0.0.tar.gz
$ cd django-easypush-0.0.0
$ python setup.py build
# python setup.py installThe last command must be executed as a privileged user if you are not
currently using a virtualenv.
Package: django-easyregistration
Django-easyregistration=======================**The easy way to manage frontend users auth and registration in Django**Django-easyregistration is a simple Django app to manage frontend users login/logout and registration process, build with class based views and Twitter Bootstrap.Screenshots-----------.. image:: http://hcosta.info/site_media/uploads/portfolio/2013-12-django-easyregistration/screen1.png:align: center.. image:: http://hcosta.info/site_media/uploads/portfolio/2013-12-django-easyregistration/screen2.png:align: centerRequirements-----------* Django 1.5/1.6Changes-----------* Django-easyregistration 0.1beta (December 31th, 2013): Spanish localization added.Quick start-----------1. Install it with pip in your env::$ pip install django-easyregistration2. Add "registration" to your INSTALLED_APPS setting like this::.. code-block:: pythonINSTALLED_APPS = (...'registration',)3. Include the registration URLconf in your project urls.py like this::.. code-block:: pythonurl(r'^accounts/', include('registration.urls')),4. Configure manually your preferred URLS in 'registration/config.py' file.5. Start the development server and visit http://127.0.0.1:8000/accounts/login/ or create an account at http://127.0.0.1:8000/accounts/register/.
Package: django-easy-reports
NoteThis project is under heavy development, do not use in productiondjango-easy-reports is a reports engine for Django applications. The purpose of the project is to provide
a flexible report engine where the end user is free to customize parts of the reports.Quick Demo InstallationmakedemoLinksProject home page:https://github.com/saxix/django-easy-reportsIssue tracker:https://github.com/saxix/django-easy-reports/issues?sortDownload:http://pypi.python.org/pypi/django-easy-reports/Docs:http://readthedocs.org/docs/django-easy-reports/en/latest/
Package: django-easy-scoping
Django Easy Scoping allows you to register scopes and aggregate functions on
your Django models.InstallationTo get theScopingMixin.pyfile you can download it or use pip.Downloading FileDownload the ScopingMixin file from github.ScopingMixin.pyImportScopingMixinandScopingQuerySetfromScopingMixin.py.from<pathtofile>.ScopingMixinimportScopingMixin,ScopingQuerySetUsing pip$ pip install django-easy-scopingImportScopingMixinandScopingQuerySetfromScopingMixin.py.fromDjangoEasyScoping.ScopingMixinimportScopingMixin,ScopingQuerySetImplementingMixScopingMixinin with the Django model(s) you'd like to create scopes for.classPurchase(ScopingMixin,models.Model):Override the Queryset for that model usingScopingQuerySet.objects=ScopingQuerySet.as_manager()Done!Implementing with existing Managers/QuerysetsIf you'd like to continue using your own custom manager/queryset then you can!
You only need to take action if you'd like to name the ScopingQuerySet override
something other thanobjects, for instance:other_name=ScopingQuerySet.as_manager()Then simply openScopingMixin.pyin yoursites-packagesand edit the following
methods.classScopingMixin(object):@classmethoddefget_scope(cls,name)ifhasattr(cls,'__scopes__')andnameincls.scopes():returngetattr(cls.objects.all(),name)@classmethoddefget_aggregate(cls,name)ifhasattr(cls,'__aggregate__')andnameincls.aggregates():returngetattr(cls.objects.all(),name)becomesclassScopingMixin(object):@classmethoddefget_scope(cls,name)ifhasattr(cls,'__scopes__')andnameincls.scopes():returngetattr(cls.other_name.all(),name)@classmethoddefget_aggregate(cls,name)ifhasattr(cls,'__aggregate__')andnameincls.aggregates():returngetattr(cls.other_name.all(),name)
Package: django-easy-select2
This is django application that brings select2 widget to select inputs
in admin.Project aims to support Python 3.7+ and Django 2.2+.ForDjango < 2.0version support orpython-2.xcompatibility, please use version1.3.4which is
the last version to supportpython-2.xcompatibility.ForDjango 2.0/2.1version support orPython 3.5/3.6compatibility, please use version1.5.7which is
the last version to supportDjango 2.0/2.1andPython 3.5/3.6compatibility.This django library is just a lightweight wrapper onSelect2library
and provides easy-to-use basic select2 functionality in a django project.
If you need feature-rich solution, i recommend you to look at the latestdjango-select2library, which have ajax loading support.If anyone really wants this functionality in django-easy-select2,
please feel free to contribute.Currently project is not in active development state and
is maintained by community. Pull requests are welcomed!Upgrade notesFor details please readchangelog.How it looksSelect one of existing values with single-valued choice field
(ForeignKeyField, for example):Easily select 1 or more “categories” for your project, you can also
add a new one in the normal, Django-Admin manner by using the
green + button with multiple-valued choice field (ManyToManyField):QuickstartIn your admin.py:fromdjango.contribimportadminfromeasy_select2importselect2_modelformfrompolls.modelsimportPollPollForm=select2_modelform(Poll,attrs={'width':'250px'})classPollAdmin(admin.ModelAdmin):form=PollFormThats all. All your choice widgets are select2 widgets 250px wide.DocumentationYou can read more in thedocumentation.
Package: django-easy-seo
django-easy-seo===============SEO fields for objects of any model registered in admin.Maintained by `Basil Shubin <https://github.com/bashu>`_,  and some great`contributors <https://github.com/bashu/django-easy-seo/contributors>`_... image:: https://img.shields.io/pypi/v/django-easy-seo.svg:target: https://pypi.python.org/pypi/django-easy-seo/.. image:: https://img.shields.io/pypi/dm/django-easy-seo.svg:target: https://pypi.python.org/pypi/django-easy-seo/.. image:: https://img.shields.io/github/license/bashu/django-easy-seo.svg:target: https://pypi.python.org/pypi/django-easy-seo/.. raw:: html<p align="center"><img src="https://raw.githubusercontent.com/bashu/django-easy-seo/develop/logo/sizes%20500x300/color.png" alt="django-easy-seo"></p>Setup-----Either clone this repository into your project, or install with ``pip install django-easy-seo``You'll need to add ``seo`` as a **LAST** item to ``INSTALLED_APPS`` in your project's ``settings.py`` file :.. code-block:: pythonINSTALLED_APPS = (...'seo',  # must be last in a list)Then run ``./manage.py syncdb`` to create the required database tablesConfiguration-------------There is only one mandatory configuration option you need to set in your ``settings.py`` :.. code-block:: python# Override / extend ModelAdmin classes for a given ModelsSEO_FOR_MODELS = ['<app_name>.models.<ModelName>',]Usage-----First of all, load the ``seo_tags`` in every template where you want to use it :.. code-block:: html+django{% load seo_tags %}Use :.. code-block:: html+django{% seo '<title|keywords|description>' for object %}or :.. code-block:: html+django{% seo '<title|keywords|description>' for object as variable %}{{ variable }}Please see ``example`` application. This application is used to manually test the functionalities of this package. This also serves as a good example.You need only Django 1.4 or above to run that. It might run on older versions but that is not tested.
Package: django-easysettings
django-easysettingsEasy app-specific settings for Django apps.Provides a method for using a declarative class for an app’s default settings.
The instance of this class can be used to access all project settings in place
ofdjango.conf.settings.InstallationUsageDictionariesLegacy UsageInstallationTo install, run:pip installdjango-easysettingsUsageCreate aconf.pyfile within your app’s directory, adding attributes for
the default values of your app-specific settings. They will be overridden by
any project setting that is provided.For example:fromeasysettings.appimportAppSettingsclassSettings(AppSettings):MYAPP_FRUIT='Apple'settings=Settings()Then in your app, rather thanfrom django.conf import settings, usefrom myapp.conf import settings. For example:frommyapp.confimportsettingsdefdashboard(request):context={}context['fruit']=settings.MYAPP_FRUITifsettings.DEBUG:context['debug_mode']=True# ...DictionariesA common pattern is to use a dictionary as a namespace for all an app’s
settings, such assettings.MYAPP['settings'].Easy-settings handles this fine, overriding any keys provided in the project
while still having access to the default app settings keys.You can also use a subclass of anAppSettingsclass to set up a dictionary.fromeasysettings.appsimportAppSettingsclassMyAppSettings(AppSettings):"""
    MyApp settings
    """#: Preferred fruitFRUIT='Apple'#: Preferred drinkDRINK='Water'classSettings(AppSettings):MYAPP=MyAppSettingssettings=Settings()Legacy UsageIf previously your app used a common prefix (likeMYAPP_) you
can still support projects that still use these stand-alone legacy settings
while moving to aMYAPPdictionary for your settings.fromeasysettings.legacyimportLegacyAppSettingsclassSettings(LegacyAppSettings):MYAPP={'FRUIT':'Apple'}settings=Settings()If a project uses settings likeMYAPP_FRUIT = 'Banana'they will continue
to work. As soon as a project switches toMYAPP, anyMYAPP_*settings
will be ignored.While the legacy app settings class is used, the dictionary settings can still
be accessed via the prefixed setting (for example,settings.MYAPP_FRUIT).Change Log2.0.1 (10 August 2019)Add Python 3.7 and Django 2.2 to the test matrix.2.0 (24 April 2018)Full rework of project! Import is nowfrom easysettings.app import AppSettings(but left importable fromeasysettingsfor better backwards compatibility).Removed isolated settings functionality, unnecessary with a separate settings
module for tests and/or use of theTestCase.settings()context manager.Addedeasysettings.legacy.LegacyAppSettingsfor providing backwards
compatibility for prefixed project settings when moving settings to a
dictionary rather than individual settings with the same prefix.1.1 (4 April 2017)Django 1.11 compatibility.1.0.1 (24 May 2012)Included extra source files.1.0 (16 April 2012)Initial release.
Package: django-easy-subscription
A Django application that provides a subscription pop-up form, and can be integrated with multiple email marketing platforms.InstallationInstallationpip installdjango-easy-subscriptionAddeasy_subscriptiontoINSTALLED_APPSRunpython manage.py migrateto create the subscriber model.Add an URL entry to your project’surls.py, for example:from django.conf import settings

if 'easy_subcription' in settings.INSTALLED_APPS:
    urlpatterns += [
        path('easy-subscription/', include('easy_subscription.urls')),
    ]Note: you can use whatever you wish as the URL prefix.
Package: django-easy-test
A unit test framework for Django that will make your unit tests as easy
as it should beWhat is Easy Test?Easy Test is an extension of Djangoâ€™s test framework for the purpose of
providing premade configurable test cases, avoiding code replication and
increasing test coverage in the project.How to install?Download the module using pip:pip install django-easy-testThen add it to your INSTALLED_APPS on your settings.py:INSTALLED_APPS = (#...'easy_test',
)How to use?To use it simply extend the wanted test case configuring it with a meta
class:class MyTest(FormTest):
    class Meta:
        obj = Person(
            name='John Doe',
        )
        url = 'my_url'
)You can also check our example projectEasy Test Examplecontainning
functional samples for each test case comparing theconventional testwith Easy Test. Please find an example below:A conventional form testclass TaskNewGet(TestCase):
    def setUp(self):
        self.response = self.client.get(resolve_url('task_new'))

    def test_html(self):
        tags = (
            ('<form',1),
            ('<input', 3),
            ('<textarea', 1),
            ('type="text"', 1),
            ('type="submit"', 1),
        )

        for text, count in tags:
            with self.subTest():
                self.assertContains(self.response, text, count)

    def test_csrf(self):
        self.assertContains(self.response, 'csrfmiddlewaretoken')

    def test_has_form(self):
        form = self.response.context['form']
        self.assertIsInstance(form,TaskForm)


class TaskNewPostValid(TestCase):
    def setUp(self):
        data = dict(name='Easy Test', description='')
        self.response = self.client.post(resolve_url('task_new'), data)

    def test_save_subscription(self):
        self.assertTrue(Task.objects.exists())


class TaskNewPostInvalid(TestCase):
    def setUp(self):
        self.response = self.client.post(resolve_url('task_new'),{})

    def test_post(self):
        self.assertEqual(200,self.response.status_code)

    def test_template(self):
        self.assertTemplateUsed(self.response, "core/task_form.html")

    def test_has_form(self):
        form = self.response.context['form']
        self.assertIsInstance(form,TaskForm)

    def test_has_erros(self):
        form = self.response.context['form']
        self.assertTrue(form.errors)

    def test_not_save_subscription(self):
        self.assertFalse(Task.objects.exists())Same test using Easy Testclass TaskFormEasyTest(FormTest):
    class Meta:
        obj = Task(
            name='Easy Test',
            description='A unit test framework for Django that will make your unit tests as easy as it should be.'
        )
        url = 'task_new'
        template = 'core/task_form.html'
        contents = [
            ('<form',1),
            ('<input', 3),
            ('<textarea', 1),
            ('type="text"', 1),
            ('type="submit"', 1)
        ]
        form = TaskForm
Package: django-easy-thumbnails-colorprofile
put easy_thumbnails_watermark in INSTALLED_APPSINSTALLED_APPS = (
    'easy_thumbnails_colorprofile',
)add the preprocesor in your settingsfrom easy_thumbnails.conf import Settings as easy_thumbnails_defaults

THUMBNAIL_PROCESSORS = easy_thumbnails_defaults.THUMBNAIL_PROCESSORS + (
    'easy_thumbnails_colorprofile.thumbnail_processors.colorprofile_processor',
)
Package: django-easy-timezones
Timezones. Yuck.django-easy-timezonesEasy IP-based timezones for Django (>=1.7) based on MaxMind GeoIP, with
IPv6 support.Quick startInstall django-easy-timezonespipinstalldjango-easy-timezonesAdd “easy-timezones” to your INSTALLED_APPS setting like this:INSTALLED_APPS=(...'easy_timezones',)Add EasyTimezoneMiddleware to your MIDDLEWARE_CLASSESMIDDLEWARE_CLASSES=(...'easy_timezones.middleware.EasyTimezoneMiddleware',)(Optionally) Add a path to theMaxMind GeoIP cities
databases(direct
linkbecause I’m nice) in your settings file:GEOIP_DATABASE='/path/to/your/geoip/database/GeoLiteCity.dat'GEOIPV6_DATABASE='/path/to/your/geoip/database/GeoLiteCityv6.dat'Enable localtime in your templates.{%loadtz%}TheUTCtimeis{{object.date}}{%localtimeon%}Thelocaltimeis{{object.date}}{%endlocaltime%}Twist one up, cause you’re done, homie!SignalsYou can also use signals to perform actions based on the timezone
detection.To hook into the Timezone detection event to, say, save it to the
request’s user somewhere more permanent than a session, do something
like this:fromeasy_timezones.signalsimportdetected_timezone@receiver(detected_timezone,sender=MyUserModel)defprocess_timezone(sender,instance,timezone,**kwargs):ifinstance.timezone!=timezone:instance.timezone=timezoneinstance.save()
Package: django-easy-timezones-redux
django-easy-timezones-reduxEasy IP-based timezones for Django (>=1.11) based on MaxMind GeoIP, with IPv6 support.
Updated fork ofdjango-easy-timezonesthat uses the new version of MaxMind's GeoIP2 database.Quick startInstall django-easy-timezones-reduxpipinstalldjango-easy-timezones-reduxAdd "easy-timezones" to your INSTALLED_APPS setting like this:INSTALLED_APPS=(...'easy_timezones',)Add EasyTimezoneMiddleware to your MIDDLEWAREMIDDLEWARE=(...'easy_timezones.middleware.EasyTimezoneMiddleware',)Add a path to theMaxMind GeoLite2 cities databasesin your settings file:GEOIP2_DATABASE='/path/to/your/geoip/database/GeoLite2-City.mmdb'Enable localtime in your templates.{%loadtz%}TheUTCtimeis{{object.date}}{%localtimeon%}Thelocaltimeis{{object.date}}{%endlocaltime%}That's it!SignalsYou can also use signals to perform actions based on the timezone detection.To hook into the Timezone detection event to, say, save it to the request's user somewhere more permanent than a session, do something like this:fromeasy_timezones.signalsimportdetected_timezone@receiver(detected_timezone,sender=MyUserModel)defprocess_timezone(sender,instance,timezone,**kwargs):ifinstance.timezone!=timezone:instance.timezone=timezoneinstance.save()