Saravanan666/pypi-org huggingface dataset:
Package: django-simple-audit
****************************************django simple audit****************************************This applications was created to audit model's changes and maintain a log of themInstallation===============You can install django-simple-audit in 2 ways: using pip or by setup.py install.. code-block:: bash$ pip install django-simple-auditThen modify your settings.py, adding the package `simple_audit` in INSTALLED_APPS and in MIDDLEWARE_CLASSES add`simple_audit.middleware.TrackingRequestOnThreadLocalMiddleware`:.. code-block:: bashINSTALLED_APPS = ('...','simple_audit',)MIDDLEWARE_CLASSES = ('...','simple_audit.middleware.TrackingRequestOnThreadLocalMiddleware',)DJANGO_SIMPLE_AUDIT_ACTIVATED = TrueUsage======Tracking changes on a model----------------------------to audit a model you need import `simple_audit` and then register the model to be audited... code-block:: pythonfrom django.db import modelsimport simple_auditclass Message(models.Model):title = models.CharField(max_length=50, blank=False)text = models.TextField(blank=False)def __unicode__(self):return self.textclass Owner(models.Model):name = models.CharField(max_length=50, blank=False)def __unicode__(self):return self.nameclass VirtualMachine(models.Model):name = models.CharField(max_length=50, blank=False)cpus = models.IntegerField()owner = models.ForeignKey(Owner)so = models.CharField(max_length=100, blank=False)started = models.BooleanField()def __unicode__(self):return self.namesimple_audit.register(Message, Owner, VirtualMachine)Advanced Usage (without httprequest or our middleware)--------------------------------------------------------You can use django-simple-audit without an http request (for example in management command). In this situationthere is no http request on thread context. To ensure gathering all modification on a single AuditRequest, you canspecify it:.. code-block:: pythonAuditRequest.new_request(path, user, ip)try:# my code... in same threadfinally:AuditRequest.cleanup_request()Tracking m2m fields changes----------------------------Tracking m2m fields changes is still experimental, but you can enable it with the following variable:DJANGO_SIMPLE_AUDIT_M2M_FIELDS = TrueYou need to have at least one cache backend set in your django settings, otherwise the previous settings will be set to False.CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache','LOCATION': 'unique','TIMEOUT': 300,}}Dependencies============* Django >= 1.4.x* django.contrib.contenttypes installed in INSTALLED_APPSTODO====* Improve testsCHANGELOG=========* 0.1.21* Problems with upload to pypi ( the version was used ) - Sux* 0.1.20* Add .get_queryset to AuditManager ( thanks sburns )* 0.1.19* Tracking user from Django REST Framework authentication ( thanks jnishiyama )* 0.1.15* use larger TextField for storing values ( thanks dinie )* Czech translation ( thanks cuchac )* 0.1.14* improved m2m audit feature ( thanks dinie )* Add support for Custom user model ( thanks dinie )* Option to turn on/off auditing ( thanks dinie )* 0.1.12* Created some simple tests* Enable many to many fiedls tracking (see Usage)
Package: django-simple-audit-gizmag
This applications was created to audit model’s changes and maintain a log of themInstallationYou can install django-simple-audit in 2 ways: using pip or by setup.py install$pipinstalldjango-simple-auditThen modify your settings.py, adding the packagesimple_auditin INSTALLED_APPS and in MIDDLEWARE_CLASSES addsimple_audit.middleware.TrackingRequestOnThreadLocalMiddleware:INSTALLED_APPS=['...','simple_audit',]MIDDLEWARE_CLASSES=['...','simple_audit.middleware.TrackingRequestOnThreadLocalMiddleware',]UsageTracking changes on a modelto audit a model you need importsimple_auditand then register the model to be audited.fromdjango.dbimportmodelsimportsimple_auditclassMessage(models.Model):title=models.CharField(max_length=50,blank=False)text=models.TextField(blank=False)def__unicode__(self):returnself.textclassOwner(models.Model):name=models.CharField(max_length=50,blank=False)def__unicode__(self):returnself.nameclassVirtualMachine(models.Model):name=models.CharField(max_length=50,blank=False)cpus=models.IntegerField()owner=models.ForeignKey(Owner)so=models.CharField(max_length=100,blank=False)started=models.BooleanField()def__unicode__(self):returnself.namesimple_audit.register(Message,Owner,VirtualMachine)Advanced Usage (without httprequest or our middleware)You can use django-simple-audit without an http request (for example in management command). In this situation
there is no http request on thread context. To ensure gathering all modification on a single AuditRequest, you can
specify it:AuditRequest.new_request(path,user,ip)try:# my code... in same threadfinally:AuditRequest.cleanup_request()Tracking m2m fields changesTracking m2m fields changes is still experimental, but you can enable it with the following variable:DJANGO_SIMPLE_AUDIT_M2M_FIELDS = TrueYou need to have at least one cache backend set in your django settings, otherwise the previous settings will be set to False.CACHES={'default':{'BACKEND':'django.core.cache.backends.locmem.LocMemCache','LOCATION':'unique','TIMEOUT':300,}}DependenciesDjango >= 1.8django.contrib.contenttypes installed in INSTALLED_APPSTODOImprove testsCHANGELOG0.2.2Add support for Django 1.9.0.2.1Drop South, require Django 1.8 or newer.0.2.0Use South for migrations0.1.12Created some simple testsEnable many to many fiedls tracking (see Usage)
Package: django_simpleauth
==========Simpleauth==========Simpleauth is a simple app created for the class requirement.Detailed documentation (if any!) is with in the source files as comments.(I'd suggested to go through the source, since that would be an easier task than tofigure out manually)Quick start-----------1. Include the shopcart urlconf in your project urls.py like this::urlpatterns = [...url(r'^simpleauth/', include('simpleauth.urls')),]2. Add "shopcart" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'simpleauth',]3. Modify the DATABASES section(Recommended DB is MySQL, but you can use sqlite3.)::DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql','NAME': '{DATABASE_NAME}','USER' : '{DATABASE_USER}','PASSWORD' : '{DATABASE_PASSWORD}',}}4. Make the migrations(This is used to generate the DB table)::$ python3 manage.py makemigrations simpleauth5. Then, migrate to DB::$ python3 manage.py migrate simpleauth3. Start the development server and visit http://127.0.0.1:8000/simpleauth/ to view thesimpleauth app
Package: django-simple-auth
Info:Super simple password protection for limiting public access to pages and
assetsVersion:0.2.1Author:Ben Lopatin (http://benlopatin.com)Django Simple Auth is asecondaryauthentication system for protecting any
URLs served by your application from public access. It does not replace your
authentication system. Rather its purpose is to provide very simple
a simple password for non-public information like shared photo galleries.InstallingFirst add the application to your Python path. The easiest way is to usepip:pip install django-simple-authAs of version 0.2.0 this is only tested against Django 1.11+ and is probably compatible
with Django 1.10 but this has not been tested.ConfiguringMake sure you havedjango.contrib.authinstalled, and add thesimple_authapplication to yourINSTALLED_APPSlist:INSTALLED_APPS = [
    ...
    'django.contrib.auth',
    'simple_auth',
]Next addsimple_auth.urlsto your project URLs.:...
url(r'^protect/', include('simple_auth.urls')),If you want to enable default rule-based limits on your site, install theSimpleAuthMiddleware:MIDDLEWARE = [
    ...
    'simple_auth.middleware.SimpleAuthMiddleware',
]By default this will require a password for all URLs except for URLs prefaced
with/admin/. These URLs can be overridden using protect and ignore
settings.:SIMPLE_AUTH_IGNORE = [
    r'^admin/,
    r'^$',
]

SIMPLE_AUTH_PROTECT = [
    r'^forums/'
    r^blog/',
    r^secret_page.html$',
]If a URL is listed in both the ignore and protect lists the default will be to
protect the URL and simple_auth will emit a warning.Usage overviewThere are two ways to protect pages and assets: view decorators and middleware.These methods will always allow authenticated users to access the URL.MiddlewareTo enable the middleware install the middleware class as described in the
installation section.Individual viewsNote: not implemented yet.For function views:from simple_auth import simple_auth_required

@simple_auth_required
def myview(request):
    ...For class-based views:from simple_auth import SimpleAuthMixin

class MyView(SimpleAuthMixin, DetailView):
    ...
Package: django-simple-authentication
Django’sauth.Usermodel uses ausernamefield to uniquely identify a
user.django-simple-authenticationuniquely identifies users with an
email address instead, removing theusernamefield altogether.Additionally,django-simple-authenticationoffers a feature that forces
users to change their password the next time they log in. This can be done
by settingsimple_authentication.User.force_password_changetoTrue.
TheForcePasswordChangeMiddlewaremust be installed for this feature to
work properly.Quick-startInstall:pip installdjango-simple-authentication.Add:simple_authenticationtoINSTALLED_APPS.Add:AUTH_USER_MODEL = 'simple_authentication'.Add:simple_authentication.middleware.ForcePasswordChanceMiddlewaretoMIDDLEWARE.Make migrations:python manage.py makemigrations simple_authentication.Apply migrations:python manage.py migrate simple_authentication.Compatibilitydjango_simple_authenticationhas been tested on Django versions >= 2.0.
It may work without issue on earlier versions of Django (or Python), but
this is not officially supported.ChangelogVersionDescription0.1.2Improved unit test coverage (up to 76%).0.1.1Ensure migrations are excluded from the PyPI
distribution.0.1Initial version.
Package: django-simple-backup
This is a fork of thedjango-backup appThis app backs up database and the media directory on the local disk
in a plain directory, without subdirectories.It does not set a goal of syncing files offsite.
To sync the files or do other post-processing,
please use a signalbackup_readyor an independent script.To list and download the backup files via the web,
try applicationdjango-directoryInstallationAdd to theINSTALLED_APPSentry‘simple_backup’,.SettingsSIMPLE_BACKUP_DIRECTORY- directory where the backups will be stored. Default value
is‘backups’, relative to the current working directory. This setting can be over-ridden
with the option–output-directory(or shorter version-o)SIMPLE_BACKUP_DAYS- number of days to keep the backup files. Default value isNone.
If set, older files will be deleted automatically each time the new backup is made.
This walue can be over-ridden with a–daysoption to the command.WarningTo avoid accidental deletion of valuable files when the above setting/option is used,
make sure that the backup directory contains only backups.Commandsbackup- backs up the site. See output ofpython manage.py backup –helpfor more information.SignalsThe commandbackupsends a signalsimple_backups.signals.backup_readywhen
the backup is prepared and copied to the backups directory.Changes2.1 (2023-10-29)Supports Django 42.0 (2023-05-13)Ported to Python3Supports Django > 21.1 (2023-05-13)Pins Python support to < 3
Package: django-simple-blacklist
This application provide simple blacklist logic for django projects.
You can block specific IP-addresses and User Agents for accessing specific page or view-name per HTTP-method.
Also, you can configure rules to block users automatically after N requests per datetime.timedelta() and notify
site managers about clients which have been blocked!Quick startAdd “blacklist” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'blacklist',
)Runpython manage.py migrateto create the blacklists models.Use blacklisting decorator for views which needs blacklisting logic like this:from blacklist.utils import blacklisting

