Saravanan666/pypi-org huggingface dataset:
Package: django-sendsms-pebble
A simple api to send SMS messages with django. The api is structured the same way as djangos own email api.Installationpip install django-sendsmsConfigure theSENDSMS_BACKEND(defaults to'sendsms.backends.console.SmsBackend'):SENDSMS_BACKEND = 'myapp.mysmsbackend.SmsBackend'Basic usageSending SMSs is like sending emails:from sendsms import api
api.send_sms(body='I can haz txt', from_phone='+41791111111', to=['+41791234567'])you can also make instances ofSmsMessage:from sendsms.message import SmsMessage
message = SmsMessage(body='lolcats make me hungry', from_phone='+41791111111', to=['+41791234567'])
message.send()Custom backendsCreating customSmsBackends:from sendsms.backends.base import BaseSmsBackend
from some.sms.delivery.api

class AwesomeSmsBackend(BaseSmsBackend):
    def send_messages(self, messages):
        for message in messages:
            for to in message.to:
                try:
                    some.sms.delivery.api.send(
                        message=message.body,
                        from_phone=message.from_phone,
                        to_phone=to,
                        flashing=message.flash
                    )
                except:
                    if not self.fail_silently:
                        raiseThen all you need to do is reference your backend in theSENDSMS_BACKENDsetting.
Package: django-sendsmsru
Russian backends for django-sendsmsbackends for websms.rusendsmsru.backends.websmsru.SMTPClientsendsmsru.backends.websmsru.HTTPClientbackends for infosmska.rusendsmsru.backends.websmsru.HTTPClientCHANGES0.1.9fixed setup.py installer0.1.8fixed unicode bugs in infosmska.ru http backend0.1.7fixed bugs in infosmska.ru http backend0.1.6Added infosmska.ru http backendSEO keywordsdjango отправка смс, django send russian sms, как отправить sms через django, django sms
Package: django-senex-shop
RequirementsRequires a Stripe.js account: Currently Senex Shop only supports Stripe as a payment backend.
As such the setting is permanently required.
Once more payment backends are added this will be configurable in the admin.PackagesAdd the following to your requirements.txt:Django==1.7.5
django-braces==1.4.0
django-model-utils==2.0.3
easy-thumbnails==2.2
pytz==2014.4

django-senex-shop==0.2.2SettingsConfigure your Settings:MIDDLEWARE_CLASSES = (
    '...',
    'senex_shop.cart.middleware.CartMiddleware',
    '...',
)


TEMPLATE_CONTEXT_PROCESSORS = (
    '...',
    'senex_shop.core.context_processors.get_default_shop',
    '...',
)


INSTALLED_APPS = (
    '...',
    'localflavor',
    'easy_thumbnails',
    'senex_shop',
    'senex_shop.cart',
    'senex_shop.contact',
    'senex_shop.checkout',
    'senex_shop.core',
    'senex_shop.custom',
    'senex_shop.discounts',
    'senex_shop.news',
    'senex_shop.shipping',
)


########## THUMBNAIL CONFIGURATION
# See: http://easy-thumbnails.readthedocs.org/en/latest/ref/settings/
THUMBNAIL_BASEDIR = 'thumbs'
########## END THUMBNAIL CONFIGURATION


from os import environ


