Saravanan666/pypi-org huggingface dataset:
Package: django-scspostgis
A bug in Django 1.3’s PostGIS adapter makes it unusable whenstandard_conforming_stringis enabled, which is the default for
PostgreSQL 9.1.A patchis available, but those not inclined to run a patched version
of Django can use this package instead. Just install it and then update
your database settings:DATABASES = {
    'default': {
        'ENGINE': 'scspostgis',
        ...
    }
}If you’re usingSouth, you’ll also need the following setting:SOUTH_DATABASE_ADAPTERS = {
    'default': 'south.db.postgresql_psycopg2',
}If you upgrade to Django 1.4, you should uninstallscspostgisand
use the standard ‘django.contrib.gis.db.backends.postgis’ engine.
Package: django-scss
THIS PACKAGE IS NOT MAINTAINED.Please usedjango-static-precompilerDjango SCSSDjango SCSS provides template tags to compile SCSS into CSS from templates.
It works with both inline code and extenal files.InstallationAdd “django_scss” to INSTALLED_APPS setting.Make sure that you have sass executable installed. See SASS official site for details.Optionally, you can specify the full path to sass executable with SCSS_EXECUTABLE setting. By default it’s set to sass.In case you use Django’s staticfiles contrib app you have to add django-scss’s file finder to theSTATICFILES_FINDERSsetting, for example :STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    # other finders..
    'django_scss.finders.SCSSFinder',
)Example UsageInline{% load scss %}

<style>
  {% inlinescss %}
    #header {
      h1 {
        font-size: 26px;
        font-weight: bold;
      }
      p { font-size: 12px;
        a { text-decoration: none;
          &:hover { border-width: 1px }
        }
      }
    }
  {% endinlinescss %}
</style>renders to<style>
  #header h1 {
    font-size: 26px;
    font-weight: bold; }
  #header p {
    font-size: 12px; }
    #header p a {
      text-decoration: none; }
      #header p a:hover {
        border-width: 1px; }
</style>External file{% load scss %}

<link rel="stylesheet" href="{{ STATIC_URL}}{% scss "path/to/styles.scss" %}" />renders to<link rel="stylesheet" href="/media/SCSS_CACHE/path/to/styles-91ce1f66f583.css" />Note that by default compiled files are saved intoSCSS_CACHEfolder under yourSTATIC_ROOT(orMEDIA_ROOTif you have noSTATIC_ROOTin your settings).
You can change this folder withSCSS_ROOTandSCSS_OUTPUT_DIRsettings.Note that all relative URLs in your stylesheet are converted to absolute URLs using yourSTATIC_URLsetting.SettingsSCSS_EXECUTABLEPath to SASS compiler executable. Default: “sass”.SCSS_ROOTControls the absolute file path that compiled files will be written to. Default:STATIC_ROOT.SCSS_OUTPUT_DIRControls the directory insideSCSS_ROOTthat compiled files will be written to. Default:"SCSS_CACHE".SCSS_USE_CACHEWhether to use cache for inline styles. Default:True.SCSS_CACHE_TIMEOUTCache timeout for inline styles (in seconds). Default: 30 days.SCSS_MTIME_DELAYCache timeout for reading the modification time of external stylesheets (in seconds). Default: 10 seconds.SCSS_USE_COMPASSBoolean. Wheter to use compass or not. Compass must be installed in your system. Run “sass –compass” and if no error is shown it means that compass is installed.Changes0.6.1Use hashlib instead of django.utils.hashcompat which is deprecated in Django 1.50.6Add staticfiles finder to serve compiled files in dev mode0.5Add SCSS_ROOT setting0.4.1Fix unicodedecodeerror with non ascii in scss file0.4Switch to staticfiles.finders when looking up the files in DEBUG mode.Fix the CWD when running scss compiler0.3Add support for lookup in STATICFILES_DIRSAllow to use Compass0.2Log SCSS compilation errorsFixed bug with paths on Windows0.1Initial release
Package: django-scylla
Django Scylla - the Cassandra & ScyllaDB backend for DjangoDjango-scylla makes possible to connect your Django app to Cassandra or ScyllaDB anduse native Django ORMas with any other relational database backend.Discord:https://discord.gg/pxunMGmDNcSponsorsHelp support ongoing development and maintenance bysponsoring Django Scylla.InstallationRecommended installation:pip install django-scyllaBasic UsageAdddjango_scyllatoINSTALLED_APPSin yoursettings.pyfile:INSTALLED_APPS = ('django_scylla',) + INSTALLED_APPSChangeDATABASESsetting:DATABASES = {
     'default': {
         'ENGINE': 'django_scylla',
         'NAME': 'db',
         'TEST_NAME': 'test_db',
         'HOST': 'db1.example.com,db2.example.com,db3.example.com',
         'OPTIONS': {
             'consistency_level': ...,
             'load_balancing_policy': ...,
             'retry_policy': ...,
             'request_timeout': 10,

         }
     }
 }Define some model:# myapp/models.py

 from django.db import models


 class Person(models.Model):
     first_name = models.CharField(max_length=30)
     last_name = models.CharField(max_length=30)Connect to ScyllaDB and create a keyspace.Run./manage.py makemigrations && ./manage.py migrateDone!LicenseCopyright (c) 2021-2022,Rafał Furmański.All rights reserved. Licensed under MIT License.
