Saravanan666/pypi-org huggingface dataset:
Package: django-product-review
django-product-reviewDjango-review is a Django app that helps add and display reviews.Quick startInstall the needed packages``pip install django-product-review django_htmx mptt``Add "review" to your INSTALLED_APPS setting like thisINSTALLED_APPS = [
     ...
     'review',
     'django_htmx',
     'widget_tweaks',
 ]ANDMIDDLEWARE = [
     ...
     'django_htmx.middleware.HtmxMiddleware',
 ]REVIEW_PRODUCT_MODELSpecify the model to apply review e.gREVIEW_PRODUCT_MODEL="inventory.Product"Include the review URLconf in your project urls.py like thispath('review/', include("review.urls", namespace="review")),In your product detail view, pass the product to the template asproduct.Add{% load django_review %}to the top of your product detail templateIn the product detail template add<div id="django-review">
   {% reviews product %}
 </div>to the your desired position for reviewRunpython manage.py migrateto create the review models.Visit a product detail to add a review.
Package: django-proemail-template
A few months ago, I ran into this posthttps://blog.anvileight.com/posts/django-email-templates-with-context-stored-in-database/and decided to make it into a lib after using it on one of my projectsQuick startAdd it to your Environment using:pip install django-proemail-template django-summernoteAdd “django-email-template” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'django_summernote'#required
    'EmailTemplate',
]Runpython manage.py migrateto create the polls models.add url for summernote:path('summernote/', include('django_summernote.urls')),You should see it under adminHow to use itCreate a new template on admin called default, setting the required info. Use “object” as the context to access the variables (like on a view).And send it from any code:EmailTemplate.send('default', {
    'object': your_model_instance,
})
Package: django-profanity-check
django-profanity-checkA Django template filter that wraps aroundprofanity-check.Note:numpy,scipy, andscikit-learnare all dependencies ofprofanity-check.UsageInstall withpip.pip install django-profanity-checkAddprofanityto yourINSTALLED_APPS.# settings.pyINSTALLED_APPS=[...,'profanity',...]Use it in a template!{# ... #}

{% load profanity %}

