Saravanan666/pypi-org huggingface dataset:
Package: django-simplegallery
django-simplegallery====================simple gallerydependecies-----------* django-filer* classy js: https://github.com/FinalAngel/classy-frontend-framework* jquery* jquery.cycleInstallation------------* `pip install django-simplegallery`* follow the setup instructions for django-filer* add `simplegallery` to INSTALLED_APPS and run syncdb or south migrate* make sure `simplegallery/media` is accessible at your MEDIA_URL* These external js dependencies also need to be made accessable at thesedefault locations:* `{{ MEDIA_URL }}js/libs/jquery-1.4.4.js`* `{{ MEDIA_URL }}js/libs/classy-1.3.js`* `{{ MEDIA_URL }}js/plugins/jquery.cycle-2.97.js`You can change the locations of these files by overriding the templates.0.13====* its now possible to link a gallery to a django-filer folder, so it will one-way sync with the folder (changes in simplegallery are ignored, all changes from filer will be accepted)0.12====* groups is no longer a mandatory fieldBackward incompatible changes!* css has changed* js dependencies are no longer bundled0.11.0a1========Backwards incompatible changes!* added django-sekizai dependency* added django-tinymce dependency* default stylesheets and html structure changed, files renamedAdded detail change view for images in GalleryNo more `null=True` on `CharFields` and `TextFields` (used `blank=True, default=''` instead)0.10.0a=======Changed image fields from image_filer to filer (backwards incompatible change)
Package: django-simple-gravatar
Django Gravatar is a lightweight Django application that allows you to insert a Gravatar image in your templates.Get itThe best way to install Django Gravatar is use easy_install.easy_install django-simple-gravatarIf you prefer install it from source, grab the git repository from github and run setup.py$ git clone git://github.com/skitoo/django-gravatar.git
$ cd django-gravatar
$ python setup.py installInstallationNow Django Gravatar is in your PYTHONPATH. You can add this app in your project settings.py file.INSTALLED_APPS = (
   # other apps
   'django_gravatar',
)You can specify a default image url, Gravatar will use it if it cannot find an account associated with the email parameter.
In your settings project file add this variableGRAVATAR_DEFAULT_URL = "http://www.example.com/mydefaultavatar.jpg"UsageNow you can use Django Gravatar tag in your templates.
First import template tag.{% load gravatar %}Django Gravatar offers you two tags. The first one return gravatar image url.{% gravatar_url user.email %}

# you can pass an optional argument to specify the avatar size. By default size is 80.

{% gravatar_url user.email 40 %}The second one return an HTML img tag.{% gravatar user.email %}

# you can also pass an optional size argument here.

{% gravatar user.email 40 %}

# this tag provides another argument to specify <img /> arguments.