Package: django-search
ABOUTdjango-search is a django reusable app to perform custom search over a queryset in a simple way using custom tags. It is inspired by the simplicity of django-pagination (other django reusable app you should use if you aren’t) and it’s use is very similar.InstallInstall it as a normal python package using pip:pip install django-searchYou can also download the zip, uncompress it and run:python setup.py installThen you must addsearchapp in your settings.py file and you are done:INSTALLED_APPS = (
        ...
        'search'
)UsageIn order to use django-search in a template you must load search_tags:{% load search_tags %}Then place the {% search %} tag where you want the search form to be displayed. The tag has this structure:{% search queryset field1 field2 ... %}wherequerysetis a queryset object (not evaluated or sliced) andfield1 field2 …are any number of fields in your queryset model for the search to be performed. In example:{% search userlist username first_name last_name %}will search a match for the search terms in the form input in user.username, user.first_name OR user.last_name (note the OR).In deepHow the search is performedThe string typed in the input field will be splitted by spaces having single and double quotes in account without matching case, so if the string is:John "tiny mouth" 'any term'the queryset will be filtered so user.username containsJohnOR user.first_name containsJohnOR user.last_name containsJohnAND user.username containstiny mouthOR user.first_name containstiny mouthOR user.last_name containstiny mouthAND user.username containsany termOR user.first_name containsany termOR user.last_name containsany term.It’s a simple search that returns less but more accurate results as user adds search terms.How it worksThe search tag renders a template with a form using GET method that includes a text and a submit input. If the user adds a search string and clicks the button a parameter namedsearchwill be set in request.GET and your view will be called again. Then, in the second view run if the search tag finds that parameter it will filter the queryset using it’s value as search terms.StylingThe inputs rendered have two classes,search-textandsearch-buttonso you can style them as you want.Useful context variablesThe search tag puts two useful variables in context:remove_search_link: Has the link to remove the search parameter from GET keeping all other parameters that might be there so if the user hits it the queryset will be shown unfiltered again. It can be used (after the search tag) as:<a href="{{remove_search_link}}">Remove</a>search_terms: Has the seach string as it was typed by the user. It can be useful withremove_search_linkto allow the user to know what is beeing applied to the queryset this way:{% if search_terms %}
    Searching by {{search_terms}}: <a href="{{remove_search_link}}">Remove</a>
{% endif %}
Package: django-searchable
Easy full text search with Django and PostgreSQL. Sane defaults + auto creation of vector fields, indexes, and database triggers.ExampleExtend your model with theSearchableModelclass, and use theSearchableTextFieldclass to automatically setup full text search:fromdjango.db.modelsimportTextFieldfromdjango_searchable.modelsimportSearchableModel,SearchableTextFieldclassBlog(SearchableModel):author_name=TextField()# will NOT have FTS setup automaticallytitle=SearchableTextField()# will have FTS setup automaticallytext=SearchableTextField()# will have FTS setup automaticallyThen search away via the Blog manager:# takes a string of space separated termsresults=Blog.objects.search('spiderman suits')# or a list of termsresults=Blog.objects.search(['water','baskets','leaking'])# or a SearchQuery objectfromdjango.contrib.postgres.searchimportSearchQueryquery=~SearchQuery('superman')&SearchQuery('batman')results=Blog.objects.search(query).searchadds arankannotation and automatically filters and sorts the resulting queryset.By default,.searchwill search through allSearchableTextFieldfields on the model, but you can specify any subset:results=Blog.objects.search('who is venom',fields=['title'])Contributingpipenvinstall--devcreateuser-s-Ptest_user# use 'password'pipenvrun./manage.pytest
Package: django-searchable-select
django-searchable-selectA better and faster multiple selection widget with suggestions for
DjangoWhat is this?This plugin provides a replacement for standard multi-choice select on
Django admin pages.You can use this as custom widget forManyToManyField.FeaturesFiltering is performed on server side and thus significantly improves
performance.UsesTwitter Typeaheadto provide suggestion completion.Worksgreatwith ManyToMany fields that can be chosen from
thousands of thousands of choices, e. g.User - Cityrelations.BeforeBeforeAfterBeforeInstallationInstalldjango-searchable-select.$pipinstalldjango-searchable-selectAdd ‘searchableselect’ to your settings.# settings.pyINSTALLED_APPS=(# ...'searchableselect',# ...)Add URL pattern required for the suggesting engine to your rooturls.py.# urls.pyurlpatterns=patterns('',# ...url('^searchableselect/',include('searchableselect.urls')),# ...)Use the widget in your model admin class:fromdjangoimportmodels,formsfromsearchableselect.widgetsimportSearchableSelectfrommodelsimportTravelerclassTravelerForm(forms.ModelForm):classMeta:model=Travelerexclude=()widgets={'cities_visited':SearchableSelect(model='cities.City',search_field='name',limit=10)}classTravelerAdmin(admin.ModelAdmin):form=TravelerFormadmin.site.register(Traveler,TravelerAdmin)Remember toalwaysinitializeSearchableSelectwith three
keyword arguments:model,search_fieldandmany.modelis the string in formAPP_NAME.MODEL_NAMErepresenting your model in the project, e. g. ‘cities.City’search_fieldis the field within model that will be used to
perform filtering, e. g. ‘name’manymust beTrueforManyToManyFieldandFalseforForeignKey.limit(optional) specifies the maximum count of entries to retrieve.
Defaults to 10.Example appJust run the project fromexampledirectory, head tohttp://127.0.0.1:8000, login asadmin/adminand try adding Cats!Supported versionsPython 2.7.x: Django 1.7, 1.8, 1.9, 1.10Python 3.x: Django 1.8, 1.9, 1.10, 2.0Known issuesNot tested with empty fields.ContributingI’m looking forward to bug reports and any kind of contribution.LicenseYou are free to use this where you want as long as you keep the author
reference. Please see LICENSE for more info.
Package: django-search-admin-autocomplete
Simple django app that add autocomplete to search inside admin panel.RequirementsPython: 3.5+Django: >=1.11Installationpipinstalldjango-search-admin-autocomplete# ORpipinstallgit+https://github.com/linevych/django-search-admin-autocomplete.gitINSTALLED_APPS=[...'search_admin_autocomplete',...]Usagefromsearch_admin_autocomplete.adminimportSearchAutoCompleteAdminclassMyModelAdmin(SearchAutoCompleteAdmin)search_fields=['search_field',]admin.site.register(MyModel,MyModelAdmin)CustomizationIf admin/change_list.html is customizedadmin.pyfromsearch_admin_autocomplete.adminimportSearchAutoCompleteAdminclassMyModelAdmin(SearchAutoCompleteAdmin)change_list_template='admin/custom-list.html'search_fields=['search_field',]admin.site.register(MyModel,MyModelAdmin)admin/custom-list.html{% extends 'search_admin_autocomplete/change_list.html' %}