########## STRIPE CONFIGURATION
# See: http://django-stripe-payments.readthedocs.org/en/latest/installation.html
STRIPE_PUBLIC_KEY = environ.get("STRIPE_PUBLIC_KEY", "pk_test_publickey")
STRIPE_SECRET_KEY = environ.get("STRIPE_SECRET_KEY", "sk_test_privatekey")
########## END STRIPEURLs:url(r'^checkout/', include('senex_shop.checkout.urls')),
url(r'^cart/', include('senex_shop.cart.urls')),
url(r'^shop/', include('senex_shop.urls')),
url(r'^account/', include('custom_auth.urls')),Finally:Run ./manage.py migrate
Run ./manage.py createsuperuser
Package: django-sentinel
django-sentinelPlugin for django-redis that supports Redis Sentinel. This is fork ofKabbageInc/django-redis-sentineldeprecated project.Installationpip install django-sentinelUsageLocation format: master_name/sentinel_server:port,sentinel_server:port/db_idIn your settings, do something like this:CACHES = {
        "default": {
            "BACKEND": "django_redis.cache.RedisCache",
            "LOCATION": "redis_master/sentinel-host1:2639,sentinel-host2:2639/0"
            "OPTIONS": {
                "PASSWORD": 's3cret_passw0rd!',
                "CLIENT_CLASS": "django_sentinel.SentinelClient",
            }
        }
    }
Package: django-sentinel-sifter
django-sentinelPlugin for django-redis that supports Redis Sentinel. This is fork oflamoda/django-sentineldeprecated project.Installationpip install django-sentinel-sifterUsageLocation format: master_name/sentinel_server:port,sentinel_server:port/db_idIn your settings, do something like this:CACHES = {
        "default": {
            "BACKEND": "django_redis.cache.RedisCache",
            "LOCATION": "redis_master/sentinel-host1:2639,sentinel-host2:2639/0"
            "OPTIONS": {
                "PASSWORD": 's3cret_passw0rd!',
                "CLIENT_CLASS": "django_sentinel.SentinelClient",
            }
        }
    }
Package: django-sentry-secure-source-map
django-sentry-secure-source-mapA middleware to ensure only Sentry can access source maps.When enabled, only requests from Sentry will be able to access source maps (any URL starting withSTATIC_URLand ending.map).For more information, seeSecure Access to Source MapsInstallationpip install django-sentry-secure-source-mapThen addsentry_secure_source_map.SentrySecureSourceMapMiddlewareto yourMIDDLEWAREinsettings.py. Ideally, it should be placed as high as possible, before tools likewhitenoise.Next, you need to configure the token. Retrieve your project's "Security Token" from the settings page, and set it asSENTRY_SECURITY_TOKEN.SENTRY_SECURITY_TOKEN="abcde12345"If the token isn't set, the middleware does nothing."Enable JavaScript source fetching"mustbe enabled in Sentry.
Package: django-seo
Seo fields for objects of any model registed in admin or for specified url.Installation:Putseoas LAST item to yourINSTALLED_APPSin yoursettings.pywithin your django project.Sync your database:./manage.py syncdbUsage:In settings.py:Add names of ModelAdmins to be override:SEO_FOR_MODELS = [
    '<app>.models.<Model>',
]In template:First of all, load the seo_tags in every template you want to use it:{% load seo_tags %}Use::{% seo <title|keywords|description> [for <object>] %}Or::{% seo <title|keywords|description> [for <object>] as <variable> %}
{{ <variable> }}Example:settings.py:INSTALLED_APPS = (
    ...
    'app',
    ...
    'seo',
)

SEO_FOR_MODELS = [
    'app.models.Object',
    'app.models.Another',
]templates/object.html:{% load seo_tags %}
<html>
    <head>
        <meta name="description" content="{% seo description for object %}" />
        <meta name="keywords" content="{% seo keywords for object %}" />
        <title>{% seo title for object %}</title>
    </head>
    <body>
        {{ object.content }}
        <h1>{% seo title for object as seo_title %}{{ seo_title }}</h1>
    </body>
</html>If you are using extendtemplates/base.html:<html>
    <head>
        <meta name="description" content="{% block description %}{% seo description %}{% endblock %}" />
        <meta name="keywords" content="{% block keywords %}{% seo keywords %}{% endblock %}" />
        <title>{% block title %}{% seo title %}{% endblock %}</title>
    </head>
    <body>
        {% block content %}{% endblock %}
    </body>
</html>templates/object.html:{% load seo_tags %}
{% block description %}{% seo description for object %}{% endblock %}
{% block keywords %}{% seo keywords for object %}{% endblock %}
{% block title %}{% seo title for object %}{% endblock %}