{% gravatar user.email 40 'class="gravatar"' %}CreditsAlexis Couronne <alexis.couronne@scopart.fr>
Package: django-simple-health-check
django-simple-health-checkSimple Django health checkInspired by:django-alivedjango-healthchecksdjango-health-checkdjango-healthzdjango-watchmanInstallation$pipinstalldjango-simple-health-checkUsepip install django-simple-health-check[psutil]for usingsimple_health_check.checks.ps.*checks.Quick startInstall the packageAddsimple_health_checkto your INSTALLED_APPS settings like this:INSTALLED_APPS=[...,'simple_health_check',...,]Addsimple_health_check.urlsto mainurls.py:fromdjango.urlsimportpath,includeurlpatterns=[...,path('',include('simple_health_check.urls')),...,]Configure the readiness checks:SIMPLE_HEALTH_CHECKS={'simple_health_check.checks.migrations.Migrations':[dict(alias='default'),dict(alias='db2'),],'simple_health_check.checks.db.Databases':None,# The simplest way to add your own check'your_package.path_to_checks.SomeCheck':{...}or[{...},...]orNone,}by defaultSIMPLE_HEALTH_CHECKS={'simple_health_check.checks.migrations.Migrations':None,# check all aliases'simple_health_check.checks.db.Databases':None,# check all aliases}Built-in checksA checkBuilt-in/expectedsimple_health_check.checks.db.Databases:heavy_check_mark:simple_health_check.checks.migrations.Migrations:heavy_check_mark:simple_health_check.checks.caches.CacheBackends:heavy_check_mark:simple_health_check.checks.ps.DiskUsage:heavy_check_mark:simple_health_check.checks.ps.MemoryUsage:heavy_check_mark:simple_health_check.checks.dummy.DummyTrue:heavy_check_mark:simple_health_check.checks.dummy.DummyFalse:heavy_check_mark:emails:hourglass_flowing_sand:queues:hourglass_flowing_sand:storages:hourglass_flowing_sand:LicenseMIT
Package: django-simpleinliner
django-simpleinlinerA simple Django app for inlining static CSS and JS files in templates. Read CSS, JS or generic files from your static directories and insert their contents into your Django templates, wrapping in appropriate HTML tags if necessary.RationaleProvides a quick and easy way to inline an entire JS or CSS file from staticfiles into a template, wrapping it in appropriate tags.django-compressordoes this but I wanted something more lightweight, and also wanted to try my hand at writing a Django extension. Some inspiration and staticfile-handling code was taken fromdjango-inlinecss.CompatibilityI've not exhaustively tested all the below combinations, however I believe this table to be accurate.Django 1.112.02.12.23.03.13.2Python2.7✔3.6✔✔✔✔✔✔✔3.7✔✔✔✔✔✔✔3.8✔✔✔✔✔✔✔Installation$ pip install django-simpleinlinerAddsimpleinlinerto yourINSTALLED_APPSsetting.UsageLoad the app at the top of your template:{% load simpleinliner %}Callinlinecss,inlinejsorinlinegenericwhere you want to pull in a static file:{% inlinejs 'path/to/my.js' %}

{% inlinecss 'path/to/my.css' %}

{% inlinegeneric 'path/to/my.svg' %}The file will be inserted into the template each time the template is rendered, keeping it up to date.You can override the default attributes given to<script>and<style>tags generated bysimpleinlinerby including the following in your project settings:SIMPLEINLINER_DEFAULT_TAG_ATTRIBUTES = {
    'script': {
        'charset': 'utf-8',
        'type': 'text/javascript',
    },
    'style': {
        'charset': 'utf-8',
        'type': 'text/css',
    },
}Add or edit these as desired to change the attributes applied to these tags.By defaultsimpleinlinerwill silently fail (including an empty tag if usinginlinejsorinlinecss) if the specified path doesn't exist. You can force it to raise an exception by settingSIMPLEINLINER_RAISE_EXCEPTIONStoTruein your project settings.Development InstallationIf working locally on the package you can install the development tools viapip:$pipinstall-e.[dev]To lint withflake8:$flake8CreditsSince version 0.2.5 this library bundles a lightly modified version 1.16 of thehtmllibrary (inhtml.py), as that library does not correctly install itself in modern python/setuptools environments and cannot be correctly imported.Issues, Suggestions, Contributions...are welcome on GitHub. Thanks for your interest insimpleinliner!
Package: django-simple-ip-restrict
django-simple-ip-restrictThis middleware allows you to mark Django URL namespaces as unavailable to all
requests except those coming from a whitelisted IP subnet.InstructionsAdd to the list of MIDDLEWARE:"django_simple_ip_restrict.middleware.ip_filter",Then you can set the following keys on settings.py:IP_PROTECTED_NAMESPACES: list of namespaces to block (default: ["admin"])IP_NETWORKS_WHITELIST: list of subnets to allow, in CIDR notationManual deploymentSince we don't have a CI/CD pipeline set up right now. You'll have to follow the following steps to releaseDo your changesInstallbumpversionandtwinepip install twine bumpversionBump the version usingbumpversionbumpversion patchA commit should be made automatically, just pushgit pushBuild using setup.pypython setup.py sdistPush to pypi using twinetwine upload dist/*Use1passwordto find the credentials for pypi.In order to upload, we have 2FA and the following needs to be done:username should be "__token__"password should be the Access Token value
Package: django-simple-json-api
Django Simple JSON APIInstallpip install django-simple-json-apiInstructionsAdddsjapi.decorators.apiordsjapi.decorators.api_rqto your view function.Return a JSON serializable object or adjango.http.HttpResponseobject.Raising adsjapi.exceptions.ServerExceptionexception will automatically return the appropriate JSON response.Decorator parametersfielddsjapi.fields.FieldExpected field in request body. Default isNone.allowedMethodslistofstrAllowed HTTP methods (uppercase). Default is["GET", "POST"].safeEncodingboolTrueto allow non-dictresponse objects. Default isFalse.@apivs@api_rq@apionly provides the validated request data.@api_rqprovides adsjapi.decorators.Requestobject that contains bothrequest(the originaldjango.http.HttpRequestobject) anddata(the validated request data) attributes.ExamplesViewsfromdsjapi.decoratorsimportapifromdsjapi.fieldsimport*@api(DictField({"name":StringField(minLength=2,maxLength=32,regex=r'^[a-zA-Z ]+$'),"bio":StringField(maxLength=64,missing=Field.Do.DEFAULT,default=""),# Optional (default to "")"age":IntField(min=18,max=130)}))defindex(data):result=putUser(data["name"],data["bio"],data["age"])return{"result":result}fromdsjapi.decoratorsimportapifromdsjapi.fieldsimport*@api(DictField({"start":ListField.byLength(2,FloatField()),"end":ListField.byLength(2,FloatField(),missing=Field.Do.SKIP),# Optional"time":FloatField(min=120,max=60*60)}))defindex(data):if"end"indata:route=getARoute(data["start"],data["time"])else:route=getABRoute(data["start"],data["end"],data["time"])return{"route":route}fromdsjapi.decoratorsimportapifromdsjapi.fieldsimport*@api(DictField({"numbers":ListField.byLength(2,FloatField(min=0))}))defindex(data):sum=0fornumberindata["numbers"]:sum+=numberavg=sum/len(data["numbers"])return{"average":avg}fromdsjapi.decoratorsimportapifromdsjapi.fieldsimport*fromdsjapi.exceptionsimport*@api(DictField({"id":IntField(min=0,max=4096),"password":StringField(min=8,max=32)}))defindex(data):user=getUserById(data["id"])ifuserisNone:raiseNotFoundException("User not found")ifuser.getPassword()!=data["password"]:raiseAuthenticationException("Wrong password")return{"id":user.getId(),"score":user.getScore()}Custom fieldsfromdsjapi.fieldsimportIntField,FieldExceptionclassEvenNumberField(IntField):def__init__(self,min=None,max=None,missing=Field.Do.RAISE,error=Field.Do.RAISE,default=None):super().__init__(int,min=min,max=max,missing=missing,error=error,default=default)defclean(self,value):value=super().clean(value)ifvalue%2!=0:raiseFieldException("Odd number")returnvalue
Package: django-simplekeys
django-simplekeys is a reusable Django app that provides a simple way to add
API keys to an existing Django project, regardless of API framework.GitHub:https://github.com/jamesturk/django-simplekeysDocumentation:https://django-simplekeys.readthedocs.io/en/latest/FeaturesToken bucketrate limiting, for limiting requests/second with optional bursting behavior.Quota-based rate limiting (e.g. requests/day)Ability to configure different usage tiers, to give different users different rates/quotas.Ability to configure different ‘zones’ so that different API methods can have different limits.  (e.g. some particularly computationally expensive queries can have a much lower limit than cheap GET queries)Provided views for very simple email-based API key registration.
Package: django-simple-log
Logging model changes on every create/update/delete (except queryset update).Full documentation onread the docs.InstallationInstall using pip:$pipinstalldjango-simple-logAdd to installed apps:INSTALLED_APPS=(...'simple_log',...)Add middleware for detecting user:MIDDLEWARE=[...'request_vars.middleware.RequestVarsMiddleware',...]Migrate:$pythonmanage.pymigrate
Package: django-simple-log-viewer
Django simple log viewer is intended to be a simple app for viewing logs generated in a django project in a simple but intuitive way.It uses default djangoLOGGINGsettingto configure and load logs. If you have your settings
as recommended by django, then you shouldn’t have to do anything else.Log columns are configured using the format setting for each log file, this app simply split up the format setting and use that to create column headers for the view page,
if you’d like to see things differently, then you need to update that setting (but make sure it conforms with what you have in the log files).It’s recommended that you put the ``message`` attribute last in your format setting.Adding it to your projectInstall with pip::pip installdjango-simple-log-viewerAddlog_viewertoINSTALLED_APPSinsettings.pyAdd Log viewer to your URL conf::path('log-viewer',include('log_viewer.urls')),ORurl('log-viewer',include('log_viewer.urls'))as the case may beVisit the log viewer URL to view your logsNote that only users with'superuser'permission can view the log page.SETTINGSTo change the name displayed on top of the navigation bar, addSITE_NAMEto yoursettings.pyand give it a string name2. If you use a different extension (from .log) for your log files, add the settingLOG_FILE_EXTENSIONtosettings.pyshowing your extension. Default value is.logNB: Make sure to add a.before the extension name3. To change the theme of the view page, extendlog_viewer/log_home.htmland set the theme name in the block theme. e.g:{% block theme%} green {% endblock %}. (Options: purple | azure | green | orange | danger)
Package: django-simple-math-captcha
Current Version: 2.0.1For Django 4, use 2.0.x. For Django < 4, use 1.1.0What is it?A multi-value-field that presents a human answerable question,
with no settings.py configuration necessary, but instead can be
configured with arguments to the field constructor.InstallationYou can do any of the following to installdjango-simple-math-captchaRunpip installdjango-simple-math-captcha.Download or “git clone” the package and runsetup.py.Download or “git clone” the package and put thesimplemathcaptchadirectory on yourPYTHONPATH.Addsimplemathcaptchato your INSTALLED_APPS in django settingsUsageFormsTo add the captcha field to your form:fromdjangoimportformsfromsimplemathcaptcha.fieldsimportMathCaptchaFieldclassMyForm(forms.Form):some_text_field=models.CharField(max_length=50)captcha=MathCaptchaField()Optionally, you can pass in the following arguments to the field to configure it.start_intThe number at which the field should begin its range of random numbers.
This value will be used passed into the creation of asimplemathcaptcha.widgets.MathCaptchaWidgetfor this field.Default value:1end_intThe number at which the field should end its range of random numbers.
This value will be used passed into the creation of ansimplemathcaptcha.widgets.MathCaptchaWidgetfor this field.Default value:10error_messagesA dictionary of error messages.  The keys you can use areinvalidandinvalid_number.invalidis the message to display when the provided answer is incorrectDefault value:"Check your math and try again."invalid_numberis the message to display when the entry is not a whole
numberDefault value:"Enter a whole number."question_tmplA string with format placeholders to use for the displayed question.Default value:"What is %(num1)i %(operator)s%(num2)i?"question_classA css class to use for the span containing the displayed question.Default value:"captcha-question"widgetThe widget instance to use, instead of the field creating an instance
ofsimplemathcaptcha.widgets.MathCaptchaWidget.  When provided,
it must be an instatiated widget, not a widget class.Additionally, when specifyingwidget, you must not specifystart_intorend_int.Default value:NoneRationaleOther math captcha fields can present questions that require decimal answers,
answers that could be negative values and that require settings.py configuration.
This project aims to provide a single field with minimal or no configuration
necessary and reduce or prevent spam form submissions.Statusdjango-simple-math-captcha is currently used in production.FeaturesSimple addition, subtraction or multiplication question for captchaNo configuration necessaryQuestion asked changes with every renderUses SHA1 hashing of answer with your SECRET_KEYUnit tests are provided in the sourceCompatibilityFor any version of Django that doesn’t support Python 3, use django-simple-math-captcha 1.0.9 or below, otherwise use 1.1.0 or above.LicenseThe django-simple-math-captcha app is released under the Apache Public License v2.
Package: django-simplemde
A markdown editor(with preview) for DjangoUse markdown editorhttps://github.com/sparksuite/simplemde-markdown-editorin django project, this project is inspired byhttps://github.com/douglasmiranda/django-wysiwyg-redactor/Getting startedinstall django-simplemdepip install django-simplemdeadd 'simplemde' to INSTALLED_APPS.INSTALLED_APPS=(# ...'simplemde',# ...)Using in modelsfromdjango.dbimportmodelsfromsimplemde.fieldsimportSimpleMDEFieldclassEntry(models.Model):title=models.CharField(max_length=250,verbose_name=u'Title')content=SimpleMDEField(verbose_name=u'mardown content')SimpleMDE optionsYou could set SimpleMDE options in settings.py like this:SIMPLEMDE_OPTIONS={'placeholder':'haha','status':False,'autosave':{'enabled':True}}Right now this plugin supportsSimpleMDE Configurations, but only the static ones(don't support js configurations likepreviewRender)for autosave option, you dont need to set it, this plugin will generate uniqueId with python's uuid.uuid4 automaticallyGet SimpleMDE instance from DOMAfter SimpleMDE initialized, you could get SimpleMDE instance from dom element like this:$('.simplemde-box')[0].SimpleMDE
Package: django-simple-menu
django-simple-menuis an entirely code based menu system, because, who
really wants to define their menus inside Django Admin?..It’s simple to use, yet provides enough flexibility to provide unlimited
children menus, per-request generation and checking of menu items, badges,
and more.QuickstartRequirements:Python 3.6+, Django 3.2+Note:While this package does support Python 3.6 and 3.7 as well as
Django 4.0, we do not test the package under these versions and may miss some
bugs.Install thedjango-simple-menupackage.Addsimple_menuto yourINSTALLED_APPS.please ensure that you havedjango.template.context_processors.requestlisted underTEMPLATES[...]["OPTIONS"]["context_processors"].Createmenus.pyinside each app you want to create a menu for and define
said menus using theMenuandMenuItemclasses you can import from
thesimple_menupackage.In your templates, load the template tags ({% load simple_menu %}) and
call{% generate_menu %}inside a block. Your context will be populated
with a new object namedmenus. You can now iterate over it to render your
menus.To quickly seedjango-simple-menuin action, check out theexample project.MoreFull documentation, including installation and configuration instructions, is
available athttps://django-simple-menu.readthedocs.io/.django-simple-menuis released under theBSD 2-Clause “Simplified” License.
If you like it, please consider contributing!django-simple-menuwas originally created by
Evan Borgstom <evan@borgstrom.ca> and was further developed by manycontributors.
Package: django-simple-menu2
django-simple-menu is an entirely code based menu system, because, who
really wants to define their menus in the django admin…It’s simple to use yet provides enough flexibility to provide unlimited
children menus, per-request generation and checking of menu items, badges,
and more.It was built from scratch over the past 3 years as part of an internal
system after we were not satisifed by all of the existing menu apps.ForkThis is the fork of the original project. Mainly because the original
project is broken for pip requirements.txt using projects. Hopefully
we can put this fork to rest as soon as possible ;-)Patches from:boekooihttps://github.com/fatbox/django-simple-menu/pull/14diegotoralhttps://github.com/fatbox/django-simple-menu/pull/13tomleohttps://github.com/fatbox/django-simple-menu/pull/12DocumentationThe documentation is located in the docs directory and can be viewed at:https://django-simple-menu.readthedocs.orgRequirementsDjango 1.3+
Package: django-simplemenu-simplified
django-simplemenu-simplifiedCloned fromhttps://github.com/althalus/django-simplemenubut make it more simpleA dead simple menu app for Django with ordering in admin interface and
ability to link menu item with model instance, view or URL.It features user-proof admin interface with links for ordering items
and limited list of available pages to link to. You should register
your views, QuerySets, model instances or URLs to populate that list.InstallationRunpython setup.py installor just place simplemenu directory
into a directory which is on your PYTHONPATH.Add'simplemenu'to yourINSTALLED_APPSsetting.Runpython manage.py syncdb.Register your pages by adding calls tosimplemenu.register.Add menu to your templates.Note that this application requires Django 1.1 or newer.TemplatesThis app has only one tag:{% get_simplemenu as [varname] %}It stores QuerySet of all menu items in a context variable. Example:{% load simplemenu_tags %}
{% get_simplemenu as menu %}
{% for item in menu %}
    <a href="{{ item.page.url }}">{{ item.name }}</a>
{% endfor %}Highlight visited menu itemsIt’s relatively simple to handle menu item that links to current
page. First, you need to have URL of the page in your template
context. The most common way to do it is to add'django.core.context_processors.request'to theTEMPLATE_CONTEXT_PROCESSORSsetting and to useRequestContextin
your views. Then you could write in your template the following:{% load simplemenu_tags %}
{% get_simplemenu as menu %}
<ul>
{% for item in menu %}
    <li {% ifequal item.page.url request.path %}class="selected"{% endifequal %}>
        <a href="{{ item.page.url }}">{{ item.name }}</a></li>
{% endfor %}
</ul>History0.1.0 (2018-11-23)First release on PyPI.