{# ... #}

{% with sentence='Hey, fuck you!' %}
   {{ sentence | censor }} {# Will result in: 'Hey, **** you!' #}
{% endwith %}TodoAllow custom replacement charactersAllow custom replacement character lengthTemplate testsCreditsVictor Zhou'sprofanity-checkPython package does all the heavy lifting.Inspired bydjango-profanity-filter.
Package: django-profile-panel
Django Debug Profile Toolbar============================Add a Profile panel to the Django Debug Tool. Disabled by default, requiresa querystring paramater to enable.This is mainly a re-packaging of dmishe's commits from here:https://github.com/dmishe/django-debug-toolbarTo Install-------* Install and configure Django Debug Toolbar.* pip install django-profile-panel* Add panel_panel app to your INSTALLED_APPS.* Add profile_panel.panel.ProfileDebugPanel to DEBUG_TOOLBAR_PANELS.* Make any request with ?profile
Package: django-profiler-middleware
This piece of middleware enables you to see the profiler output for any URL by
adding a parameter to it. It then lets you reorder the profiler output without
having to recalculate.Installation$ pip install django-profiler-middlewareThen adddjango_profiler.middleware.ProfilerMiddlewareto the end of yourMIDDLEWARE_CLASSES, and then add__prof__to your URL.
Package: django-profiles2
This is a more maintained fork of James Bennet’s django-profiles with Django 1.7 support.You can install it viapipusing:$ pip install django-profiles2Django user profilesThis is a fairly simple user-profile management application forDjango, designed to make the management of site-specific user
profiles as painless as possible. It requires a functional
installation of Django 1.0 or newer and provides a useful complement
todjango-registration, but has no other dependencies.For installation instructions, see the file “INSTALL.txt” in this
directory; for instructions on how to use this application, and on
what it provides, see the file “overview.txt” in the “docs/”
directory.
Package: django-profiletools
FeaturesLazy loading of your authenticatedprofilerecord across therequestobject lifetime. That means in the Python code and the templates.Name your profile model anything you want insettings.AUTH_PROFILE_MODULE.InstallationGet the code:pip install django-profiletoolsInstall the middleware and context_processor in your settings.py:TEMPLATE_CONTEXT_PROCESSORS = (
    ...
    'profiletools.context_processors.fetch_profile',
)

MIDDLEWARE_CLASSES = (
...
'profiletools.middleware.LazyProfileMiddleware',
)Also in settings.py, set the AUTH_PROFILE_MODULE to your profile model:AUTH_PROFILE_MODULE = "profiles.Profile"Based on that, your profile model should resemble something like:# profiles.models.Profile.py
from django.contrib.auth.models import User
from django.db import models

class Profile(models.Model):

    user = models.OneToOneField(User)

    def __unicode__(self):
        return self.user.usernamenote:If you don’t useprofiles.models.Profile, saymembers.models.UserProfilego ahead and change theAUTH_PROFILE_MODULEto “members.UserProfile”.Basic UsageIn your templates:{{ request.my_profile }}In your functional views:profile = request.my_profileIn your class-based views:profile = self.request.my_profileCall my_profile as many times as you want, it only loads once. So if you call it 100 times in a view, theSQL SELECTis only done the first time.  If no user is found then the my_profile call result isNone, which makes it easier to handle templates which need to be able to handle unauthenticated users (like theaboutpage).note:If you are using themembers.UserProfileexample, you’ll need to call that by usingrequest.my_userprofile.Problems with Python’s “is” evaluation and “type” built-inIf you use theisevaluation before doing anything else with the my_profile object, it will behave in a slightly unexpected manner:Thewill always return false. For example:>>> print(request.my_profile is None)
False
>>> p = request.user.get_profile()
>>> print(request.my_profile is p)
FalseAlso, thetypebuilt-in will return adjango.utils.functional.SimpleLazyObjectobject:>>> print(type)
<class 'django.utils.functional.SimpleLazyObject'>Keep in mind what is placed in themy_profilevalue is not aModelClassinstance orNoneobject, but rather adjango.utils.functional.SimpleLazyObject.How to evaluate the my_profile objectUse==to evaluate the my_profile object. This forces the object to be evaluated
and won’t return frustrating false-positives.InspirationThe lazy loading of profiles was inspired by the rather incredible Noah Kantrowitz.
Package: django-profiling
django-profilingDjango Profiling Middleware with Admin integration.UsageInstall into your Django Python environment using your favorite tool.
Adddprofilingto your list of installed Django applications. Adddprofiling.middleware.ProfileRequestMiddlewareto the top of you
middleware list. You can place it lower in the stack of middleware if
you do not want to profile your middleware in addition to the view.Revision History0.1 (2013/05/16)Session admin integrationDatabase backend for storing profilesRendering merged profiles (stats) for a session integrated into admin site
Package: django-profiling-dashboard
django-profiling-dashboard provides a dashboard with various profiling tools suitable
for use in live servers.Requirementsyappifor thread-aware live server profiling
that can be enabled and disabled at run time;Pymplerfor memory debugging;psutilfor system resource usage investigation;django-query-exchange.Dashboard remplates are based onBootstraptoolkit.django-profiling-dashboard requires django >= 1.5 and python >= 2.6.InstallationMake sure the requirements are installed:pip install yappi pympler psutil
pip install git+https://github.com/daevaorn/django-query-exchange.git#egg=django-query-exchangeand install django-profiling-dashboard using pip:pip install django-profiling-dashboardUsageAdd'profiling_dashboard'and'query_exchange'toINSTALLED_APPS:INSTALLED_APPS = (
    # ...
    'query_exchange',
    'profiling_dashboard',
    # ...
)include ‘profiling_dashboard.urls’ in your urls.py:urlpatterns = patterns('',
    # ...
    url(r'^profiling-dashboard/', include('profiling_dashboard.urls')),
    # ...
)visit /profiling-dashboard/ScreenshotsTODONotes on CPU profiling in multi-process environmentIf there are several server processes then the profiler have to be started and stopped for each process,
and the profiling stats will be different for different processes.In some deployment schemas (e.g. apache proxied by nginx) there is no way to make sure subsequent requests
will be handled by the same server process so take this in account while using django-profiling-dashboard.
Package: django-profiling-dashboard-fc
django-profiling-dashboard provides a dashboard with various profiling tools suitable
for use in live servers.Requirementsyappifor thread-aware live server profiling
that can be enabled and disabled at run time;Pymplerfor memory debugging;psutilfor system resource usage investigation;django-query-exchange.Dashboard remplates are based onBootstraptoolkit.django-profiling-dashboard requires django >= 1.3 and python >= 2.6.InstallationMake sure the requirements are installed:pip install yappi pympler psutil
pip install git+https://github.com/daevaorn/django-query-exchange.git#egg=django-query-exchangeand install django-profiling-dashboard using pip:pip install django-profiling-dashboardUsageAdd'profiling_dashboard'and'query_exchange'toINSTALLED_APPS:INSTALLED_APPS = (
    # ...
    'query_exchange',
    'profiling_dashboard',
    # ...
)include ‘profiling_dashboard.urls’ in your urls.py:urlpatterns = patterns('',
    # ...
    url(r'^profiling-dashboard/', include('profiling_dashboard.urls')),
    # ...
)visit /profiling-dashboard/ScreenshotsTODONotes on CPU profiling in multi-process environmentIf there are several server processes then the profiler have to be started and stopped for each process,
and the profiling stats will be different for different processes.In some deployment schemas (e.g. apache proxied by nginx) there is no way to make sure subsequent requests
will be handled by the same server process so take this in account while using django-profiling-dashboard.
Package: django-progress
django-progress===============A small Django App for monitoring the progress of various operations using a small and handy API.Example:```pythonfrom djprogress import with_progressfor item in with_progress(list_of_items, name='My hardcore processing action'):# heavy processing action with item# You can optionally nest multiple with_progress constructs if you want:for subitem in with_progress(list_of_subitems, name='Subprocessing of item'):# more heavy processing action with subitem```There is a view included where you can get an overview of all running processes and their estimated time of completion.It makes use of admin media which means that this page works out of the box. Here is an example:![django-progress overview page](https://github.com/citylive/django-progress/raw/master/django_progress.png)
Package: django-progressive
django-pwaLibrary for adding progressive web app functionality in your django project.Table of contentIntroductionInstallingConfigurationUsageLinksIntroductionThis Django library addsprogressive web appfunctionality in your django project.When you open your site from your mobile browser, will prompt you to add the site to your home screen as an application.Installingpip install django-progressiveConfigurationAdd django-progressivedjango_pwato your installed appsINSTALLED_APPSin djangosettings.pyINSTALLED_APPS=['...','django_pwa''...']DefineSTATICFILES_DIRSInsettings.pyusing the prefix PWA_ and the keys fromthe web app manifestall in capital you can configure the pwa manifest.PWA_NAME='test app'PWA_SHORT_NAME='test_app'PWA_ICONS=[{"src":"/static/icons/icon-128x128.png","sizes":"128x128","type":"image/png"},{"src":"/static/icons/icon-144x144.png","sizes":"144x144","type":"image/png"},{"src":"/static/icons/icon-152x152.png","sizes":"152x152","type":"image/png"},{"src":"/static/icons/icon-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/static/icons/icon-256x256.png","sizes":"256x256","type":"image/png"},{"src":"/static/icons/icon-512x512.png","sizes":"512x512","type":"image/png"}]You can change the default worker location withPWA_WORKER_LOCATION.PWA_WORKER_LOCATION=join('static','django_pwa_demo','service-worker.js')UsageAdddjango_pwaurls to yoururls.pyfromdjango.urlsimportpath,includeurlpatterns=['...',path('',include('django_pwa.urls')),'...']You can add{% load pwa_extras %}to use{% load_manifest %}template tag to load themanifest.jsonand{% load_worker %}to load theworker-app.js.{% load pwa_extras %}<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>PWA Test</title>{% load_manifest %}</head><body><h1>Hello world!!!</h1>{% load_worker %}</body></html>LinksProgressive Web AppsWikipediaWPA Manifest
Package: django-project-base
Django project baseA collection of functionalities that are common to most projects we do.account managementproject managementnotifications (both to users and to apps)taggingbackground job processingroles & permissionsprofilingThis project is in VERY early development stage. Some of the functionalities are not even developed yet, some need
major rework, but some, surprisingly, should work pretty well already. An example of pretty well functioning ones is
account management.Example projectFor running example django project prepare python environment and run (run in repository root):$pipinstall-rrequirements.txt
$pythonmanage.pyrunserverDocumentationRun command in repository root:$npmrundocs:devThe dev server should be running athttp://localhost:5173. Visit the URL in your browser to read documentation!To generate pdf file. Run:$npmrunexport-pdfPdf file is located in docs/pdf folder.
Package: django-project-checks
# Django Project CheckDjango management command for monitoring file diffs.## BackgroundWith a large codebase, and a high velocity team making edits, it can bedifficult to keep track of how the codebase is changing over time. Aclassic issue is people creating new modules / classes in unexpectedplaces, or ending up with a set of functions that should be in the sameplace but are spread across multiple locations (often resulting in`import` issues). In order to address this we build a small script toparse the codebase and dump out a complete listing of all modules,classes and functions. We commit this to the repo, and then run a CIcheck to ensure that it's up to date. The net result is that each PR hasat least one file update which lists which functions have been edited,and where. It's like a live update to the index.This pattern - dump a text output and add a CI check to enforce itscorrectness - turns out to be a really useful pattern for keepingcontrol of the codebase, and so we started adding new checks:- Python functions- Django URLs- GraphQL schema- FSM interactionsThe original function check is a python script (using `ast`) and has norequirement for the Django scaffolding, but the others do, and so theyrun as management commands, which are then wrapped with a `git diff`script:```yaml- name: Run freeze_django_urls and check for any uncommitted diffrun: |python manage.py freeze_django_urlsgit diff --exit-code 'django_urls.txt'```This project wraps this pattern into a base management command that canbe subclassed for any such requirement. All you need to do is provide afunction that returns the contents to be written to the file.
Package: django-project-goblin
OverviewProject Goblin was created to list and manage projects. Note that the projects
are not stored, but only listed. This is useful if you want to showcase
projects on your blog, come out with new announcements, etc.InstallationThe easiest way is to use PIP:pip install django-project-goblinAdd'goblin'to the list of installed apps.INSTALLED_APPS = (
    # ...
    'goblin',
    #...
)ModelsOnce installed, you’ll have access to Project Goblin’s models:ProjectA project is a software project and can contain many releases. The main
attributes for a software project are (self-explainator):namedescriptionREADME (a longer description)homepage (URL link to a project).ReleaseThe release has a foreign key relation toProjectand toChange. This is
used to make readers aware of the release that has taken place for the project.The attributes for a release areproject (FK toProject)version (TheVersionnumber)download (URL to download the release)ChangeA change is a difference of one release over another. A change is something
that isAdded,Removed,Fixed, orsomething else (Other).In addition, a change is given a description (thewhatfield) where the
developer can write a description of the change that occurred.Fields & InputVersionA version is–essentially–a list with an added attribute “stage” that can be
one of the following values:DEVALPHABETATESTRELEASEWhen comparing versions, the stage is always incorporated in the comparison.
For example, the versions0.1and0.1are equal, but the versions0.1-testand0.1-devare not.VersionFieldModel field for a version. For now, this is a CharField. However, a restriction
does exist for the version format. It must pass the following regexp test::(\d+\.)+\d+((\-(dev|test|release))|[ab])Here are examples of acceptable input:0.1a
1.5.8
13.4-devHere are examples of not-so-acceptable (e.g. invalid!) input:0-alpha14
0.1.-34.0You get the idea.Errors ThrownNotLatestVersionExceptionThis is thrown when a release is being added to a project and the release’s
version is not greater than the last added version. For example, if a project’s
latest version is 1.0 and you’re trying to add a version 0.8, the exception
will be thrown.
Package: django-project-mailer
Detailed documentation is in the “docs” directory.Quick startAdd “project-mailer” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'project-mailer',
]Include the polls URLconf in your project urls.py like this:url(r'project-mailer/', include('project-mailer.urls'))),Runpython manage.py migrateto create the emails models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a project-mailer (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/project-mailerto participate in the emails.
Package: django-projector
django-projectoris a project management application with task tracker and
repository backend integration. Aimed to work withDjango1.2 or later. We are
sick of Trac[1]and wanted to create simple application which can be easily
customized or plugged into existing systems.FeaturesMercurialrepository integrationEasy repositories forkingGranual permissions managementScalable architecture (AMQP) build on top of excellentceleryTask tracker with full history of changesRepository web browserCustomizable workflow for each projectGrouping tasks in milestonesRoadmapTeams supportDocuments based onrestructuredTextEmail notificationMake use ofdjango-richtemplatesso templates are ready to use
out of the boxIncomingHere are some additional points which are the target for future
release.Wiki per projectPlugin systemCode reviewSphinx integrationOther version control systems in backend (git,subversion…)Charts, statistics, graphs, plots, analyziesFunctional timelinedjango-pistonintegration for RESTful APIWarningThis application is at early-development stage but we strongly encourage
you to give it a try if you are looking for project management toolkit
for yourDjangobased project. Still, it probably shouldNOTbe used
in production as it wasn’t fully tested and may contain security issues.InstallationSeehttp://packages.python.org/django-projector/installation.htmlfor information on installingdjango-projector. It is also
available indocsdirectory atdocs/installation.rst.Source code and issue trackerSource code is along with issue tracker is available athttp://bitbucket.org/lukaszb/django-projector/.DocumentationOnline documentation for development version is available athttp://packages.python.org/django-projector/.Demo projectDemo project have been deployed athttps://forge.django-projector.org. It is
still rather experimental.Licensedjango-projectoris released underMITlicense. You should get a copy
of the license with source distribution, at the root location, withinLICENSEfile.[1]Don’t get us wrong,Tracis great tool but we believe that
django’s pluggable applications are far easier to configure and
deploy.
Package: django-project-panel
Простая мониторинг-панель проекта (размеры всех таблиц в базе данных, медиа файлов и т.д)***Установка:1. добавить вINSTALLED_APPS = [...'django_project_panel',]2. добавить в urls проектаpath('project_panel/', include('django_project_panel.urls')),3. выполнить миграции django_project_panelmanage.py makemigrations django_project_panelmanage.py migrate django_project_panel***Настройка:Добавить в settings.pyPROJECT_PANEL = {'folders_files': [{'path': os.path.join(BASE_DIR, 'logs'), 'label': 'Логи'},{'path': os.path.join(BASE_DIR, 'static'), 'label': 'Статика'},{'path': BASE_DIR, 'label': 'Проект'},],'clean_model': {'default.reports': {'filter_field_lt': 'created_at'},},}folders_files - можно перечислить каталоги и файлы, данные о которых нужно выводить в панеликаталог медиа уже добавленclean_model - можно перечислить таблицы, для которых будет доступа функция очистки в панели'clean_model': {'<алиас базы>.<имя таблицы>': {'filter_field_lt': '<имя поля для фильтрации записей на удаление>'},},ВАЖНО!Удаление записей происходит в соответствии с настройками on_delete вашей таблицы в базе***Права:- Панель управления проектом - просмотр- Панель управления проектом - управление***Подходит для mysql/mariadb и postgresql***url расширения: /project_panel/panel/
Package: django-project-setup
=====django-project-setup=====django-project-setup is simple python script package to setup a special django projectNot only it setup the django project, it also setup a virtualenv for you to workIt will also install django, rollbar, django-api-base into the virtualenvThe project root directory will have a readme.me file for assistance and gitignore filerequirments files etc. Everything in one.Detailed documentation is in the "docs" directory.Quick start-----------1. Take a copy of the sample_env.txt and name the new file .env2. Add your database credentials, email credentials into it3. Run the project and you are set