Saravanan666/pypi-org huggingface dataset:
Package: django-attrs
Font Awesome for Django.InstallationInstall using pip:pip installdjango-faAlternatively, you can install download or clone this repo and callpip install-e..Add to INSTALLED_APPS in yoursettings.py:'fa',Use thefont-awesometag library in your templatesExample template{%loadfont_awesome%}{# Load CSS #}{%fa_css%}{# Display an icon #}{%fa'fa-shield'%}DocumentationThis is pretty much what it does.RequirementsPython 2.6, 2.7, 3.2 or 3.3Django >= 1.4Contributions and pull requests for other Django and Python versions are welcome.Bugs and requestsIf you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.https://github.com/zostera/django-fa/issuesLicenseYou can use this under the MIT License. SeeLICENSEfile for details.AuthorDeveloped and maintained byZostera.Original author & Development lead:Dylan Verheul.Thanks to everybody that has contributed pull requests, ideas, issues, comments and kind words.Please seeAUTHORS.rstfor a list of contributors.0.1.1 - 2016-11-30Fix name, links and other stuff in setup0.1.0 - 2016-11-30First upload to PyPI
Package: django-audimatic
django-audimaticEasy audit trails.Installationpipinstalldjango-audimatic# orpipenvinstalldjango-audimatic# or# install with your manager of choiceUsageAdd to INSTALLED_APPSINSTALLED_APPS=[...,"django_audimatic",...]Create audit trail tables and subclass AuditTriggerfromdjango.contrib.auth.modelsimportAbstractUserfromdjango_audimatic.modelsimportAuditTrail,AuditTriggerclassUserAuditTrail(AuditTrail):passclassCustomUser(AbstractUser,AuditTrigger):classMeta(AuditTrigger.Meta):audit_table=UserAuditTrailRegister AdminModelsfromdjango.contribimportadminfromdjango.contrib.auth.adminimportUserAdminfromdjango_audimatic.adminimportDiffInlinefromtestapp.modelsimportCustomUser,UserAuditTrailclassCustomUserAuditTrail(DiffInline):model=CustomUser.get_audit_table()classCustomUserAdmin(UserAdmin):inlines=(CustomUserAuditTrail,)admin.site.register(UserAuditTrail,admin.ModelAdmin)admin.site.register(CustomUser,CustomUserAdmin)Add HStoreExtensionfromdjango.contrib.postgres.operationsimportHStoreExtension...operations=[HStoreExtension(),]...OtherThis project uses django-pgtrigger and django-nonrelated-inlines.Currently, (as of Django 4.2.4) there is logic that registers these automatically, this might break in future version of Django.There is functionality to disable migration support in pgtrigger, however that is not recommended or tested.Inlines will always be registered as well, this is for simplicity, but maybe we add some options in the future.LicenseCopyright 2023 Bill SchumacherPermission 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: django-audioadmin
A reusable Django app for uploading/previewing audio files with a simple id3 tag reader.InstallationRequires Django 1.7 or greaterInstall from PyPi with pip:pip install django-audioadminAdd"audioadmin"to theINSTALLED_APPSin yoursettings.py:INSTALLED_APPS = (
    ...
    "audioadmin"
    ...
)Make sure you have your Media folder setup. Add these to yoursettings.py:MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')Make sure your media files can be served on dev. Add these to yoururls.py:urlpatterns = patterns('',
    ...
    url(r'^admin/', include(admin.site.urls)),
    ...
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)Run migrations:./manage.py migrateStart development server:./manage.py runserverTo run tests:./manage.py testCreditsAudio playback is provided bySoundManager2LicenseDjango-Audioadmin is licensed under MIT, seeMIT-LICENSE.txt.
Package: django-audio-validator
Django Audio Validator 🔉This Library a Audio Validator For Django With d MIME type checking the magic numbers signature And Extension Use FileType LibraryFeature 📌Audio File Type Check Use MIME TypeAudio File Extension CheckAudio Type Supported ✅aac -audio/aacmidi -audio/midimp3 -audio/mpegm4a -audio/mp4ogg -audio/oggflac -audio/x-flacwav -audio/x-wavamr -audio/amraiff -audio/x-aiffHow Use ? 👇First Install The Library Use The Command :pip install django-audio-validatorImport Library In Your Model :from audio_validator.validator import AudioValidatorPass Validator To Your Model And Set Type Of Audio :Template :AudioValidator("Audio Type Supported")Code Example :class Attachment(models.Model):

    audio = models.FileField(
        upload_to=user_directory_path,
        blank=True,
        validators=[AudioValidator("mp3")],
    )
    created_at = models.DateTimeField(auto_now_add=True)Contribute This Project 🔗If you would like to help me develop this project, you can do so through thislink