urlpatterns = (
    url(r'^view/$', blacklisting(log_requests=True)(my_view), name='log'),
)Configure AUTO_BLOCKING_RULES setting in your settings.py for auto-blocking logic:AUTO_BLOCKING_RULES = (
    {
        'RULE': {
            'ip': '.*',
        },
        'PERIOD': datetime.timedelta(days=1),
        'BLOCK_AFTER': 10,
        'ENABLED': True,
        'PROPOSAL': True,
        'NOTIFY': (
            ('Mikhail Nacharov', 'mnach@ya.ru'),
        )
    },
)And call blacklist.models.RequestLog.objects.create_blocking_rules() periodically to
create BlockRules. Please use cron viadjango-cronjobsor setupdjango-celeryfor this purpose.5. If you need email notification configure django email settings as described inhttps://docs.djangoproject.com/en/1.8/topics/email/. If you want to send users site
where blocking rules have been created you also need to enable and configure django
site framework:https://docs.djangoproject.com/en/1.8/ref/contrib/sites/RequirementsThis package is compatible with Django 1.7 and 1.8 and can be ran on python 2.7 and higher.
Package: django-simple-block-tag
Analogue for simple_tag django decorator for making block (paired) template tags.Works likedjango.template.Library.simple_tag()and based on its code. One different is first argument, that takes all content between {% tagname %} and {% endtagname %}Installationpip install django-simple-block-tagUsagetemplatetags.pyfrom simpleblocktag import simple_block_tag
from django import template

