Saravanan666/pypi-org huggingface dataset:
Package: django-cookies-samesite-fork
Django 2.1.x introduces support of SameSite flag for session and csrf cookie.Unfortunately, this functionality will not be ported to older versions of Django e.g. 1.11.x.This repository contains a middleware which automatically sets SameSite attribute for session and csrf cookies in legacy versions of Django.QuickstartInstall django-cookies-samesite:pip install django-cookies-samesiteAdd the middleware to the top ofMIDDLEWARE_CLASSES:MIDDLEWARE_CLASSES=('django_cookies_samesite.middleware.CookiesSameSite',...)Set your preferred SameSite policy insettings.py:SESSION_COOKIE_SAMESITE='Lax'This can be ‘Lax’, ‘Strict’, or None to disable the flag.Also, you can set this flag in your custom cookies:SESSION_COOKIE_SAMESITE_KEYS={'my-custom-cookies'}After that you should be able to see SameSite flag set for session and csrf cookies:
![screenshot]()Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2018-05-16)First release on PyPI.
Package: django-cool-pagination
django-cool-paginationdjango-cool-paginationis simple pagination app that saves your time.WARNING:The project is still on development stage, some things may not work properly.PrerequisitesCurrently it supports Bootstrap 4.x only. So that you have to addBootstrap4to your project.FeaturesDynamic query string creationLength auto controlFully customizable(aspiring)InstallationInstallingpippip install django-cool-paginationsetup.pygit clone https://github.com/joe513/django-cool-pagination.git
cd django-cool-pagination
python setup.py installSetting upAdd toINSTALLED_APPSINSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    
    'django_cool_paginator'Make surerequestis incontext_processors'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',UsingViewFBV (Function based view)def listing(request):
    contact_list = Contacts.objects.all()
    paginator = Paginator(contact_list, 25)

    page = request.GET.get('page')
    page_obj = paginator.get_page(page)
    return render(request, 'list.html', {'page_obj': page_obj})CBV (Class based view)class Listing(ListView):
    model = Item
    paginate_by = 5Template{% load cool_paginate %}

{% for contact in page_obj %}
    ...
{% endfor %}

{% cool_paginate page_obj=ENTER HERE YOUR PAGE OBJECT! %}Note:You don't have to specifypageif its name ispage_objas default.CustomizationYou can customize it so that it works as you want. Customize it by defining settings either in setting.py or
inside of{% cool_paginate %}setting.pyCOOL_PAGINATOR_NEXT_NAME- Name for "next" button in pagination bar.COOL_PAGINATOR_PREVIOUS_NAME- Name for "previous" button in pagination barCOOL_PAGINATOR_SIZE- Size of pagination bar (choose: "LARGE" or "SMALL")COOL_PAGINATOR_ELASTIC- What page width is elastic mode enabled from?{% cool_paginate page_obj next_name previous_name size elastic %}page_obj- Type here your page object.next_name- Name for "next" button in pagination bar.previous_name- Name for "previous" button in pagination barsize- Size of pagination bar (choose: "LARGE" or "SMALL")elastic- What page width is elastic mode enabled from?Note:{% cool_paginate %}has a priority,django-cool-paginationwill firstly look at this, after at setting.pyLicenseThis project is licensed under the MIT License - see the LICENSE file for detailsinspired byinoks/m3u8
Package: django-coop
django-coopAn work-in-progress to build collaborative organizations management server for the Social and Solidarity Economy Sector.
Django-coop manages organizations, contact informations, members, relations between organizations, places, impact areas, tags, categories, exchanges (products, services, partnerships).
It feeds selected data through a D2R server to a RDF aggregation platform that can acts as a hub for different networks.Installation intructions are (in french…)  on thewiki.Licensedjango-coop uses the same license as Django (BSD).
django-coop development is currently funded byCREDIS, FSE (European Social Fund) andConseil Regional Auvergne.
Package: django-copy
django-copyProbably the smallest and simplest djangocopy for Django.While it is extremely simple, it supports some features that I haven't found in other djangocopy frameworks out there. Namely you can create pages formultiple languagesbut also formultiple locationsor any conbination of bothUsageInstallationUse pip to instal the latest stable releasepip install django-copyYou can also install a local copy by runningsetup.py installat the top directory of django-copyAdddjangocopyand dependencies toINSTALLED_APPSin the project settings (see dependencies below)INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.sites',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.humanize',
    'django.contrib.sitemaps',

    ...

    'ckeditor',
    'ckeditor_uploader',
    'simple_history',
    'djangocopy',

    ...
]