{% block content %}
    {{ object.content }}
{% endblock %}templates/another.html:{% load seo_tags %}
{% block description %}{% seo description for another %}{% endblock %}
{% block keywords %}{% seo keywords for another %}{% endblock %}
{% block title %}{% seo title for another %}{% endblock %}

{% block content %}
    {{ another.content }}
{% endblock %}Redsolution CMS classifiers:Content plugins
Package: django-seo2
OverviewThis is a set of powerful and flexible SEO tools for Django. It allows you
to associate metadata with:absolute pathsmodel instancesmodel classesviewsMetadata can be edited in the Django Admin in a centralised place,
but also alongside any associated models.This is however a framework, not an app. To use this library, you need to define
the metadata you want and add the output to your templates.
Everything else (retrieval, formatting, escaping, caching) is handled for you.
Therefore, you have complete control over the data you store.As requirements change, it may become necessary to add new metadata fields.
Having the metadata definition confined to a single, short class means that it
is easy to update.RequirementsPython (2.7, 3.3, 3.4, 3.5)Django (1.7, 1.8, 1.9)ExampleHere is an example of a definition:fromdjangoseoimportseoclassBasicMetadata(seo.Metadata):title=seo.Tag(max_length=68,head=True)keywords=seo.KeywordTag()description=seo.MetaTag(max_length=155)heading=seo.Tag(name="h1")subheading=seo.Tag(name="h2")extra=seo.Raw(head=True)# Adding some fields for facebook (opengraph)og_title=seo.MetaTag(name="og:title",populate_from="title",verbose_name="facebook title")og_description=seo.MetaTag(name="og:description",populate_from="description",verbose_name='facebook description')As you can see it is very flexible, but there is much more than this simple example.The full documentation can be read online athttp://django-seo2.readthedocs.org/.HistoryThis is a fork ofdjango-seo, which is no longer maintained.
Package: django-seo-admin
django-seo-admin/README.rst================Django SEO Admin================Django SEO Admin is the app for apply SEO on your websites with Django.Installing----------pip install django-seo-adminQuick start-----------1. Include the app 'seo' to INSTALLED_APP in the settings.py2. Apply migration with makemigrations and migrate for registry the model of django-seo-admin3. In the template::<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">{% load tag_seo_admin %}{% get_metadata %}</head><body><h1>Django Seo Admin</h1><body></html>4. Sign in to Admin of Django and load record to the model of django-seo-admin.Fields are:1) Type: Type tag for example: Meta and title.2) Is_property: If tag contains property "property", else contains property "name"3) Field: Value of property. For example, the property name contains value "keywords"4) Content: Contains of property. For example, for keywords contains values "django, web, framework"5. Run server
Package: django-seohelper
django-seohelperDjango SeoHelperis a pluggable application that helps you to add
meta-information to your Django templates.Soon, more information about usage.InstallationUsing pip:pip install django-seohelperUsing the source code:git clone https://github.com/kplaube/django-seohelper.git
cd django-seohelper/
python setup.py installConfiguringAddseohelperto yourINSTALLED_APPSAdding the code to your TemplateYou need to put the code below in your template file:{% load seo_helper %}
{% seo_helper request.path as meta %}<html>
<head>
    <title>{{ meta.title }}</title>

    <meta name="description" content="{{ meta.description }}" />
    <meta name="keywords" content="{{ meta.keywords }}" />
    <meta name="robots" content="{{ meta.robot_tags }}" />
</head>

...

