Saravanan666/pypi-org huggingface dataset:
Package: django-tenant-users
Welcome todjango-tenant-users, the sidekick todjango-tenantsthat sorts
out user management in a multi-tenant Django world. 🚀OverviewBuilding on the solid foundation ofdjango-tenants,django-tenant-usersfocuses on the nuances of user management across tenants. It ensures users can
authenticate globally but have permissions tailored to each specific tenant. In
essence, it’s the bridge that sorts out the user stuff in a multi-tenant setup.🔍Key Features:Global Authentication with Tenant-Specific Permissions: Authenticate once, act
based on tenant rules.Distinct Schema Permissions: Separate permissions for each tenant a user belongs
to.Seamless Integration: Works harmoniously with Django’s built-in user and
permissions frameworks.Getting StartedInstallation: Dive into ourInstallation Guideto getdjango-tenant-usersup and running.Usage: Check out theUsing Guideto see how
to make the most of the package.Core Concepts: If you’re curious about the ideas driving our design, theCore Conceptspage is a great place to start.ContributeWe ❤️ contributions! Whether it’s a bug report, a new feature, or feedback on the
project, we’d love to hear from you.Licensedjango-tenant-usersis open-source and is licensed under theMIT License.
Package: django-tencentcos-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-terminator
One-time execution of Django model methods, when model instance meets
specific conditions.Examplesimport datetime

from django.db import models
from django.db.models import Q
from terminator import execute_once


class Message(models.Model):
    sent = models.BooleanField(default=False)
    sender_email = models.EmailField()
    recipient_email = models.EmailField()
    subject = models.CharField(max_length=128)
    body = models.TextField()

    @execute_once(Q())
    def send(self):
        # Some code which sends the email…
        pass


class BirthdayGift(models.Model):
    birthday_date = models.DateField()

    @execute_once(lambda cls: Q(birthday_date__lte=datetime.date.today()))
    def send(self):
        # Some code which sends the gift…
        passLater:from terminator import terminate

