Saravanan666/pypi-org huggingface dataset:
Package: dj-cref
# dj-crefThe output unit of Django generic view.## DescriptionThis is the Python package whose name is **dj-cref** .**dj-cref** outputs a template of django generic view you wanted.![demo](https://raw.githubusercontent.com/wiki/Canon11/dj-cref/images/djcref.gif)## Features### Output kinds- View- FormView- CreateView- UpdateView- DeleteView- DetailView- TemplateView- ListView- RedirectView## Requirement- Python3## Usage### Arguments* <code>-type [kind of view]</code> : Which type of generic view to output.* <code>--initial</code> : Whether to include import statements.### ExampleCase1```$ dj-cref -type FormViewclass MyFormView(FormView):# template_name = 'my_template.html'# form_class = 'MyForm'# success_url = '/my/success'def dispatch(self, request, *args, **kwargs):super().dispatch(request, *args, **kwargs)# please implement heredef get_context_data(self, **kwargs):context = super().get_context_data(**kwargs)...```Case2```$ dj-cref -type FormView --initialfrom django.views import FormViewclass MyFormView(FormView):# template_name = 'my_template.html'# form_class = 'MyForm'# success_url = '/my/success'def dispatch(self, request, *args, **kwargs):super().dispatch(request, *args, **kwargs)...```## Installation```$ pip install dj-cref```## Author[@Canon11](https://github.com/Canon11/)
Package: dj-crt-mgr
Django Certificate ManagerThisRequirementsPython 3.5+Make sure that an instance of UserCrtMgr is created for every user::class YourAppConfig(AppConfig):
    def ready(self):
        from dj_crt_mgr.signals import create_user_cert_mgr
        post_save.connect(create_user_cert_mgr, sender=settings.AUTH_USER_MODEL)InstallUsing pippip install dj-crt-mgr