Package: django-audited-models
Author:Chris ChambersDate:2012/05/08Django Audited Models provides a simple abstract base class (and factory
function) for tracking database record creation and modification times, as
well as the creator of the record and the last user to edit it. It leverages
two pluggable applications to achieve this:Django Extensions, which provides (amongst many other things) aCreationDateTimeFieldandModificationDateTimeField.Django Threaded Multihost, originally developed forSatchmo, which
provides athreadlocalsmechanism that works reliably for Django
installations powering multiple sites via thesitesframework.InstallationInstallpip.Runpip installdjango-audited-models.Addthreaded_multihost.middleware.ThreadLocalMiddlewareto your list ofMIDDLEWARE_CLASSES.Inherit fromAuditedModelinstead ofmodels.Modelin your django
applications.Profit!ExplanationDjango-audited-models fulfils several needs:This kind of metadata is almost always useful, and inexpensive to capture -
most of your clients will just presume this information is logged and will
be frustrated if they can’t get at it (“What do you mean we can’t see who
created this record?”)Django’s admin logging functionality provides some of this detail, but is
flawed in that it only captures events which take place within the admin
itself.This app provides a consistent, logical naming convention and interface for
the metadata.This app makes use of several other applications to capture this
information automatically. No need to pollute your views with unrelated
logic or overrideModelAdminmethods to store the user who created the
record.It’s pluggable - simply drop it in, install its requirements, inherit fromAuditedModel, and you’ll have your creation/modification dates and the
users responsible for them, respectively. Similarly, replace yourModelAdminwith theAuditedAdminsubclass and you’ll have some
sensible defaults for the admin UI (readonly metadata fields, etc.).As a bonus, ensures thatMyModel.objects.latest()does something
sensible by default - very handy when working with the interpreter,
especially.Some might question the verbosity of the time entry fields
(datetime_createdanddatetime_modified). Consider the following:>>> from datetime import date
>>> latest_user = User.objects.latest('date_joined')
>>> if latest_user.date_joined < date.today():
>>>     print "Nobody has joined the site today."