terminate()For more extensive documentation, see the tests.
Package: django-terranodo-maploom
django-exchange-maploom==============This is a fork of GeoSHAPE Maploom to use with Exchange before changes are added upstream to GeoSHAPE.A Django wrapper for [MapLoom](https://github.com/boundlessgeo/MapLoom).Installation------------Install the latest stable version from PIP:```pip install django-exchange-maploom```Download django-maploom and install it directly from source:```python setup.py install```Project Configuration---------------------Once installed you can configure your project to usedjango-maploom with the following steps.Add ``maploom`` to ``INSTALLED_APPS`` in your project's``settings`` module:INSTALLED_APPS = ('maploom',# other apps)Usage-----Once installed, you can easily add maploom to any template on your site.First load the template tags in your template:{% load maploom_tags %}In the ```<head>``` section of your html section add the MapLoom js files:{% maploom_js %}Then add a map loom map to your page by placing the following tag anywhere in the ```<body>``` tags:{% maploom_html %}Adding in GeoNode-----------------To use MapLoom as your GeoNode map client, follow the Project Configuration steps above.  Next, add the MapLoom urlsto the bottom of the `urls.py` file in GeoNode and append them to the GeoNode url patterns.```from maploom.geonode.urls import urlpatterns as maploom_urlsurlpatterns += maploom_urls```**Note:** When adding `maploom` to the `INSTALLED_APPS` setting, order matters.  Django will return the first templateit finds that matches a given name, therefore be sure that the MapLoom application precedes the `geonode.maps`application in your `INSTALLED_APPS` setting.
Package: django-terra-settings
https://django-terra-settings.readthedocs.io/en/latest/Helpers and default configuration endpoints for terralego application.CHANGELOG1.0.3          (2021-04-13)Fix bug caused missing "tiles" key when creating or updating a mabpox baselayer1.0.2          (2021-02-16)Fix French translations1.0.1          (2021-02-02)Add terra permissions1.0.0          (2020-11-18)Remove functions backport in opp0.1.3          (2020-11-16)Tiles is not required anymore for add / edit mapbox base layer0.1.2          (2020-11-03)API enhancementManage raster tiles urlsAdd TileJSON url in MapBoxBaseLayerSerializer0.1.1          (2020-10-12)Fix typo preventing BaseLayerSerializer from working properly0.1.0          (2020-10-06)First release of django-terra-settings
Package: django-terra-utils
https://django-terra-utils.readthedocs.io/en/latest/Helpers and default configuration endpoints for terralego application.0.3.11 (2020-08-25)Update :Support django 3.10.3.10 (2019-12-13)Update:Update documentationSupport django 3.00.3.9 (2019-10-22)New:Extract from terra-back helper for X-Accel-Redirect, to serve medias0.3.8  (2019-10-15)Update :Delete TokenGenerator since it was splitted to single package django-token-tools0.3.7  (2019-10-11)Update :Add a TokenGenerator to allow authentication through URL0.3.5  (2019-09-24)Fixes :fix settings call0.3.1  (2019-09-24)Update :add default settings for HOSTNAME and FRONT_URL0.3.0  (2019-09-23)First release from splitted terracommon.core
Package: django-teryt
django-teryt is a Django app that implements TERYT database.
TERYT (Polish: “Krajowy Rejestr Urzędowy Podziału Terytorialnego Kraju”,
English: “National Official Register of Territorial Division of the Country”)
is a register maintained by Polish Central Statistical Office (Polish: Główny
Urząd Statystyczny; GUS). Among other things it contains:identifiers and names of units of territorial division,identifiers and names of localities,identifiers and names of streetsThis app parses XML files from GUS and it imports them to the database.
It is meant to be used as a part of a larger system.DocumentationThe full documentation is athttps://django-teryt.readthedocs.org.QuickstartInstall django-teryt:pip install django-terytIf you are using Django 1.6 or lower you have to install South:pip install 'south>=1.0'AddteryttoINSTALLED_APPSin yoursettings.pyand run:./manage.py migrate terytThen download TERYT data fromGUS website,
unpack it and then import it:./manage.py teryt_parse /path/to/WMRODZ.xml /path/to/TERC.xml /path/to/SIMC.xml /path/to/ULIC.xmlFeaturesIt can import all data from all TERYT filesIt deals with updates (just run ./manage.py teryt_parse –update TERC.xml)It keeps flag (aktywny) telling you if some record is still present in TERYT
(there are some minor changes in territorial division from time to time)SupportAll bug reports and pull requests are welcome. You can report them athttps://github.com/scibi/django-teryt/issues.  It can be in English
or in Polish ;)History0.1.0 (2013-12-31)First release on PyPI.0.2.0 (2015-01-08)Added support for Django 1.7 migrationsMoved common data to abstract base classAdded common flag filed (aktywny)Added 3 model managers to JednostkaAdministracyjnaFixed PEP 8 compliance in main source files0.3.0 (2015-01-06)Added support for Django 1.8 and 1.9Added support for SQLite and MySQL/MariaDBPython 3.4 compatibilityImproved test coverageThis is last version to support Django 1.6 and South
Package: django-teryt-tree
Django-teryt-tree is a Django app that implements TERYT database as tree by django-mptt and flat SIMC database.DocumentationThe full documentation is athttps://django-teryt-tree.readthedocs.org.QuickstartInstall django-teryt-tree:pip install django-teryt-treeThen add to INSTALLEDA__APPS:INSTALLED_APPS+=('teryt_tree')Then use it in a project:import teryt_treeor:from teryt_tree.models import JednostkaAdministracyjnaTo load TERC register database visithttp://eteryt.stat.gov.pl/eTeryt/rejestr_teryt/udostepnianie_danych/baza_teryt/uzytkownicy_indywidualni/pobieranie/pliki_pelne.aspx?contrast=defaultto download valid database. Next to execute following commands:pip install lxml
python manage.py load_teryt --input TERC.xmlTo load SIMC register download valid database. Next to execute following commands:python manage.py load_simc --input SIMC.xmlFeaturesImport database from official exports - TERC and SIMC database.Store data as modified pre-order traversal tree for effective regional querySupport format of teryt.stat.gov.pl and eteryt.stat.gov.plCookiecutter Tools Used in Making This Packagecookiecuttercookiecutter-djangopackage
Package: django-tesseractfield
django-tesseractfieldThis module fills the need of having atesseractfieldthat's usable in both
django models and forms.Makes use oftesseract.InstallationRunpip install django-tesseractfieldAddtesseractfieldto yourINSTALLED_APPSCollect static files with./manage.py collectstaticUsageTo activate tesseract transcription on your Django site, add this line to your URLconf:path('',include('tesseractfield.urls')),In your models, you can use it like this:fromdjango.dbimportmodelsfromtesseractfield.fieldsimportTesseractFieldclassMyModel(model.Model):content=TesseractField()In your foms, you can use it like this:fromdjangoimportformsfromtesseractfield.fieldsimportTesseractWidgetclassMyForm(forms.Form):content=forms.Textarea()classMeta:widgets={'content':TesseractWidget(),}Maintainers@duboisRArticlesDjango Tesseract OCR
Package: django-testclient-extensions
Extensions to Django’s built-in test client.InstallationTo install, simply run:$pipinstalldjango-testclient-extensionsOr, directly from the main repository:$pipinstall-egit+http://github.com/ikame/django-test-client-extensions.git#egg=testclient_extensionsSeeproject’s websitefor more information.History0.1.4 (jue jul 31 10:27:59 CEST 2014)Fix problem where the data is encoded twice.0.1.3 (jue jul 24 14:31:04 CEST 2014)Support for calling client.json property for all request client methods.0.1.2 (jue jul 24 11:52:48 CEST 2014)Support for calling client.json property for setting the next request content-type to json.0.1.0 (Thu Jan 30 12:36:15 CET 2014)First version!Support for calling client.login method with an user instance instead of the authentication parameters.
Package: django-test-coverage
Django Test CoverageOverviewThe test runner is an extended version of the default Django test runner. It
adds the ability to get coverage reports from defined modules or tested apps.It requires Ned Batchelder’s coverage.py:http://nedbatchelder.com/code/modules/coverage.htmlUsageSimple add the lineTEST_RUNNER = ‘django_test_coverage.runner.run_tests’to your Django settings file. If you run the test withpython manage.py test foothe test runner will evaluate all modules in the appfooand add them to the
coverage report. You can also specify a set of modules by adding the lineCOVERAGE_MODULES = (‘foo.bar’, ‘foo.baz’)to your settings file. In this examplefooshould be replaced with your
application name andbar/bazwith your module included in the reported.LimitationsThere is no implementation to wrap around Django’s PostGIS test runner.Changelog0.1 (2009-03-03)Initial Release0.2 (2012-08-07)New maintainerAdded Django 1.4 compatibilityAdded support for specifying a default set of apps to perform coverage onMisc bugfixes & cleanup
Package: django-test-curl
Django test curlWithDjango test curl, you can take your test cases and immediately try them
against an actual server via the magic of copy-paste!Django'stesting toolscome with a greattest clientyou can use to
simulate requests against views. Against deployed Django projects, if you want
to do simple requests, you would probably usecurl. If you want to use the
same syntax for both, this is the package for you.Good places to use thisThis was developed to TDD recreating an existing API in Django. If you have a
library ofcurlrequests that you need to replicate, this is perfect for
that. If you need a portable format to turn test cases into QA automation, this
is great for that too.Bad places to use thisIf the.curl(...)syntax requires lots of string formatting, you should stick
to the traditionaltest client. If the test case isn't copy-pastable, it's
not a good fit. This also means if you use randomness to generate your
requests, you'll lose that extra test coverage.Installation$pipinstalldjango-test-curlUsagefromdjango_test_curlimportCurlClientclassSimpleTest(TestCase):"""https://docs.djangoproject.com/en/stable/topics/testing/tools/#example"""defsetUp(self):self.client=CurlClient()deftest_details(self):response=self.client.curl("""curl http://localhost:8000/customer/details/""")self.assertEqual(response.status_code,200)self.assertEqual(len(response.context['customers']),5)If you're using a customClient, you can use the mixin version:fromdjango.testimportClientfromdjango_test_curlimportCurlClientMixinclassMyClient(CurlClientMixin,Client):...We support a subset of curl's functionality. For a full list and examples, see
thetests.HeadersGET/POST/PUT/DELETE/etcHTTP basic auth
Package: django-testdata
Django application providing isolation for model instances created duringsetUpTestData.Note:This package has been merged into Django and released in version
3.2 (seePR #12608).Installationpipinstalldjango-testdataMotivationDjango 1.8 introducedTestCase.setUpTestDatato allow costly generation of
model fixtures to be executed only once per test class in order to speed up
testcase instances execution.One gotcha ofsetUpTestDatathough is that test instances all share the same
model instances and have to be careful not to alter them to prevent breaking
test isolation. Per Django’sdocumentation:Be careful not to modify any objects created in setUpTestData() in your
test methods. Modifications to in-memory objects from setup work done at
the class level will persist between test methods. If you do need to modify
them, you could reload them in the setUp() method with refresh_from_db(),
for example.Reloading objects insetUp()certainly works but it kind of defeats the
purpose of avoiding database hits to speed up tests execution in the first
place. It makes little sense to fetch model instances from the database
given all the data is available in memory.This package offers a different alternative to work around this quirk ofsetUpTestData. Instead of reloading objects from the database the model
instances assigned as class attributes duringsetUpTestDataare lazily deep
copied on test case instance accesses. All deep copying during a test is done
with a sharedmemowhich makes sure in-memory relationships between objects
are preserved.UsageThe test data can be either wrapped manually by usingtestdata:fromdjango.testimportTestCasefromtestdataimporttestdatafrom.modelsimportAuthor,BookclassBookTests(TestCase):@classmethoddefsetUpTestData(cls):cls.author=testdata(Author.objects.create(name='Milan Kundera',))cls.book=testdata(cls.author.books.create(title='Nesnesitelná lehkost bytí',))Or automatically by using thewrap_testdatadecorator:fromdjango.testimportTestCasefromtestdataimportwrap_testdatafrom.modelsimportAuthor,BookclassBookTests(TestCase):@classmethod@wrap_testdatadefsetUpTestData(cls):cls.author=Author.objects.create(name='Milan Kundera',)cls.book=cls.author.books.create(title='Nesnesitelná lehkost bytí',)Under the hoodwrap_testdatawraps all attributes added toclsduring the execution ofsetUpTestData()intotestdata(attr, name=name).Once test data is wrapped the testcase instance methods can alter objects
retrieved fromselfwithout worrying about cross-tests isolation:fromdjango.testimportTestCasefromtestdataimportwrap_testdatafrom.modelsimportAuthor,BookclassBookTests(TestCase):@classmethod@wrap_testdatadefsetUpTestData(cls):cls.author=Author.objects.create(name='Milan Kundera',)cls.book=cls.author.books.create(title='Nesnesitelná lehkost bytí',)deftest_book_name_english(self):self.assertEqual(self.book.title,'Nesnesitelná lehkost bytí')self.book.title='The Unbearable Lightness of Being'self.book.save()deftest_book_name_french(self):self.assertEqual(self.book.title,'Nesnesitelná lehkost bytí')self.book.title="L'Insoutenable Légèreté de l'être"self.book.save()
Package: django-test-helper
Django Test Helper==================Django Test Helper provides some utility functions when testing Django applicationsInstallation------------Run `pip install django-test-helper`Helpers-------###authenticated_clientA context that provides a Django test Client instance with an authenticated user. It takes a username and a password as arguments.```pythonfrom django.test import TestCasefrom test_helper.utils import authenticated_userfrom django.core.urlresolvers import reverseclass MyTest(TestCase):def test_protected_view(self):with autenticated_user('username', 'pass') as client:response = client.get(reverse('protected_view')self.assertEqual(response.status, 200)```###image_fileCreates on-the-fly an image and returns it. It takes a size tuple and a color rgb tuple.```pythonfrom django.test import TestCasefrom test_helper.utils import image_fileclass MyTest(TestCase):def test_form(self):data = {'first_name': 'John','last_name': 'Smith',}image = image_file(size=(100, 100),color=(128, 128, 128))files = {'avatar': image,}form = ProfileForm(data, files)self.assertTrue(form.is_valid())```
Package: django-test-helpers
Test helpers, mostly geared around the database. Tested on Django 1.2.Installpip install django-test-helpersUsageCreate a temporary database:from testhelpers.dbmanager import TemporaryDatabase

with TemporaryDatabase(fixtures=['myfixture.json'], db_prefix='test'):
    # do some stuff
    passNoteIf you’re using Nashvegas, the TemporaryDatabase will attempt to automatically migrate your database
and preserve executed migrations.Run some commands in transactional isolation:from testhelpers.dbmanager import Transactionless

with Transactionless(fixtures=['myfixture.json']):
    # do some stuff
    pass
Package: django-testhook
A Django template tag to enable testhook attributes on HTML elements.About django-testhookThe django-testhook provides a template tag to generatedata-testhook-idfor HTML templates.This can be useful for automated testing (for eg:Webdriver.IO) to maintain a fixed entry
point, rather than having a automated test that breaks by just renaming
a CSS class or an element which can require you to re-evaluate an
XPath-selector.RequirementsDjango 1.8.x or greater, Python 2.7 or greater.InstallationInstall django-testhook with pip:$ pip install django-testhookConfigurationConfiguring django-testhookAdd the following to your settings file:INSTALLED_APPS+=('testhook',)Available settingsBy default the rendering of testhook data attributes is enabled. If you
are in the scenario you want to disable it for a certain environment
just configure it toFalse.TESTHOOK_ENABLED=FalseUsageBasic usageWithin your HTML template you must load the testhook tag in order to use
it. The testhook tag only requires a single argument in order to return
a result.{% load testhook %}<divclass="my-elem"{%testhook"test-elem"%}>I want to test this</div>This will output to the following:<divclass="my-elem"data-testhook-id="test-elem">I want to test this</div>Object UsageFor dynamic elements there is also the option to pass arguments. For eg:
given I have a product in a shopping basket with a primary key and a
slug I could use it like this:<divclass="item"{%testhook"basket"product.idproduct.slug%}>{{ product.title }}</div>It will output to:<divclass="item"data-testhook-id="basket-1-product-slug">A product title</div>
Package: django-testimonials-ds
django-testimonials_dsdjango-testimonials_ds is a Django app to use for demiansoft.Quick startAdd "testimonials" to your INSTALLED_APPS setting like thisINSTALLED_APPS=[...'testimonials',]코드를 넣고자 하는 위치에 다음을 추가 한다.{% load testimonials_tags %}
{% make_testimonials %}static/img/testimonials 폴더에 인물사진을 넣는다.context examplecontext={"theme":"mentor_ds","testimonials":{"subtitle":"What are they saying","stories":[{"photo":"testimonials-1","name":"Hyungjin Kim","job":"Dentist","desc":"훌륭하고 친절한 선생님과 좋은 내용의 커리큘럼입니다."},{"photo":"testimonials-2","name":"Jungeun Seol","job":"CEO","desc":"훌륭하고 친절한 선생님과 좋은 내용의 커리큘럼입니다."}]}}Required vendor - swiper
Package: django-testimony
A Django app that creates django-cms testimony content display plugin on a CMS page.  There is an option for static display of a specified number of testimonials or animated scrollers as well.Dependenciesdjangodjango-cmsGetting StartedThe easiest way is to usepipto install the app in your python environment like so:pip install django-testimonialThen add the plugin to your Django-CMS project at the bottom of thesettings.pyfile. Something like so:INSTALLED_APPS += ( 'testimony', )Perform the usualsyncdbandmigrateto update your database:python manage.py syncdb
python manage.py migrateAnd you are done.UsageAdd the plugin to a page and then go to your admin area to add some testimonials.  Mark the ones you want to see as published.  Thats it!Advanced UsageYou can add or change the templates available in the admin by creating a setting like the following in yoursettings.pyfile:if 'testimony' in INSTALLED_APPS:
    TESTIMONY_TEMPLATES = (
        ('testimony/list_default.html', gettext('Default list (stationary)')),
        ('testimony/rotator.html', gettext('Continuous scroll (animated)')),
        ('testimony/vticker.html', gettext('Scroll and pause (animated)')),
        )Whats next?Adding the testimonial collection form as a plugin, with optional captcha support.
Package: django-testing-base
Django Testing Base provides base Test Case and mixin classes that encapsulate common testing operations and patterns.
They do  the “right” thing whether you’re testing individual units of code or entire live pages using selenium.Read theofficial documentation.FeaturesGenerate test dataCreate and login usersCommon assertionsRun selenium tests at different browser dimensionsBase implementation of Page Object patternInstallationInstall django-testing-base using pip:pip install django-testing-baseLicenseThe project is licensed under the MIT license.
Package: django-testlink
=====Django Testlink=====A Django app to integrate php testlink 1.9.16 into Django system.Detailed documentation is in the "docs" directory.Quick start-----------1. Add "django-testlink" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'django-testlink', ]2. Include the polls URLconf in your project urls.py like this::url(r'^testlink/', include('testlink.urls')),3. Run `python manage.py migrate` to create the polls models.4. Start the development server and visit http://127.0.0.1:8000/admin/to use testlink (you'll need the Admin app enabled).5. Visit http://127.0.0.1:8000/testlink/ to participate in the poll.