Package: dj-currencies
DocumentationThe full documentation is athttps://dj-currencies.readthedocs.io.QuickstartFor Django 2 support, please use version 0.1.2.
Django 3 support added in version 1.0.
Django 4 support from version >=1.1.Install djcurrencies:pip install dj-currenciesAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'dj_currencies',...)SettingsDJANGO_CURRENCIES={'DEFAULT_BACKEND':'djmoney_rates.backends.OpenExchangeBackend','OPENEXCHANGE_APP_ID':'','BASE_CURRENCIES':['USD'],'MAX_CACHE_DAYS':7}DEFAULT_BACKEND: The selected backend to sync exchange ratesOPENEXCHANGE_APP_ID: Must be configured if you useOpenExchangeBackendBASE_CURRENCIES: A list of base currencies to use. At the time of this version, you will only be able to convert currency from any one of the base currency to target currency.MAX_CACHE_DAYS: Only use the cache within this time limit. If exchange rates was not synced within the time frame, an exception will thrownNoteYou will need to have at least “OPENEXCHANGE_APP_ID” configured if you useOpenExchangeBackendFeatures[open exchange rates](openexchangerates.org) integrationExtensible backend design, hook your own exchange rate sourcesMulti base currencies support, no double conversion to lose precisionStore historical exchange ratesoffline currency conversionRunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ python runtests.py
Package: dj-currencies3
.. image::https://travis-ci.org/brightwrite/dj-currencies.svg?branch=master:target:https://travis-ci.org/brightwrite/dj-currenciesDocumentationThe full documentation is athttps://dj-currencies.readthedocs.io.Quickstartversion 1.0.0 supports Django 3+ onlyFor Django 2 support, please use version 0.1.2Install djcurrencies::pip install dj-currenciesAdd it to yourINSTALLED_APPS:.. code-block:: pythonINSTALLED_APPS = (
    ...
    'dj_currencies',
    ...
)Settings.. code-block:: pythonDJANGO_CURRENCIES = {
    'DEFAULT_BACKEND': 'djmoney_rates.backends.OpenExchangeBackend',
    'OPENEXCHANGE_APP_ID': '',
    'BASE_CURRENCIES': ['USD'],
    'MAX_CACHE_DAYS': 7
}DEFAULT_BACKEND: The selected backend to sync exchange ratesOPENEXCHANGE_APP_ID: Must be configured if you useOpenExchangeBackendBASE_CURRENCIES: A list of base currencies to use. At the time of this version, you will only be able to convert currency from any one of the base currency to target currency.MAX_CACHE_DAYS: Only use the cache within this time limit. If exchange rates was not synced within the time frame, an exception will thrown.. NOTE::
You will need to have at least "OPENEXCHANGE_APP_ID" configured if you useOpenExchangeBackendFeaturesopen exchange ratesintegrationExtensible backend design, hook your own exchange rate sourcesMulti base currencies support, no double conversion to lose precisionStore historical exchange ratesoffline currency conversionRunning TestsDoes the code actually work?::source <YOURVIRTUALENV>/bin/activate
(myenv) $ python runtests.pyHistory0.0.1 (2018-04-23)
++++++++++++++++++First release on PyPI.
Package: dj-dajaxice
Original Project :- Django Dajaxice (django-dajaxice)This project is an attempt to make it compatible to Django 1.9+ as original
project is unmaintained.Easy to use AJAX library for django, all the presentation logic resides outside the views and doesn’t require any JS Framework. Dajaxice uses the unobtrusive standard-compliant (W3C) XMLHttpRequest 1.0 object.
Package: djdantic
djdanticA utility library to integrate and use pydantic with the django orm. This package includes optional sentry integration usingsentry-tools.🚧 This project is WIP and is subject to change at any timeThis project is currently in the alpha state, even though it can be used in production with some caution. Make sure to fix the version in your requirements.txt and review changes frequently.Installationpip install djdanticFeaturespydantic to django Data Schema Conversiondjdantic.BaseModelProvidesfrom_ormmethod on pydantic schemadjdantic.FieldProvides a custom implementation of pydantic'sField, used for the custom optionsdjdantic.utils.pydantic_django.transfer_from_ormdjdantic.utils.pydantic_django.transfer_to_ormIfautomatic route generationis used, it is not neccessary to use thetransfer_*methods manually.Options fordjdantic.FieldFor mapping pydantic schemas to django models, it is required to add at least one of the following extra arguments to each field defined in a pydantic schema.Using these options on pydantic'sFieldis also possible but deprecated!orm_field:django.db.models.Field(required)Pointer (reference) to the corresponding model field, e. g.myapp.models.MyModel.idorm_method:Optional[Callable[[Self], Any] | Callable[[Self, Any], None]]Pointer to a orm model method, which is called when the object is loaded from the orm into a pydantic model or written into the orm from a pydantic model, e. g.myapp.models.MyModel.get_calculated_valuescopes:Optional[List[str]]Limit access to specific fields based on jwt token scopes. For read operations, only scopes with the actionreadare taken into account, for write all other scopes are taken into account.is_critical:Optional[bool]Limitwriteaccess to the field based on the presence of thecrtflag in the jwt token.is_sync_matching_field:Optional[bool]Alternative tosync_matchingto define search fields for the matcher on the field itselfsync_matching:Optional[List[Tuple[str, django.db.models.Field]]]Used for performing atransfer_to_ormwith actionTransferAction.SYNCfor included sub-records (in a list), used when noidfield is present on the object. Mapping from pydantic field (dot notation for nested fields can be used) to the corresponding django model field.⚠️ Deprecated in favor ofis_sync_matching_fieldExample for SchemasfromdjdanticimportField,BaseModelfrom...importmodelsclassUser(BaseModel):email:str=Field(orm_field=models.User.email)is_password_usable:bool=Field(orm_method=models.User.has_usable_password)is_superuser:bool=Field(scopes=['access.users.update.any'],is_critical=True,orm_field=models.User.is_superuser)classUserUpdate(User):password:Optional[SecretStr]=Field(orm_method=models.User.set_password,is_critical=True)classOrderUpdate(BaseModel):items:Optional[List['OrderItemUpdate']]=Field(orm_field=models.Order.items,sync_matching=[('product',models.OrderItem.product),],)
Package: dj-dashboard
Django DashboardDocumentationThe full documentation is athttps://dj_dashboard.readthedocs.org.QuickstartInstall dj_dashboard:pip install dj_dashboardThen use it in a project:import dj_dashboardFeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements_test.txt
(myenv) $ python runtests.pyCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2016-09-30)First release on PyPI.
Package: dj-dash-repo
This is package for django site analyticsDocumentationThe full documentation is athttps://dj-dash-repo.readthedocs.io.QuickstartInstall dj-dash:pip install dj-dash-repoAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'dashboard.apps.DashboardConfig',...)Add dj-dash’s URL patterns:fromdashboardimporturlsasdashboard_urlsurlpatterns=[...url(r'^',include(dashboard_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2018-11-18)First release on PyPI.
Package: dj-data-extractor
Utils for extracting data from dicts.DocumentationThe full documentation is athttps://dj-data-extractor.readthedocs.io.QuickstartInstall Data Extractor Utils:pip install dj-data-extractorAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'dataextractor.apps.DataExtractorConfig',...)Add Data Extractor Utils’s URL patterns:fromdataextractorimporturlsasdataextractor_urlsurlpatterns=[...url(r'^',include(dataextractor_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2020-02-11)First release on PyPI.
Package: dj-daterangefilter
Django admin date range filterApplication adds three Django admin list filters:DateRangeFilter,PastDateRangeFilterandFutureDateRangeFilter. These filters let user filter models by date range.PastDateRangeFilterandFutureDateRangeFilteradd quick selection of predefined date ranges. Filters can be applied to any model date fields. Application supports default Django admin theme andSuit theme.RequirementsPython 2.7+ or Python 3.3+Django 1.9+InstallationInstalldj-daterangefilterusing pip:pipinstalldj-daterangefilterAdddaterangefiltertoINSTALLED_APPS. Example:INSTALLED_APPS=(...'daterangefilter',...)Application uses static files so do not forget to issuecollectstaticmanagement command in production environment.Example usagein admin.py:fromdjango.contribimportadminfromdaterangefilter.filtersimportPastDateRangeFilter,FutureDateRangeFilter@admin.register(Post)classPostAdmin(admin.ModelAdmin):list_filter=[('created_at',PastDateRangeFilter),('publish_at',FutureDateRangeFilter)]Advanced usagePredefined ranges can be completely redefined by overriding_past_ranges.htmland_future_ranges.htmltemplates.
Take into account that these templates are inserted in the middle of the javascript code and may contain nothing but ranges
definition. For more examples on usingmomentlibrary refer tolibrary documentation.CreditsFilter widget uses a great JavaScript date range picker component -Date Range Pickerby Dan Grossman.
Package: dj.debug
dj.debugSimple debug utils for Django apps to aid with test-driven development.Install$pipinstalldj.debugFor development install$pipinstall-egit+git@github.com:translate/dj.debug#egg=dj.debug$pipinstalldj.debug[test]Initializing the builtin objectThe utils can be imported directly, but the better way is to use_tracebuiltin
functionality.To activate this call the following, anywhere in your code - eg. in your test settings>>>fromdj.debugimporttrace_debug>>>trace_debug()Once this is done, you will have a_traceobject available anywhere in your environment.>>>_trace<dj.debug.builtin.Traceobjectat...>You can specify the name of the builtin>>>trace_debug("_t")>>>_t<dj.debug.builtin.Traceobjectat...>Using the builtin object has the advantage that it won’t be recognized by linters if you
accidentally leave it in your code.Usage - pdbThe_tobject provides quick access to pdb>>>_t.pdb.set_trace()--Return--><stdin>(1)<module>()->None(Pdb)Usage - trace debuggingIf a line of code that you want to debug is hit many times prior to the point at which you
want to debug it you can use the_tobject’s debug flag>>>defcommonly_hit_code(*args,**kwargs):...if_t.debug:_t.pdb.set_trace()>>>defsome_other_code(*args,**kwargs):...# we only want to debug after this point..._t.debug=True...something_which_triggers_commonly_hit_code()Usage - sql debuggingThis tools is useful for finding non-performant code in Django. By tracing the sql that is
being run in blocks of code, you can find and fix querysets that trigger too many queries,
are too complex, have overly large results, etc. You can also use the output in Django’sdbshellto analyze, improve and add indeces where appropriate.>>>with_t.debug_sql():...trigger_some_orm_action()dj.debug usagedj.debug.debug_sql…todo…
Package: dj-deploy-cli
Django Deploy CLIGenerate your Procfile, runtime.txt and requirements.txt from the CLIClone current version from Githubgit clone https://github.com/LeoMbm/django-deploy-cli.gitInstall dependenciesAssuming you’re in the root of your project directory, then run:pip -r requirements.txtRun the projectin dj-tools-deploy-cli/src/python3 main.pyYou can see if your package has successfully uploaded by navigating
to the URLhttps://pypi.org/project/wheresampleprojectis the name of your project that you uploaded.
It may take a minute or two for your project to appear on the site.LinksGitHub repository
Package: djdg-django-oauth
# django-oauthDescription--------Djdg Django Oauth provides a simple signature middleware verification between appsSupport-------mail to zane.yang@hey900.comRequirements------------* Python 2.7* Django  1.9Installation------------**Install with pip**pip install djdg-django-oauth**Add `djdg_oauth` to your `INSTALLED_APPS`**INSTALLED_APPS = (...'djdg_oauth',)**run migrate to add tables:**python manage.py migrate djdg_oauth**list, add, del app secret:**python manage.py listauthapp {app_name}python manage.py addauthapp {app_name}python manage.py delauthapp {app_name}**add middleware**(**options**,  *you can create yourself middleware with   djdg_oauth.oauthclient.OauthClient.verify_request*):MIDDLEWARE_CLASSES = (...'djdg_oauth.middleware.DjdgAuthMiddleware',)**add settings**(*app secret gaved by others*)DJDG_AUTH = {"APPS": [{"appid": "xxxxxx", "secret": "xxxxxxxxxxxxxxxxxxx", "app": "xxx"},....]"FULL_ESCAPE_URL": [....] # full match url to escape auth check,"REGEX_ESCAPE_URL": [....] # regex match url to escape auth check,"REGEX_CHECK_URL":[...] # need check url, if not empty, escape urls invalid})Documentation--------------**Verify request**from djdg_oauth.oauthclient import OauthClientauth = OauthClient()auth.verify(request)**Do request**from djdg_oauth.oauthclient import OauthClientrequest_data = {"url": #url,"app": #app type,"parameters": #all request data,"method": #request method,"headers": #default None}OauthClient.oauth_request(**request_data)License-------djdg-oauth is released under the terms of the **BSD license**. Full details in ``LICENSE`` file.Changelog---------version 0.0.20debug ascii error
Package: dj_diabetes
Django DiabetesDjango Diabetes is a personal Glucose ManagerIt allows you to follow your daily healthImprovementsAs I’m not suffering from diabetes, I am very open to suggestions for improvement of this project that I designed for a friend.
For example with the type of examinations, etc…
Currently I maintain the project by evolving versions of python and django.Requirements:Python 3.6Django 2arrow 0.12.xInstallation:to get the project, from your virtualenv, do :git clone https://github.com/push-things/dj-diabetes.gitto add the needed modules , do :pipinstall-rrequirements.txtcreate a new user who will be the admin :pythonmanage.pycreatesuperuserand at least :pythonmanage.pymakemigrationsdj_diabetespythonmanage.pymigratedj_diabetespythonmanage.pyloaddatadj_diabetes_preferences.jsonpythonmanage.pycreatesuperuserto startup the database and load the data
Package: dj-DoCodeCarga
dj-DoCodeCarga (Django-App)DoCodeCarga es una aplicacion para generar un layout en Excel en base a un modelo asi mismo permite cargar dicho layout con informacion masivamente.TecnologiaDoCodeDB se implementa con las siguientes librerias previamente instaladas:Django- Python base framework (v2.2)openpyxl- Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files.InstalacionInstalar por medio depip$pipinstalldj-DoCodeCargaEstructura de la AppLa aplicacion tiene una estructura comun de una appDjangoDoCodeCarga/procesosstatictemplatestemplatetagsadmin.pyapps.pymodels.pyurls.pyviews.pyConfiguracion:Agregar la App a "INSTALLED_APPS" dentro de lossettings.pyINSTALLED_APPS=['django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles','DoCodeCarga',]Uso:views.pySe incluye ambos procesosProceso para descargar layoutyProceso para Leer ExcelfromDoCodeCarga.procesosimportlayout# Proceso para descargar Layoutiflayout.verificar(request):returnlayout.descargar(Modelo)# Metodo para cargar Excelresult=layout.cargar(request,model)context={'titulo':titulo,}returnrender(request,'template.html',context)Configuracion de TemplateSe debe incluir el templatelayoutCarga.htmlpara habilitar los botones{%include'layoutCarga.html'%}Actualizacion v1.0.4Se actualiza para poder utlizar la funcion choices dentro de los modelosSe implementa el templatelayoutCarga.htmlLicenciaMIT LicenseCopyright (c) 2020 DoCodePermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: dj-docs
Adddj_docsto theINSTALLED_APPSINSTALLED_APPS=[# ...'dj_docs',]Yoursettings.pyfile should now includedj_docsin theINSTALLED_APPSlist. This will enable the dj_docs app in your Django
project.Configuration forDOC_STRING_MODULESTheDOC_STRING_MODULESsetting in Django’ssettings.pyfile
allows you to define documentation strings for your project’s modules,
classes, and functions.To configureDOC_STRING_MODULES, add the following code to yoursettings.pyfile:DOC_STRING_MODULES=[{"section":"enter title","modules":[{"module_name":"module","class":"module.class","function":"module.function","synopsis":"Description"},]},]Replace"enter title"with the title of the page you want to add,"module"with the name of the module you want to document,"module.class"with the name of the class you want to document,"module.function"with the name of the function you want to
document, and"Description"with the description of the module,
class, or function.You can add as many sections and modules as you need to document your
project.Adding the Documentation URL PathTo access the documentation for this Django app, you’ll need to add a
URL path to yoururls.pyfile that includes thedj_docsapp’s
URLs. Follow these steps:fromdjango.urlsimportinclude# Import the `include` function from Django's `urls` moduleurlpatterns=[# ...path('docs/',include('dj_docs.urls')),# add url for documentation url to django application]
Package: djdt-flamegraph
Get a flame graph of the current request, right in Django.ScreenshotFeaturesUseshttps://github.com/brendangregg/FlameGraphto generate a flamegraph right in the debug panel.InstallAdddjdt_flamegraphto yourrequirements.txt.Adddjdt_flamegraph.FlamegraphPaneltoDEBUG_TOOLBAR_PANELS.Run your server withpython manage.py runserver--nothreading--noreloadNotesValueError at /: signal only works in main thread: Flame graphs can only be generated in a single threaded server.Flame graphs are disabled by default. You’ll have to enable it by clicking the checkbox next to it in the Debug Toolbar.Probably won’t work on Windows.DevelopmentThis panel comes with an example Django app to test with. Just runmake exampleand the server should start running.History0.2.5 (2015-10-11)First release that actually works!0.2.0 (2015-10-10)Beta release.0.1.0 (2015-10-5)First release on PyPI.
Package: djdt-permissions
Permission panel for Django Debug ToolbarA simple DjDT panel displaying the permissions granted to the current user, how the
current user obtained each one of them (directly or through a group
membership), and the resulting consolidated permissions set.Installation (on top of Django Debug Toolbar)First, installdjango-debug-toolbar(instructionshere), then:Install permission panel, either with Pip or Poetry:pip install 'git+https://github.com/baudhuina/djdt-permissions.git@1.0.0#egg=djdt_permissions'or complete your project'spyproject.tomlfile with XXX TO BE COMPLETED and runpoetry installorpoetry update.Adddjdt_permissiontoINSTALLED_APPS, make sure it's belowdjango.toolbar:Please note that just as the Debug Toolbar, this panel is not supposed to be installed if 'DEBUG' is False.if DEBUG == True:
   INSTALLED_APPS += [
    ...
    'debug_toolbar',
    'djdt_permissions',
    ...
   ]Register the new panel by adding pathdjdt_permissions.panels.PermissionsPanelto settingDEBUG_TOOLBAR_PANELS(which is entirely conditional toDEBUG). The
sequence of the panels defines their order in the toolbar.DEBUG_TOOLBAR_PANELS = [
     'djdt_permissions.panels.PermissionsPanel',
     'debug_toolbar.panels.history.HistoryPanel',
     'debug_toolbar.panels.versions.VersionsPanel',
     # ... any other panel.
 ](optional) If you want the panel to be disabled by default, add its full path
in theDEBUG_TOOLBAR_CONFIG[DISABLE_PANELS]set.DEBUG_TOOLBAR_CONFIG = {
    "DISABLE_PANELS":  {
         'djdt_permissions.panels.permissions_panelPermissionsPanel',
         # any other panel to disable
     },
    # other config settings.
]UsageThe Permission Panel is used just as any other panel of the Django Debug Toolbar:Open DJdT overlay;Enable, disable, consult the panel at will...Installing the test projectWould you wish to modify/contribute to this project...NB: The commands below assume that yourDJANGO_SETTINGS_MODULEis not set, and that the settings will be the default value frommanage.py,
i.e.'test_project/settings. If it is set to another value, add a--setings=test_project.settingsoption to allmanage.py` commands.Fork the GIT repo from GitHub. It contains a Django test project.Install dependencies:poetry install.Apply migrations:manage.py migrate.Run server:manage.py runserver.Point your browser athttp://localhost:8000.Running the testsOnce the test project is installed (see above), run the tests without coverage measurement:manage.py testor with coverage measurement (report will be incoverage_html/index.html):coverage run -m manage test [-v2]To run the tests for all supported python and django combinations:toxContact mealain.baudhuin@skynet.be