</html>Whereseo_helperis the templatetag,request.pathis the complete path of the document andmetais the variable where SeoHelper will keep the document's metadata.Using the adminLet's suppose we want to add metadata tohttp://myblog.com/2013/01/01/hello/. So,
we need to access/admin/seohelper/document/add/and create a record with these parameters:URL:/2013/01/01/hello-world/Title:Hello World!Description:My first post.Keywords:index,followNow, when we access thehttp://myblog.com/2013/01/01/hello/, SeoHelper will restore those data from database and will show these in your page.
Package: django-separatedvaluesfield
Alternative toCommaSeparatedIntegerFieldbuilt-in field that supportsMultipleChoiceField, custom separator and returns values as list.InstallationInstall package fromPyPi:pip install django-separatedvaluesfieldOr download the archive fromGitHuband proceed to a manual installation:curl -L https://github.com/thoas/django-separatedvaluesfield/tarball/master | tar zx
cd thoas-django-separatedvaluesfield
python setup.py installAddSeparatedValuesFieldto your Django model:# models.pyfromdjango.dbimportmodelsfromseparatedvaluesfield.modelsimportSeparatedValuesFieldclassProject(models.Model):name=models.CharField(max_length=150)languages=SeparatedValuesField(max_length=150,token=',',choices=(('en','English'),('fr','French')))If your choices values are not strings, add thecastoption with the type
you want to apply on values (defaults todjango.utils.six.text_type):# models.pyfromdjango.dbimportmodelsfromseparatedvaluesfield.modelsimportSeparatedValuesFieldclassProject(models.Model):name=models.CharField(max_length=150)languages=SeparatedValuesField(max_length=150,cast=int,token=',',choices=((1,'English'),(2,'French')))If you are running Django <= 1.6, synchronize your database usingsyncdb:python manage.py syncdbIf you are running Django >= 1.7, synchronize your database usingmigrate:python manage.py migrateTheSeparatedValuesFieldbehaves like aCharFieldwhich separates values with
a token (default is,).This field is transformed as aMultipleChoiceFieldwhen you are
creating aforms.ModelFormwith your model.Usage>>>frommyapp.modelsimportProject>>>project=Project(name='Project with strings',languages=['fr','en'])>>>project.save()# save 'fr,en' in database for the column "languages">>>project.pk1>>>project=Project.objects.get(pk=1)>>>project.languages['fr', 'en']

# If you added "cast" option to the field to cast to 'int'>>>project=Project(name='Project with integers',languages=[u'1',u'2'])>>>project.save()# save '1,2' in database for the column "languages">>>project=Project.objects.get(pk=1)>>>project.languages[1, 2]ContributeFork the repositoryClone your forkCreate a dedicated branch (never ever work inmaster)Create your development environment withmake devActivate your environment withsource .venv/bin/activateMake modificationsWrite tests and execute them withmake testBe sure all test pass withtoxIf all tests pass, submit a pull request
Package: django-sequential-pagination
django-sequential-paginationPaginate ordered Django querysets sequentially with “Next” button. Fully compatible withdjango-el-pagination(but doesn’t depend on it).The pagination is performed by object ID (or any other set of fields that give strict linear order) rather than by page number. Instead of?page=2,?page=3, etc., it produces links like?from=11,?from=21and so on. This gives the following benefits:The pagination works extremely fast even on huge data sets. For example, on Postgres “normal” pagination may take seconds (or even minutes) on queries like?page=1000000.It prevents duplicates on next page when new data is injected at top and shifts page boundaries (this is especially important for AJAX pagination).The drawback is that there is no navigation to arbitrary page number and no reverse navigation, it’s always only the link to “Next page” (or nothing at the last page).Installationpip install django-sequential-paginationUsageAdddjango_sequential_paginationtoINSTALLED_APPS:# settings.pyINSTALLED_APPS=[...'django_sequential_pagination',]Pass anorderedqueryset to the template:# views.pydefrecent_posts(request):returnrender(request,"blog/posts.html",{'posts':Post.objects.all().order_by('-time','-id'),})Make sure that the ordering always has a tie breaker as the last key, otherwise you may get duplicates on page boundaries.Now, paginate objects in the template:{%loadpagination%}{%paginatepostsper_page=10aspage%}{%forpostinpage.objects%}<div>Post #{{post.id}}</div>{%endfor%}{%ifpage.next_page_url%}<a href="{{page.next_page_url}}">Next</a>{%endif%}SettingsYou can override the default settings in yoursettings.py:SEQUENTIAL_PAGINATION_PER_PAGE=20SEQUENTIAL_PAGINATION_KEY='from'# querystring key to use, as in ?from=XXXXdjango-el-paginationYou can enable endless pagination withdjango-el-paginationby putting this in the page template:{%paginatepostsper_page=10key='page'aspage%}{%forpostinpage.objects%}<div>Post #{{post.id}}</div>{%endfor%}{%ifpage.next_page_url%}<nav class="endless_container">
                <ul class="pagination"><!-- Bootstrap v3 styles -->
                        <li>
                                <a class="endless_more" href="{{page.next_page_url}}" rel="{{page.key}}">Show more</a>
                        </li>
                </ul>
        </nav>{%endif%}<script>
        $.endlessPaginate({paginateOnScroll: true});