{% block object-tools %}
Your custom html...
{{ block.super }}
{% endblock %}MyPyThis project supports MyPy but to run type checks you need Python 3.6+.pipinstall-rrequirements_dev.txtPYTHONPATH="$PYTHONPATH:$PWD/example"mypysearch_admin_autocomplete
Package: django-search-and-replace
django-search-and-replaceA simple app that allows searching and replacing values in a specified set of models.Getting startedAddsearch_and_replaceto yourINSTALLED_APPSand add a url for the search and replace view.from django.urls import path
from search_and_replace.views import SearchAndReplaceView
from example.models import Cat, Dog

urlpatterns += [
    path(
        "admin/search_and_replace/",
        SearchAndReplaceView.as_view(
            models_and_fields=[(Cat, ("name", "bio")), (Dog, ("name", "bark"))]
        ),
        name="search-and-replace",
    )
]
Package: django-search-listview
Django-SearchableListView=========================[![Build Status](https://travis-ci.org/SchroterQuentin/django-search-listview.svg?branch=master)](https://travis-ci.org/SchroterQuentin/django-search-listview)[![Coverage Status](https://coveralls.io/repos/github/SchroterQuentin/Django-SearchableListView/badge.svg)](https://coveralls.io/github/SchroterQuentin/Django-SearchableListView)[![Code Health](https://landscape.io/github/SchroterQuentin/django-search-listview/master/landscape.svg?style=flat)](https://landscape.io/github/SchroterQuentin/django-search-listview/master)ListView which can be searchable, paginate and which doesn't lose query parameter and page numberInstallation------------This library need jQuery ( and Bootstrap for the frond-end )To install it in your vitualenv on your django project```{r, engine='bash', count_lines}pip install django-search-listview``````pythonINSTALLED_APPS = [...'search_listview',]```Only paginate ListView----------------------```pythonfrom search_listview.list import SearchableListViewclass ListDevicePaginate(SearchableListView):model = Devicetemplate_name = "tests/list.html"paginate_by = 10```Paginate + Searchable ListView------------------------------```pythonfrom search_listview.list import SearchableListViewclass ListDeviceSearchablePaginate(SearchableListView):model = Devicetemplate_name = "tests/list.html"paginate_by = 10searchable_fields = ["inventory_number", "model_device", "model_device__brand__provider","model_device__brand__name"]specifications = {"model_device__brand__name": "__icontains"}```Put the parameter for the query in **searchable_fields** which will be use to filter the queryset. The specifications which be use in the same way.In the template---------------- Where you want the pagination and the search box```html<div class="row">{% include "search_listview/search_and_page.html" %}</div>```- In the footer```html<!--Need jQuery--><script src="{% static 'search_listview/js/search_listview.js' %}"></script><script>start_search()</script>```Now you have a beautifull box with all the fields you need.![Alt tag](/docs/search_box.png?raw=true "Search box")
Package: django-searchly-tables
# Django-Searchly-TablesA simple Django app that adds search and sort to HTML tables.I like using simple views, but it should work with class-based views as well (but I haven't tested it).## ExampleAdd `searchly_tables` to your `INSTALLED_APPS`:INSTALLED_APPS = (...,"searchly_tables",)In your view.py, import searchly_tables, add a new table to a view,and specify for which model you would like to use it:from django.shortcuts import renderfrom example.model import ExampleModelfrom searchly_tables.tables import SearchlyTabledef view(request):table = SearchlyTable(module="exampleapp.models", model="ExampleModel", field_filters=field_filters)table.labels = {'baseField1': 'labelForBaseField1', 'foreignkey_relationship': 'labelForForeignKeyRelationship', 'baseField2': 'labelForBaseField2'}# Optional links to models in fieldstable.field_links = {'baseField2': ['app:view': 'url_parameter']}if request.POST:table.post(request.POST, filter=True, sort=True)return render(request, 'example/table.html', {'table': table})Then add the table to your template like this:<form action="#" method=POST>{% csrf_token %}{{ table.searchbar|safe }}<table>{{ table.header|safe }} {{ table.body|safe }}</table></form>And that's it! Naturally, you can change the appearance of the table by applying CSS.For instance `table.attrs['td'] = 'my_td_class'` would result in `<td class="my_td_class">` on all td elements in the table.Django-searchly-tables currently only supports classes; sorry, no direct styles as of yet.Also no direct access to a single element by id for most elements; the sole exception is `<td>`.Here's the list of elements I use in the table:> _thead_, _tbody_, _tr_, _th_, _td_, _input_, _button_, _select_, _option_## FAQ_Should I use this?_Maybe? Probably not?It's a super basic app with very little fuzz. The code is still all over the place.If that's for you, cool. If you need more options in your tabling(?),you should check out [django_tables2](https://django-tables2.readthedocs.io)._Another table app? Haven't you heard about django\_tables2? It's way better and has tons of features!_Yep, I agree. I even linked to it in my earlier answer!_So, will this support feature X in the future? I really need that._Probably not? I'm happy with the way it works now, apart from some minor issues (=code cleanup/documentation).But you're welcome to fork it, if you need feature X. Or use django_tables2 (seriously, it's great!).
Package: django-search-statistic
Installationpip install django-search-statisticAdd search_statistic to settings.INSTALLED_APPSAdd ‘search_statistic.middleware.CollectStatisticMiddleware’ to settings.MIDDLEWARE_CLASSESpython manage.py migrate search_statisticUsageIf you want specify content_type and object_pk (default only path is stored) you must add to your views:
from search_statistic.utils.visits import visit_objectdef some_view(request):obj = SomeModel.objects.get(pk=pk)visit_object(request, obj)SettingsAll settings stored in settings.SEARCH_STATISTIC.
Default value is:{‘REDIS_CACHE_SIZE’: 1,‘REDIS_PREFIX’: ‘django-search-statistic’,‘REDIS_SETTINGS’: {‘db’: 1},‘REMOVE_ON_STATUS’: [400, 403, 404, 405],‘default_query_confirm’: False,}Options REDIS_* are using only where redis are installed.
If REDIS_CACHE_SIZE <= 0 - search queries will storing in redis infinitely.
If REDIS_CACHE_SIZE == 1 - redis isn’t using
If REDIS_CACHE_SIZE >= 2 - search queries and visits are storing in cache, but after REDIS_CACHE_SIZE objects in cache they will be saved in DBIf response status code in REMOVE_ON_STATUS all visits with path == current request.path are deleteing.
Package: django-searchview-lib
django-searchviewSearchView is a multiple inheritance class of Form and ListViewWhen I wanted to make a Search Page with class based View of Django, the first choice was using FormView and ListView.
But, I wanted to display search form and results list in one page.
I needed a new view class, multiple inheritance from FormView and ListView.
I searched for it, but I couldn’t find a good solution. So I made it by myself.see below.DjangoSearchView/searchviewCode is simple and less than 100 steps. But it's very useful.How To Usehttps://gijutsu.com/en/2020/12/29/django-searchview-class/
Package: django-sebs
# django-sebs [![Build Status](https://travis-ci.org/MattBlack85/django-sebs.svg?branch=master)](https://travis-ci.org/MattBlack85/django-sebs)https://github.com/MattBlack85/django-sebsDjango Simple Email Backend for SES using boto3## Why another email backend for amazon SES?That's simple, an EmailBackend must be pluggable, must work out of the boxand must be SIMPLE.django-sebs wants to achieve this goal.## How to use itUse this email backend is very simple, just override yourEMAIL_BACKEND setting this way:- `EMAIL_BACKEND='ses.backend.SESEmailBackend'`also add 3 additional settings:- `SES_ACCESS_KEY='TestKey'` your aws access key- `SES_SECRET_KEY='SecretKey'` your aws secret key- `SES_REGION='eu-west-1'` the aws region## Using DKIMIf you want to use DKIM is enough to enable it in your aws account, that way all emails sent throughthe sebs backend will be using the dkim
Package: django-secdownload-storage
Django storage backend that can be used to serve files via lighttpd’s mod_secdownload module. This
storage backend is an extension to the reqular FileSystemStorage that will generate proper signed
download urls.Installationpip install django-secdownload-storageor:easy_install django-secdownload-storageor via source checkout:hg clone https://bitbucket.org/ionelmc/django-secdownload-storage
cd django-secdownload-storage
python setup.py installUsageIn your django models you should addstorage=SecDownloadFileSystemStorage()to the fields you
want served via secdownload.Required settings:SEC_DOWNLOAD_ENABLED = True
SEC_DOWNLOAD_SECRET_KEY = 'VERYVERYSECRET'
SEC_DOWNLOAD_MEDIA_URL = MEDIA_URL + 'dl/'Example model:import secdownload_storage

class Foo(models.Model):
  secret_picture = models.ImageField(upload_to='secret-pictures', storage=secdownload_storage.SecDownloadFileSystemStorage())You need to enable mod_secdownload and have configuration similar to this (seehttp://redmine.lighttpd.net/wiki/1/Docs:ModSecDownloadfor more info):secdownload.secret = "VERYVERYSECRET"
secdownload.document-root = "/path/to/media"
secdownload.uri-prefix = "/dl/"
secdownload.timeout = 3600Also, note that you should disallow access to those files in the lighttpd configuration as they
would be served with your regular media files. Eg:$HTTP["url"] =~ "^/media/secret-pictures" {
    url.access-deny = ("")
}ConfigurationSEC_DOWNLOAD_ENABLED - set this to False to disable signing the urls and generate them like
FileSystemStorage. This is useful for development (if you use django’s devserver).SEC_DOWNLOAD_SECRET_KEY - this is the secret key that is used to sign the requestsSEC_DOWNLOAD_MEDIA_URL - this is the prefix path that’s used instead of MEDIA_URL when
SEC_DOWNLOAD_ENABLED is set to True. If SEC_DOWNLOAD_ENABLED is set to False
SecDownloadFileSystemStorage will use MEDIA_URL for the prefix instead.
Package: django-seconds-field
django-seconds-fielddjango-seconds-fieldprovides additionalSecondsFieldtype for Django
model which storesdatetime.timedeltaobject as a number of seconds in a
database’sINTEGERtype.InstallationInstall withpiporpipenv:pipinstalldjango-seconds-fieldUsagemodels.pyfromdjango.dbimportmodelsfromdjango_seconds_fieldimportSecondsFieldclassFooBar(models.Model):ttl=SecondsField()DocumentationSeehttp://django-seconds-field.readthedocs.org/LicenseCopyright © 2019, Piotr RoszatyckiThis software is distributed under the GNU Lesser General Public License (LGPL
3 or greater).
Package: django-secrecy
Django Secrecypython 3.6+Django 2+Secrecy is a simple app which create settings structure:settings:prodacion.pydevelopment.pysecrets.json; JSON file with "secret project variables"Quick startpip install django-secrecyFrom your project root dir./generator <project_name>- to create settings structure.Runpython manage.py secrecy- to rewrite JSON with new secrets variables.Extra paramsif you need extra params usepython manage.py secrecy --add.add in settings <NEW_SECRET> = secrets.<NEW_SECRET>Params  always bee UPPER.From repo without development.pyto create basic developmet.py use./generator <project_name> --devif you don't have settings./generator <project_name> --devsame effect./generator <project_name>TODOREFACTORING :D