register = template.Library()


@simple_block_tag(register)
def mytag(content, attr1, attr2=None):
    return "{}{}{}".format(attr1, content, attr2)


@simple_block_tag(register, takes_context=True)
def save_as(context, content, var_name):
    context[var_name] = content
    return ""template.html{% load templatetags %}

{% save_as "var_name" %}Some Content{% endsave_as %}
{% mytag "foo" "bar" %} {{ var_name|lower }} {% endmytag %}Outputfoo some content bar
Package: django-simple-blog
==========================django-simple-blog==========================What is it?===========django-simple-blog is a simple Django app for fast integrating yourcurrent project with a blog-systemYou can easily write blog posts, let users comment the posts if you'd like to.Installation============You can do any of the following to install ``django-simple-blog``- Run ``pip install django-simple-blog``.- Run ``easy_install django-simple-blog``.- Download or "git clone" the package and run ``setup.py``.- Download or "git clone" the package and add ``simpleblog`` to your PYTHONPATH.Usage=====1. Add ``simpleblog`` and `django.contrib.sites` to your INSTALLED_APPS setting like this::INSTALLED_APPS = (...'django.contrib.sites','simpleblog',)Note: if you want to customize the templates, please add ``el_pagination`` ``markdown_deux`` ``pagedown`` to your INSTALLED_APPS setting.INSTALLED_APPS = (...'django.contrib.sites','el_pagination','markdown_deux','pagedown','simpleblog',)2. Add `SITE_ID = 1` in your settings.py.3. Run ``python manage.py migrate``4. Include the ``simpleblog urls`` like this to have your "home page" as the blog index::...urlpatterns =[path('admin/', admin.site.urls),path('blog/', include('simpleblog.urls')),]Settings========``django-simple-blog`` has one setting at the moment::# How long the length of the textarea should be.MAX_LENGTH_TEXTAREA = 120 (defaults to None)Templatetags===========``django-simple-blog`` comes with one templatetag for gettingthe latest desired number of posts. Just do this in any template::{% load blog_tags %}{% latest_blog_posts 5 %}Translation===========``django-simple-blog`` is available in ``english``, ``swedish`` and ``french``at the moment, feel free to translate the application in anotherlanguage.Admin=====For writing posts we will use django's admin application.The templates=============The templates is just there as examples for how your templatescould look like, but they work excellent as well, but if you don'tlike them, just override them with your own templates simply.Requirements============`Django>=1.8<https://github.com/django/django/>`_`django-el-paginatio>=2.0<https://github.com/shtalinberg/django-el-pagination>`_`simplemathcaptcha>=1.0.3<https://github.com/alsoicode/django-simple-math-captcha/>`_`django-markdown-deux>=1.0.4<https://github.com/trentm/django-markdown-deux>`_`django-pagedown>=0.0.5<https://github.com/timmyomahony/django-pagedown>`_If you have problem getting the right versions of these packages,clone them from their github repository.
Package: django-simple-breadcrumbs
Breadcrumbs is a Django application to use breadcrumbs-based navigation.Using breadcrumbsTo use a breadcrumb, load the template tags and specify the breadcrumb:{% load breadcrumbs_tags %}
{% breadcrumb "Title of breadcrumb" url_var %}Running the testsCreate and load an isolated Django test environment:$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txtRun the tests:$ ./runtests.py
Package: django-simple-cache-admin
# django-simple-cache-adminThis a simple cache manager for checking and updating cache value easily in admin.## InstallationPutsimple_cache_adminin yourINSTALLED_APPS.That’s all. Only admin-users withsuperuserpermission can see.## PermissionsTo use this module, a user must have access to the Django admin panel and havechangepermissions on thesimple_cache_admin | SimpleCache adminmodel.Settingaddordeletepermissions has no effect, they are always false.# SettingsIn yoursettings.pyfile, you can add a dictionary calledSIMPLE_CACHE_ADMIN.The following key/value settings are available:TIMEOUT — integerThe default timeout, in seconds, to use for the cache. This argument default is 3600 seconds (1 hour).CACHES — stringA dictionary containing the settings for all caches to be used with Django. It is a nested dictionary whose contents maps cache aliases to a dictionary containing the options for an individual cache. Default is the settings indjango.conf.https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-CACHES## ScreenshotsOverview of simple cache admin.
![django-simple-cache-admin](https://raw.githubusercontent.com/7kfpun/django-simple-cache-admin/master/simple_cache_admin.png)## LicenseMIT## Changelog0.1.0:Initial Release.
Package: django-simple-captcha
Django Simple Captcha is an extremely simple, yet highly customizable Django application to add captcha images to any Django form.FeaturesVery simple to setup and deploy, yet very configurableCan use custom challenges (e.g. random chars, simple math, dictionary word, …)Custom generators, noise and filter functions alter the look of the generated imageSupports text-to-speech audio output of the challenge text, for improved accessibilityAjax refreshRequirementsDjango 4.2+, Python3.8+A recent version of the Pillow compiled with FreeType supportFlite is required for text-to-speech (audio) output, but not mandatoryDocumentationRead thedocumentation online.
Package: django-simple-captcha-audio-espeak
Django Simple Captcha is an extremely simple, yet highly customizable Django application to add captcha images to any Django form.FeaturesVery simple to setup and deploy, yet very configurableCan use custom challenges (e.g. random chars, simple maths, dictionary word, …)Custom generators, noise and filter functions alter the look of the generated imageSupports text-to-speech audio output of the challenge text, for improved accessibilityAjax refreshRequirementsDjango 1.8+A recent version of the Pillow compiled with FreeType supporteSpeak is required for text-to-speech (audio) output, but not mandatoryPython 3 compatibilityThe current development version supports Python3 via thesixcompatibility layer.
You will need to installPillowbecause PIL doesn’t support Python3 yet.DocumentationRead thedocumentation online.
Package: django-simple-category
Django Simple CategoryA simple django category libarayThis simple libaray provide an abstract Category class for django whitch does not need MPTT support.Feature overviewAbstract Category classInstallpipinstalldjango-simple-categoryUsageAdd "simple-category" to your INSTALLED_APPS setting like this:INSTALLED_APPS=['category',]Inherit from the Category class like this:fromsimple_category.modelsimportCategoryclassMyCategory(Category):passRun migrations to create your category models.pythonmanage.pymakemigrations
pythonmanage.pymigrate
Package: django-simple-certmanager
1django-simple-certmanagerVersion:1.4.1Source:https://github.com/maykinmedia/django-simple-certmanagerKeywords:certificatesPythonVersion:3.9Manage TLS certificates and keys in the Django adminContents1django-simple-certmanager2Features3Installation3.1Requirements3.2Install4Usage2FeaturesManage (mutual) TLS certificatesCertificate introspection and validationCertificate/key files stored in private mediaCertificate/key files deleted when the database record is deleted3Installation3.1RequirementsPython 3.7 or abovesetuptools 30.3.0 or aboveDjango 3.2 or newer3.2InstallYou can installDjango Simple Certmanagereither via the Python Package
Index (PyPI) or from source.To install usingpip:pipinstalldjango-simple-certmanager4UsageTo use this with your project you need to follow these steps:AddDjango Simple CertmanagertoINSTALLED_APPSin your Django
project’ssettings.py:INSTALLED_APPS=(# ...,"privates",# Needed for admin usage."simple_certmanager")Make sure you configureDjango Privatescorrectly and set the (currently)
undocumented settings:PRIVATE_MEDIA_ROOT=os.path.join(BASE_DIR,"private-media")PRIVATE_MEDIA_URL="/private-media/"Run the migrationspythonmanage.pymigrate
Package: django-simplecms
This is the CMS framework used by the web consultancy companyReturn to the Source, provided here for everyone
to use under theAGPLlicense as part of our free and
open source philosophy. Also check out ourother projects!Getting startedSimpleCMS provides everything to create websites that can be edited by
end users. Here's how to start a new project:$ pip install django-simplecms
$ simplecms my_awesome_websiteThis will create a new directory containing a fully configured Django
project with models, views and templates. It is a renamed copy of the
includedexampleproject.ArchitectureSimpleCMS has a rather unique take on Django's MVT architecture.
Contrary to "regular" Django websites, it allows you to write a view
for eachsection, rather than for eachpageon your website. On
which pages these sections appear, and in which order, is left to the
content editors rather than the programmer. The included edit interface
lets them assign sections to pages and fill sections with content.Here's an exampleviews.pyof an app using SimpleCMS:from cms.views import SectionView
from cms.decorators import section_view

@section_view
class HelloWorld(SectionView):
    verbose_name = 'Hello world section'
    fields = ['content']
    template_name = 'hello.html'

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context['message'] = 'Hello World!'
        return contextAnd here is the contents ofhello.html:<section type="helloworld">
    <h1>{{ message }}</h1>
    {{ section.content }}
</section>Everytime a section needs to be rendered, SimpleCMS will call the
appropriate section view and insert the rendered result into the final
rendered page.The edit interfaceSomewhat like the Django Admin site, SimpleCMS comes with its own
editing environment, albeit much simpler and only suitable for editing
pages and sections. After authenticating, you can click the "edit"
button on any page of the website to alter, add or rearrange sections.For each section, the section type can be selected from a dropdown
menu. As you can see inviews.pyabove, each section type comes with
its own list of editable fields. Client-side javascript will hide/show
the relevant fields based on the selected section type. All sections
are stored in the same database table.Batteries included!SimpleCMS includes a variety of useful template tags, defaultPageandSectionmodels, and all the other boilerplate code needed for
new projects.Feedback and supportWe would love to hear from you! Feel free toopen an
issueorsend us an email.