</script>Make sure the paginationkey(orSEQUENTIAL_PAGINATION_KEY) matches yourAjaxListView.key. The defaults are different (fromandpage, respectively).Jinja2If Jinja2 is installed,django_sequential_pagination.templatetags.paginationwill be ajinja2.contextfunction.Additionally, ifdjango_jinjais installed, it will be registered automatically as a global template function, so you can use it right away:{%setpage=paginate(posts,per_page=10)%}{%forpostinpage.objects%}<div>Post #{{post.id}}</div>{%endfor%}{%ifpage.next_page_url%}<a href="{{page.next_page_url}}">Next</a>{%endif%}
Package: django-serene
READ ME, READ ME!!all the interesting & useful info goes here!!!INSTALLATIONto use django-serene simply just do:>> pip install django-sereneUSAGEIn settings.py, add ‘djangorestframework’ and ‘serene’ in INSTALLED_APPSThe use of serene is very similar to djagnorestframework :)CHANGE LOGVersion 0.0.9Update links function to support instance that is a dict and already has ‘links’Version 0.0.8Make sure django-serene uses djangorestframework==0.3.3Version 0.0.7Change UpdateOrCreateModelMixin to always return Response objectVersion 0.0.6Able to specify sub-fields in ‘include’ attribute of Serializer/Resource
Package: django-serve
django-serveA gunicorn based django runserver command.Installpython3 -m pip install django-serveand add toINSTALLED_APPS#!python
INSTALLED_APPS = [
    ...
    "django_serve.apps.ServeConfig",
    ...
]Usage./manage.py serveoptions--addrThe socket address to bind [default=127.0.0.1]--portThe socket port to bind [default=8000]--workersThe number of worker processes for handling requests [default max(1, (cpu + 1) / 2)]--nameA base to use with setproctitle for process naming [default=django]--wsgiDotted path to wsgi application [default=settings.WSGI_APPLICATION]--configThe Gunicorn config file [default=None]--log-levelThe granularity of Error log outputs (debug, info, warning, error, critical) [default=info]--logformatThe access log format (default='"%(m)s %(U)s%(q)s %(H)s" %(s)s %(B)s' same as default django runserver)--logger-classThe logger you want to use to log events [default=gunicorn_color.Logger if installed else gunicorn default one]--reload-engineWhich reload engine to use between polling or inotify (or not at all) [default=auto]CHANGES0.3.0add LOG_LEVEL env supportadd WORKERS env supportdrop Django < 3.2 supportadd Django 4.0 and 4.1 supportdrop Python < 3.8 supportadd Python 3.11 supportupdate isort and flake8 configadd rule for__future__annotations0.2.0use blackdrop Python 3.5 supportadd Django 3.2 supportadd Python 3.9 and 3.10 supportadd django-serve commandadd support for python -m django_serveinstall inotify only on linux platformadd --reload-engine and DJANGO_DEFAULT_RELOAD_ENGINE optionupdate default workers count0.1.1add gunicorn-color as required0.1.0initial implementationadd support for gunicorn config fileadd custom django reloaderadd log-level optionadd logformat configurationadd logger-class option
Package: django-servee
* On Freenode #serveeServee is a special purpose django-admin for editing content on the front end of your site.* Docs at [Read The Docs][rtd]First you should put servee in your environment:pip install django-serveeWe're also keeping a [dist server of our own][1].[1]: http://dist.servee.com/dev/or download and./setup.py developThen add servee to your installed apps.At a minimum, you want to install `servee.frontendadmin`.  This isthe admin site.  You probably also want our wysiwyg tools, and the tinymcebackend (only supported wysiwyg editor at the moment) This converts your textareasto wysiwyg areas, and that's awesome (sometimes).INSTALLED_APPS += ["servee.frontendadmin","servee.wysiwyg","servee.wysiwyg.tinymce",]Then syncdb.  Servee assumes that you're using either contrib.staticfiles or django-staticfiles (>=1.1)Make sure that you collectstatic in production.It's important to add servee urls, and you probably want to use autodiscover.from servee import frontendadminfrontendadmin.site.autodiscover()# ...url(r"^servee/", include(frontendadmin.site.urls)),At this point, you're really going to want to get into the [docs][rtd].[rtd]: http://django-servee.readthedocs.org/en/latest/index.html
Package: django-servee-gallery
Django-servee-gallery is a more complete gallery currently supporting images.It requires django-easy-thumbnails so that images can easily be resized on the fly.  It also very simple waysof overwriting the upload_to and the default_storage via these two options in your settings.pyAlso note, the default settings should suffice, and these are not required.SERVEE_INSERT_STORAGE_CLASSSERVEE_GALLERY_INSERT_UPLOAD_TOThere are no views or URLS for this project, it uses the default views, urls, and forms of the Servee ModelInsert class.Make sure to add the following to INSTALLED_APPS in your own projects::"servee_gallery","improved_inlines","easy_thumbnails",Also make sure that any content area on your site uses the |render_inline filter.See templates/flatpages/default.html in the example_project for an implementation.To try it out:1.   Download the project.2.   run python setup.py develop [requires django-servee=>0.6 which is trunk, not in PyPI]3.   cd example_project4.   python manage.py syncdb5.   python manage.py runserver6.   http://localhost:8000/login/7.   Click "edit flatpage"8.   Put your cursor in the wysiwyg window9.   Click the "add button" at the bottom left of the wysiwyg toolbar and click "gallery"10.  Upload an gallery from your computer11.  Click the gallery, then place it in your editor.
Package: django-servee-image
Django-servee-image is a more complete image application than the one in the django-servee example projectIt requires django-easy-thumbnails so that images can easily be resized on the fly.  It also very simple ways
of overwriting the upload_to and the default_storage via these two options in your settings.pyAlso note, the default settings should suffice, and these are not required.SERVEE_INSERT_STORAGE_CLASS
SERVEE_IMAGE_INSERT_UPLOAD_TOThere are no views or URLS for this project, it uses the default views, urls, and forms of the Servee ModelInsert class.To try it out:Download the project.run python setup.py develop [requires django-servee=>0.6 which is trunk, not in PyPI]cd example_projectpython manage.py syncdbpython manage.py runserverhttp://localhost:8000/login/Click “edit flatpage”Put your cursor in the wysiwyg windowClick the “add button” at the bottom left of the wysiwyg toolbar and click “image”Upload an image from your computerClick the image, then place it in your editor.
Package: django-server-autoreload
At the  top of your setting.py file in django add :from django_server_autoreload.Django_AutoReloader import Autoreload_DjangoAt the End of settings.py file add the bellow code.Avoid using keybordshort shortcuts Ctrl +s  or Ctrl + c  when using this package ,this will make the server stop responding to requests because this module kills #and creates anew dajngo  main thread for you.re_run=Autoreload_Django(reload_time="03:00",app_url="127.0.0.1:8080")re_run.refresh.start()