# Intuitively, this looks like it will work, but...
TypeError: can't compare datetime.datetime to datetime.datePython treatsdatetimeobjects very differently todates, and the
explicit fieldnames remind the developer of this difference and help prevent
errors due to incorrect assumptions.RequirementsPython 2.5+Django 1.2+Applications listed inrequirements.txtYou will also need to install the applications listed inrequirements-dev.txtin order to run the test suite.
Package: django-audit-events
Django Audit EventsExtensible custom audit events for humans! This Django app allows you to easily create your own events in your project. Currently only works on PostgreSQL.Let's have a look:defawesome_view(request):foo_obj=Foo.objects.get(pk=1)# Do something with foo_obj...request.audit_context.create_event(foo_obj,something="done",bar="baz")This will create an audit event, including the request URL, logged-in user, remote IP address, and the following event content:>>> event.content
{"something": "done", "bar: "baz"}For more information about installation and usage, check out thedocumentation!
Package: django-audit-fields
django-audit-fieldsVERSION<=0.3.3 (DJ 3.1, py 3.7, 3.8)>=0.3.4 (DJ 3.2+, py 3.9+)>=0.3.14 (DJ4.2, py3.11) includes localeInstallationpipinstalldjango_audit_fieldsAdd bothdjango_audit_fieldsanddjango_revisionto INSTALLED_APPSINSTALLED_APPS=["...","django_revision.apps.AppConfig","django_audit_fields.apps.AppConfig","..."]UsageAdd model fields to track creation and modification dates, users and more on save.Declare your model usingAuditModelMixinfromdjango_audit_fields.model_mixinsimportAuditModelMixinclassMyModel(AuditModelMixin,models.Model):...classMeta(AuditModelMixin.Meta):passPreferably, use a UUID as primary key by declaring your model usingAuditUuidModelMixinfromdjango_audit_fields.model_mixinsimportAuditUuidModelMixinclassMyModel(AuditUuidModelMixin,models.Model):...classMeta(AuditUuidModelMixin.Meta):passThe model mixinsAuditModelMixinandAuditUuidModelMixin:add audit fields (created, modified, user_created, user_modified, hostname_created, hostname_modified);The model mixinAuditUuidModelMixinalsosets the id fields to aUUIDFieldinstead of an integer;Most models require an audit trail. If so, add theHistoricalRecordmodel manager fromdjango-simple-history:fromsimple_history.modelsimportHistoricalRecordsclassMyModel(AuditUuidModelMixin,models.Model):...history=HistoricalRecords()NotesUser created and modified fields behave as follows:created is only set on pre-save addmodified is always updated
Package: django-auditlog
django-auditlogdjango-auditlog(Auditlog) is a reusable app for Django that makes logging object changes a breeze. Auditlog tries to use as much as Python and Django's built in functionality to keep the list of dependencies as short as possible. Also, Auditlog aims to be fast and simple to use.Auditlog is created out of the need for a simple Django app that logs changes to models along with the user who made the changes (later referred to as actor). Existing solutions seemed to offer a type of version control, which was found excessive and expensive in terms of database storage and performance.The core idea of Auditlog is similar to the log from Django's admin. Unlike the log from Django's admin (django.contrib.admin) Auditlog is much more flexible. Also, Auditlog saves a summary of the changes in JSON format, so changes can be tracked easily.DocumentationThe documentation fordjango-auditlogcan be found onhttps://django-auditlog.readthedocs.org. The source files are available in thedocsfolder.LicenseAuditlog is licensed under the MIT license (see theLICENSEfile for details).ContributeIf you have great ideas for Auditlog, or if you like to improve something, feel free to fork this repository and/or create a pull request. I'm open for suggestions. If you like to discuss something with me (about Auditlog), please open an issue.ReleasesMake sure all tests onmasterare greenCreate a new branchvX.Y.Zfrom master for that specific releaseUpdate the CHANGELOG release datePull requestvX.Y.Z->masterAs a project lead, once the PR is merged, create and push a tagvX.Y.Z: this will trigger the release build and a notification will be sent from Jazzband of the availability of two packages (tgz and wheel)Test the installPublish the release to PyPI
Package: django-audit-logger
Django Audit LoggerA django package that allows you to log user logins and changes to instances of the models within your project.InstallPippip install django-audit-loggerDependencies:DjangoBoto3CeleryRedisWorks with both python 2.7 and all versions of python that support Django 1.11 (>= 3.4)Update SettingsAdd the following settings to yoursettings.pyfile and give them the correct values.AUDIT_LOGGER_REGION = ''
AUDIT_LOGGER_KEY_ID = ''
AUDIT_LOGGER_SECRET_ACCESS_KEY = ''
AUDIT_LOGGER_GROUP_NAME = ''
AUDIT_LOGGER_STREAM_NAME = ''
AUDIT_LOGGER_EXCLUDE = []
AUDIT_LOGGER_USER_ORGANISATION_FIELD = []
LOG_INTERVAL = ''Addauditloggerto yourINSTALLED_APPS.Optional: Add your models to the logger:By default, onlyUserlogins are logged. You can start logging additional models by using the@auditlogger_update_deletedecorator.from auditlogger.signals import auditlogger_update_delete

@auditlogger_update_delete
class ModelToLog(models.Model):
    name = models.CharField(max_length=100)
    (...)Both create, update and delete actions will be logged.SettingsAWS settingsAUDIT_LOG_REGION
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEYThese settings manage the connection to AWS.CloudWatch settingsAUDIT_LOG_GROUP_NAMEThe name of the LogGroup within CloudWatch to sent the logs to.AUDIT_LOG_STREAM_NAMEThe name of the log stream.Audit-logger settings:AUDIT_LOG_EXCLUDEJust as you can include models to be logged, you can also exclude them. This is useful for models that will be logged by default. For example, one can exclude the djangoSessionobject like so:AUDIT_LOG_EXCLUDE = ['Session']AUDIT_LOGGER_USER_ORGANISATION_FIELDIf the project that you wish to collect the audit-logger to uses tenants, academies or an equivalent that users are members of, you can add them to the logs through this setting. The organisation will be displayed as the value of theorganisationfield in the logs.Theorganisationmay be linked to theuseras a direct relation, or through an intermediary object like aprofilemodel. To support both scenarios the value
should be provided as a list.For example in the following scenarios:user->organisationthe value should be:['organisation']user->profile->organisationthe value should be:['profile', 'organisation']LOG_INTERVALThe logs are pushed to cloudwatch in batches, with all logged events being held in redis until the log interval expires. The interval value represents the time in minutes, with5as the default.Custom log eventsYou can also link other signals used in your app to the logger like so:from auditlogger.signals import send_log
from django.dispatch import receiver, Signal
from myapp.models import Organisation

organisation_login_signal = Signal(providing_args=['date', 'instance'])


@receiver(organisation_login_signal, sender=Organisation)
def organisation_login(**kwargs):
    """detect organisation logins"""
    send_log('ORGANISATION_LOGIN', **kwargs)TestThe app comes with included tests that you can run with the following command from thedjango-audit-loggerdirectory (requires thepython manage.py migratecommand to have been run):python auditlogger/run_tests.py
Package: django-audit-log-middleware
This package adds simple audit logging to a Django project.A log is generated at info level each time a request is made. The log includes the following information:A UTC timestampRequest method (HTTP verb)Full URLIP addressA value from a custom user field (see below)The requesting user’s email addressThe requesting user’s first nameThe requesting user’s last nameInstallationpipinstalldjango-audit-log-middlewareUsageUsing in a Django middleware configuration:INSTALLED_APPS=[..."django_audit_log_middleware",]MIDDLEWARE=[..."django_audit_log_middleware.AuditLogMiddleware",]DependenciesThis project is a Django app and depends on the Django package.This package uses Django IPwarehttps://github.com/un33k/django-ipwarefor IP address capture.SettingsAUDIT_LOG_USER_FIELDProvide to define a field on your user model that should be captured in the audit log. Email, first name and last name are captured by default.Tests$pipinstall-rrequirements.txt$tox
Package: django-auditor
This Django app logs changes to models objects in a simple and
granular way. This app supports multi-tenant environments
which use django-tenant-schemas.RequirementsPython 3.4Django 1.8Installation (for environments without django-tenant-schemas)Add “auditor” to your INSTALLED_APPS setting like this:INSTALLED_APPS=(...'django_auditor',)Add an empty dict ‘AUDITOR’ on your settings:AUDITOR={}Include the auditor URLconf in your project urls.py like this:url(r'^auditor/',include('django_auditor.urls'))Runpython manage.py makemigrationsto create the migration
file for auditor model.Runpython manage.py migrateto apply the migration and
create the Auditor model.Installation (django-tenant-schemas environments)Add “auditor” to your SHARED_APPS or TENANT_APPS setting
like this:SHARED_APPS=(...'django_auditor',)orTENANT_APPS=(...'django_auditor',)Add a dict ‘AUDITOR’ on your settings, specify a ‘tenant’
key with the value of your tenant model:AUDITOR={'tenant':'customers.Client'}Include the auditor URLconf in your project urls.py like this:url(r'^auditor/',include('django_auditor.urls'))Runpython manage.py makemigrationsto create the migration
file for auditor model.Runpython manage.py migrate_schemasto apply the migration and
create the Auditor model.Usage and ExamplesCreate an instance of Audit passing request and the object you want
to log, then call the method create(), update() or delete()
to generate a log with the appropriate action: CREATE, UPDATE or
DELETE.First you have to import the Audit class:fromdjango_auditor.auditorimportAuditNew objectnew_car=Car(name='Civic',manufacturer='Honda',color='Red')new_car.save()auditor=Audit(request,new_car).create()Update Objectchange_car=Car.objects.get(name='Civic')auditor=Audit(request,change_car)change_car.name='City'change_car.color='Yellow'change_car.save()auditor.update()Delete Objectremove_car=Car.objects.get(name='City')auditor=Audit(request,remove_car)remove_car.delete()auditor.delete()Now openhttp://yoursiteURL/auditorto check your logs.
Package: django-auditorialog
AuditLog is a simple django-app for saving logs of activities performed on models.Quick startAddauditlogto your INSTALLED_APPS setting like this:`    INSTALLED_APPS = [`
`        …`
`        ‘auditlog’,`
`    ]`Include the auditlog_db database settings:DATABASES = {`         …,`
`        ‘auditlog_db’: {`
`        ‘ENGINE’: ‘django.db.backends.sqlite3’,`
`        ‘NAME’: os.path.join(BASE_DIR, ‘auditlog.sqlite3’),`
`        }`
`    }`Runpython manage.py migrateto create the auditlog models.To saving log use the piece of code in each view that you want to saving audit:AuditLogDispatcher.send(sender=NotaFiscal, user=request.user, instance=instance, acao=’some action’)Theacaoparameter can be:1. create
1. update
1. delete
Package: django-auditor-logs
Django Auditor Logs is a Django app that provides a simple way to log events CREATE, UPDATE AND DELETE in your Django project. It is designed to be used with the Graphene Django package or Django Graphbox, but can be used with any Django project.Installationpipinstalldjango-auditor-logsQuick startAdd “django_auditor_logs” to your INSTALLED_APPS setting like this::INSTALLED_APPS=[...'django_auditor_logs',]Configure AUDIT_APPS in your settings.py file like this::AUDIT_APPS=['app1','app2',]Runpython manage.py migrateto create the django_auditor_logs models.Optionally you can change MIGRATION_MODULES in your settings.py file like this::MIGRATION_MODULES={'django_auditor_logs':'app1.migrations',}User and request metadata is set by a middleware. Add the middleware to your MIDDLEWARE setting like this::MIDDLEWARE=[...'django_auditor_logs.middleware.metadata_middleware.MetadataMiddleware',]Release notes1.0.0Initial release.1.0.1Replace decorator and __user_metadata__ and __request_metadata__ fields by a MetadataManager class used in a Middleware.1.0.2Fix documentation of the middleware.1.0.3Fix WARNING default_auto_field.2.0.0Add optional interaction with django_graphbox to build a graphql schema with queries to read the logs.
Package: django-audittrail
Audit trail is a simple Django app to track the database changes and maintain history in any application. It also provide history for many_to_many fields, with ready admin page.With django 3 supports.Quick startInstall django-model-audit:pip install django-audittrailAdd “audit_trail” to your INSTALLED_APPS:INSTALLED_APPS = [
        ...
       'audit_trail',
]Add Middlewre:MIDDLEWARE = [
       ...
       'audit_trail.middleware.AuditMiddleware'
]Run Migrate:python manage.py migrateAdd an AuditTrail and manager to model you want to create history:from audit_trail.history import AuditTrail, AuditManager
class MyModel(models.Model):
    ...

    history = AuditTrail()

    objects = AuditManager.as_manager()

    class Meta:
        display_format = '{model_name.field_name}'To add admin screen for audit simply inherit AuditTrailAdmin in your model admin:from audit_trail.admin import AuditTrailAdmin
class MyModelAdmin(AuditTrailAdmin):
    ...Visit django model admin screen to get the history of particular
model(Click on History button in that screen).To get audit trail of many_to_many fields just send signal from your AppConfig class’ ready method:from audit_trail.signals import audit_m2m_ready

class MyappConfig(AppConfig):
    ...
    def ready(self):
        audit_m2m.ready.send(sender=self.__class__)
        ...To get audit trail logs in your django app import and call function
get_audit_trail() like this:from audit_trail.admin import get_audit_trail
get_audit_trail(model_name, object_id)