...

3. Setup `DJANGOCOPY_TEMPLATES` and `DJANGOCOPY_IMAGES` to define where uploaded template and image files are stored. 

For example:

    ```
    DJANGOCOPY_TEMPLATES = 'djangocopy/templates/'
    DJANGOCOPY_IMAGES = 'djangocopy/images/'
    ```

These paths will sit below `MEDIA_ROOT`

4. Add the  media folder to the `DIRS` list in `TEMPLATES` in order to serve uploaded templates. For example (if `DJANGOCOPY_TEMPLATES` is set as above:

    ```
    TEMPLATES = [
        {
            ...
            'DIRS': ['media/'],
            ...
        },
    ]
    ```

5. Add `djangocopy.middleware.LocalisationMiddleware` to `MIDDLEWARE` in the project settings file (OR see alternative below)

6. If not set already, set `MEDIA_ROOT` and `MEDIA_URL` in settings


### Dependencies:

Django-copy depends on the following packagesmarkdown
django-jsonfield
django-simple-history
django-ckeditor
django-ckeditor-filer# django.contrib.auth settings
#

LOGIN_URL = '/accounts/login'
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/accounts/login'


# CKEditor
#

CKEDITOR_BASEPATH = "{}ckeditor/ckeditor/".format(STATIC_URL)
CKEDITOR_UPLOAD_PATH = 'uploads/'

CKEDITOR_CONFIGS = {
    ...
}Inurls.pyaddpath('ckeditor/', include('ckeditor_uploader.urls')),
path('accounts/', include('django.contrib.auth.urls')),
path('filer/', include('filer.urls')),
path('djangocopy/', include('djangocopy.urls')),Optional:Localisation MiddlewareIf you follow step 6 above, all views in the project will get access to the content stored in the djangocopy app. That carries a small overhead so if you want to avoid that you can instead add@decorator_from_middleware(LocalisationMiddleware)to each of the views that will require access to DB stored content.For example:from django.utils.decorators import decorator_from_middleware
from djangocopy.middleware import LocalisationMiddleware

@decorator_from_middleware(LocalisationMiddleware)
def my_view
    ...Open source licensesThis product depends on the following software and media packagesGeoLite2 data created by MaxMind, available fromhttp://www.maxmind.comFont Awesome fonts version 4.7 is licensed underSIL OFL 1.1and theMIT LicenseBootstrap version 4.0 is licensed under theMIT License
Package: django-copyblock
Copyblock came out of a desire of mine to separate the copy for a site
I’m working on from the site templates. Things like welcome messages,
intro copy for forms, etc. This is copy I’d like to be able to tweak
easily over time without having to redeploy the entire site to make it
happen. What I wanted was a system kindof like gettext, but without .po
files, the weird syntax, and a separete app to generate the right files.What I wanted was really simple: a directory of text files, optionally
inMarkdown, that could be inserted into my app templates with a
template tag. That’s what Copyblock does.InstallationFrom Pypi:% pip install django-copyblockFromGithub:% pip install -e git://github.com/sivy/django-copyblock.git#egg=copyblockUsageCreate a root directory for your copyblock files:%  mkdir copy/dirAdd this path to your settings file:COPYBLOCK_ROOT='path/to/your/copy/dir'In your templates:{% copyblock filename %}This will do the following:Look for copy/dir/filename.markdownRun the file filename.markdown through markdownCache the output for future lookupsInsert the output in the rendered templateRight now, copyblock only does markdown. If your copy is not in markdown
(plain text), you can pass in thenomarkdownparameter to the
template tag:{% copyblock filename nomarkdown %}Also, if you don’t want to use the in-memory cache (load copy from file
every time, good for copy editing), pass in thenocacheparameter:{% copyblock filename nocache %}When working on site copy, it can be helpful to turn off the Copyblock
cache completely with (insettings.py):COPYBLOCK_CACHE=FalseServing Copyblock FilesCopyblock provides a simple app that will serve Markdown files in your
COPYBLOCK_ROOT on the url endpoint of your choosing:Insettings.py, set the template name (in your main application) to
render markdown files through:COPYBLOCK_TEMPLATE='template.html'This template should contain anoutputtemplate variable, like so:{{ output|safe }}Inurls.py, add:urlpatterns += patterns('',
    url(r'^site/(?P<path>.+)',   include('copyblock.urls',  namespace="copyblock",  app_name='copyblock')),
)The path can be whatever you choose.Now, accessinghttp://mysite.example.com/site/name-of-markdown-filein
your browser will load the content of the@TODOAdd support for other text formats, or even HTML (suggestions,
request?steve@wallrazer.com)A view that will render any file insettings.COPYBLOCK_ROOTthrough the site’s base template (base.html) under a path
determined byurls.py. IE,/path/to/copy/dir/foo.markdownwould be viewable atyoursite.com/somepath/foo. Or, something
like that. [DONE]
Package: django-copyright
# django-copyright[django-copyright](https://github.com/arteria/django-copyrigh) keeps your site's copyright notice up-to-date. Forever and ever.## InstallationInstall copyright from the PyPI using:pip install django-copyrightAdd `copyright` to your `INSTALLED_APPS`INSTALLED_APPS = ('copyright',)set a `COPY_START_YEAR` in the django settings (this is an ingeter)COPY_START_YEAR = 2009to span a range.## UsageLoad copyrighttags in the template with `{% load copyrighttags %}`, afterwards place `{% getCopyrightYears %}` in the template, this will render a string like "2009 - 2012" or "2012" in case ``COPY_START_YEAR`` is not definied in your project settings.
Package: django-copy-tables
django-copy-tablesThis utility allows for copying tables from a production/staging server to a development copy. This allows developing against full datasets.InstallationIt's on pypi, so install via pip (or add to your requirements.txt)pip3 install django-copy-tablesin your settings.pyadd to your INSTALLED_APPS "django_copy_tables"add a line:TABLE_COPY_PASSWORD="a password"at the end of your urls.py add:from django_copy_tables import get_table
urlpatterns.append(path('copyTables', get_table))UsageOnce your source distribution has been updated and the view/password is live, then on your local install you can use the standard manage.py with the command copyTablesThe general syntax is:./manage.py copyTables <module name> <table name> <src url> <copy pass> [--clear] [--step X] [--ignore colname]For example if you have a table named Author in module named Blog athttp://my.blogwith copy password zz11 you can copy that table to your local machine with:./manage.py copyTables Blog Author http://my.blog zz11By default it does not delete records locally, but will overwrite local records with the same primary key as the remote. To delete the local records before syncing use --clear.By default it will copy 100 records at a time. If your records are large you may want to set --step to something lower.If you are syncing a table with complex data structures (looping generally) sometimes you need to ignore a foreign key column to get the initial record loaded, load some other data, then load it again without ignoring. that is what the --ignore flag is for. it will ignore the column completly (the model will be set to the default generally.) Run it again without the clear or ignore flags after the other data is in place.
Package: django-core
[<img src="https://travis-ci.org/InfoAgeTech/django-core.png?branch=master">](http://travis-ci.org/InfoAgeTech/django-core)[<img src="https://coveralls.io/repos/InfoAgeTech/django-core/badge.png">](https://coveralls.io/r/InfoAgeTech/django-core)[<img src="https://badge.fury.io/py/django-core.png">](http://badge.fury.io/py/django-core)[<img src="https://pypip.in/license/django-core/badge.png">](https://github.com/InfoAgeTech/django-core/blob/master/LICENSE)django-core===========django-core is a python tools module written for django.Intallation===========Install via [pypi](https://pypi.python.org/pypi/django-core):pip install django-coreDocumentation=============- [http://django-core.readthedocs.org](http://django-core.readthedocs.org)View Mixins-----------Below are the view mixins within django-core.### AuthorizationTokenRequiredViewMixinThe view mixin that requires an authorization token.**Example Usage**```from django.views.generic.base import TemplateViewfrom django_core.auth.views import AuthorizationTokenRequiredViewMixinclass MyView(AuthorizationTokenRequiredViewMixin, TemplateView):template_name = 'path/to/template.html'```Settings========1. ``CORE_BASE_HTML_EMAIL_TEMPLATE``: This is the default path to the html template to use for emails.  The template must call the ``{{ email_content }}`` variable as this is the placeholder for the actual email content. This defaults to ``django_core/mail/base_email.html``.Tests=====From the ``tests`` directory where the manage.py file is, run:python manage.py testRun tests and output test coverage (requires ``coverage`` lib: ``pip install coverage``):coverage run manage.py test && coverage report --rcfile=../.coveragerc
Package: django-core-helpers
Django Core HelpersQuickstartInstallpip install django-core-helpersPrerequisitesYou will need:python3.8(seepyproject.tomlfor full version)djangowith version3.0DevelopmentWhen developing locally, we use:editorconfigplugin (required)poetry(required)pyenv(required)pycharm 2017+orvscodeDocumentationFull documentation is available here:docs/.
Package: django-coreplus
🚀 Django Core PlusDescriptionDjango functional modules.InstallationWithin a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.UsageUse examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.SupportTell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.RoadmapIf you have ideas for releases in the future, it is a good idea to list them in the README.Test and BuildTodoContributingState if you are open to contributions and what your requirements are for accepting them.For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.Authors and acknowledgmentShow your appreciation to those who have contributed to the project.LicenseFor open source projects, say how it is licensed.Project statusIf you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
Package: django-cos-storage
Django TencentCOS Storage腾讯云对象存储（COS）服务 for Django。环境要求Python: >=3.7, <4Django: >=2.2, <3.3安装pip install django-tencentcos-storage基本使用在项目的 settings.py 中设置DEFAULT_FILE_STORAGE：DEFAULT_FILE_STORAGE="tencentcos_storage.TencentCOSStorage"此外，还需要设置腾讯云对象存储服务相关的必要信息：TENCENTCOS_STORAGE={"BUCKET":"存储桶名称","CONFIG":{"Region":"地域信息","SecretId":"密钥 SecretId","SecretKey":"密钥 SecretKey",}}详情可参考腾讯云对象存储官方文档设置示例TENCENTCOS_STORAGE={# 存储桶名称，必填"BUCKET":"存储桶名称",# 存储桶文件根路径，选填，默认 '/'"ROOT_PATH":"/",# 上传文件时最大缓冲区大小（单位 MB），选填，默认 100"UPLOAD_MAX_BUFFER_SIZE":100,# 上传文件时分块大小（单位 MB），选填，默认 10"UPLOAD_PART_SIZE":10,# 上传并发上传时最大线程数，选填，默认 5"UPLOAD_MAX_THREAD":5,# 腾讯云存储 Python SDK 的配置参数，详细说明请参考腾讯云官方文档"CONFIG":{"Region":"地域信息","SecretId":"密钥 SecretId","SecretKey":"密钥 SecretKey",}}说明BUCKET存储桶名称，必填ROOT_PATH文件根路径，选填，默认为 '/'UPLOAD_MAX_BUFFER_SIZE上传文件时最大缓冲区大小（单位 MB），选填，默认 100。
其中缓冲区是一个线程安全队列，队列的元素为单个文件分块，队列中所有分块的大小加起来不超过UPLOAD_MAX_BUFFER_SIZE。UPLOAD_PART_SIZE上传文件时分块大小（单位 MB），选填，默认 10。UPLOAD_MAX_BUFFER_SIZE和UPLOAD_PART_SIZE共同决定了缓冲队列的大小，即QueueSize=UPLOAD_MAX_BUFFER_SIZE/UPLOAD_PART_SIZE。UPLOAD_MAX_THREAD并发上传的最大线程数，选填，默认 5。
当文件的大小超过UPLOAD_PART_SIZE时将使用分块的方式并发上传文件，此配置项设置并发上传的最大线程数。如果文件大小不超过UPLOAD_PART_SIZE，则不会使用分块的方式上传，此时该配置项不起任何作用。CONFIG腾讯云对象存储 Python SDK 的配置参数，其中Region、SecretId、SecretKey为必填参数。关于配置参数的详细说明请参考腾讯云对象存储 Python SDK 官方文档
Package: django-coturn
Django Coturn is a Django app to synchronize django admins/users with Coturn’s user database. Coturn is an open-source STUN/TURN/ICE server.https://github.com/coturn/coturnQuick startAdd “coturn” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    "django_coturn",
]Create an emptycoturndatabaseConfigure the following in your settings.py:DATABASES = {
    ... your default and auxilary database configs
    "coturn": env.db("COTURN_DATABASE_URL")
}

COTURN_REALM = "turn.example-domain.com"
COTURN_SECRET_KEY = "127 character secret"Runpython manage.py migrateto create the coturn models.Runpython manage.py sync_coturn {turn_secret,turn_admin,turn_user}to sync users/admin data to coturn tables. You only need to do this once per table - subsequent updates will be handled by Django signals.Contributor’s GuideCreate a development environment (requires docker & docker-compose):make devRun tests and generate a coverage report:make testsRunblacklinter:make lint
Package: django-couchdb-storage
A couchdb storage backend for DjangoFor each upload, a new document with the file attached is created.SetupInstall this package with pip:pip install -U django-couchdb-storageAdd it to your INSTALLED_APPS in django settings:INSTALLED_APPS=[...'couch',]And and configuration to point django to your couchdb:DEFAULT_FILE_STORAGE='couchdb_storage.CouchDBStorage'COUCHDB_HOST='http://127.0.0.1:5984'COUCHDB_DATABASE='django_storage'COUCHDB_USER=''COUCHDB_PASSWORD=''ConstraintsRight now, this package assumes that content from the storage database can be read anonymously. Writes are authenticated. It is also assumed, that the db host can be accessed publicly.
Package: django_couchdb_utils
READMEThis project’s goal is to replace the RDBMS specific backends used in Django
withCouchDBusingCouchdbkit.Currently it has a moderately tested:Auth backendSession backendCache backendEmail Cache backendwraps another email backend and caches mails that could not be sentOpenID consumer usingCouchDBstore (requiresdjango-openid)To use this library, install Couchdbkit and reference it in yourINSTALLED_APPSinsettings.pyINSTALLGeneral InstructionsReference thedjango_couchdb_utilsapps into yourINSTALLED_APPSinsettings.py:...
"django_couchdb_utils.auth",
"django_couchdb_utils.sessions",
"django_couchdb_utils.cache",
...To theCOUCHDB_DATABASES(which is used by Couchdbkit) add the couchdb utils apps that you plan to use:('django_couchdb_utils_auth',     'http://127.0.0.1:5984/authdb'),
('django_couchdb_utils_sessions', 'http://127.0.0.1:5984/sessionsdb'),
('django_couchdb_utils_cache',    'http://127.0.0.1:5984/cachedb'),
...If your do not use Couchdbkit otherwise, just add the following to yoursettings.py:COUCHDB_DATABASES = (
  ('django_couchdb_utils_auth', 'http://127.0.0.1:5984/somedb'),
  ...
)As the library doesn’t make any assumptions about the Ids of the CouchDB
objects it stores, it is safe to use it with an already existing database.To enable authentication support add theAUTHENTICATION_BACKENDSattribute insettings.pylike:AUTHENTICATION_BACKENDS = ('django_couchdb_utils.auth.backends.CouchDBAuthBackend',)To enable cache support add theCACHE_BACKENDattribute insettings.pylike:CACHE_BACKEND = "cache.couch://"To enable sessions support add theSESSION_ENGINEattribute insettings.pylike:SESSION_ENGINE = "django_couchdb_utils.sessions.couchdb"To enable the CouchDB email caching backend, set theEMAIL_BACKENDattribute insettings.pylike:EMAIL_BACKEND = "django_couchdb_utils.email.CouchDBEmailBackend"# the backend that should be wrapped by the CouchDB caching backend
COUCHDB_EMAIL_BACKEND = ‘django.core.mail.backends.filebased.EmailBackend’
Package: django-councilmatic-notifications
This is a Django app with notification functions for theCouncilmatic family, a set of web apps for keeping tabs on local city council. It is built upon the open civic data standard, and ultimately makes Councilmatic easier to re-deploy in new cities.TheCouncilmatic familyincludes:Philly Councilmatic (the original & first Councilmatic, by Mjumbe Poe. since it preceded django-councilmatic, it does not use django-councilmatic)Chicago Councilmatic (launched & built on django-councilmatic)New York City Councilmatic (launched & built on django-councilmatic)Councilmatic in your cityIf you’re interested in bringing Councilmatic to your city,contact us! We’d love to help.TeamDavid Moore - project managerForest Gregg - Open Civic Data (OCD) and Legistar scrapingCathy Deng - data models and loadingDerek Eder - front endEric van Zanten - search and dev opsContributionsWe are continuing to improve django-councilmatic, & we welcome contributions in the form ofgithub issues(bug reports, feature requests, general questions) & code contributions.How to contribute code:Fork the projectMake your feature addition or bug fixBonus points for running tests to check python style (pip install flake8& thenflake8 .)Send a pull request! Don’t worry if it isn’t perfect - think of a PR as a start of a conversation, rather than a finished productCopyrightCopyright (c) 2015 Participatory Politics Foundation and DataMade.
Released under theMIT
License.