Saravanan666/pypi-org huggingface dataset:
Package: django4-docs
django4-docsallows to serve Sphinx generated docs directly from Django.This is a fork of django-docs and was updated to work with Django 4.DependenciesPython 2.7-3.6 for Django 1.8 - 1.11Python 3.4-3.6 for Django 2.0 or higherCreditsThis fork on GitHub:jonasbohmann/django4-docs/Original Project on GitHub:littlepea/django-docsDocumentation on Read The DocsMaintained byEvgeny DemchenkoInstallationInstalldjango-docspackage:pip install django-docsAdddocsto INSTALLED_APPS in settings.py:INSTALLED_APPS = (
    ...
    'docs',
    ...
)Adddocs.urlsto urls.py:urlpatterns = [
    ...
    url(r'^docs/', include('docs.urls')),
    ...
]Customize configuration:DOCS_ROOT = os.path.join(PROJECT_PATH, '../docs/_build/html')
DOCS_ACCESS = 'staff'ConfigurationDOCS_ROOT (required)Absolute path to the root directory of html docs generated by Sphinx (just like STATIC_ROOT / MEDIA_ROOT settings).DOCS_ACCESS (optional)Docs access level (public by default). Possible values:public - (default) docs are visible to everyonelogin_required - docs are visible only to authenticated usersstaff - docs are visible only to staff users (user.is_staff == True)superuser - docs are visible only to superusers (user.is_superuser == True)Running the testsMake sure to installtest_requirements.txtfirst:pip install -r test_requirements.txt
pip install -e .You can run the tests with via:python setup.py testor:python docs/tests/runtests.pyTo run all tests against different versions of Django simply run:toxRunning the example projectMake sure to installrequirements.txtfirst:virtualenv env
. env/bin/activate
pip install -r test_requirements.txt
pip install -e .You can run the example project with via:cd example
python manage.py migrate
python manage.py runserverScreenshot
Package: django4-js-urls
Django4-js-urlsis a lightweight Django application allowing to easily get absolute path
references matching given URL names and optional parameters on the client side - just likereversedoes, but in a
Javascript fashion.Table of ContentsMain requirementsInstallationUsageSettingsJS_URLSJS_URLS_FUNCTION_NAMEAuthorsLicenseMain requirementsPython 3.8+, Django 3.2+.InstallationTo install Django4-js-urls, please usepip(orpipenv) as follows:$pipinstalldjango4-js-urlsOnce installed you just need to addjs_urlstoINSTALLED_APPSin your project’s settings
module:INSTALLED_APPS=(# other apps'js_urls',)URLs that are included in the Javascript helper tool are configured using a singleJS_URLsetting. This setting can embed URL namespaces or specific URL names that should be included in the
generated Javascript file. For example:JS_URLS=('admin','blog:article_list','blog:article_detail',)Important:only URLs defined in this setting will be included in the generated Javascript file.
You don’t want to exposeallthe URLs of your Django project in a Javascript file.Then you can include the view responsible for generating the Javascript file in your URLs root
module:fromjs_urls.viewsimportJsUrlsViewurlpatterns=[# other urlsurl('js-urls/$',JsUrlsView.as_view(),name='js_urls'),]And finally you can include the Javascript script in your base template as follows:<scriptsrc="{% url 'js_urls' %}"type="text/javascript"></script>UsageURLs included in the generated Javascript file can be used in your scripts by using thewindow.reversefunction. Here are some example:consturl1=window.reverse('home');consturl2=window.reverse('blog:article_list');consturl3=window.reverse('blog:article_detail',articleId);consturl4=window.reverse('blog:article_detail',[articleId,]);consturl5=window.reverse('blog:article_detail',{pk:articleId});SettingsJS_URLSDefault:[]TheJS_URLSsetting allows to define URL namespaces or specific URL names that should be
included in the generated Javascript file.JS_URLS_FUNCTION_NAMEDefault:'reverse'TheJS_URLS_FUNCTION_NAMEsetting allows customize the name of the function used to reverse
URLs on the client side. This function is made available through thewindowglobal object.Authorsimpak Finance <tech@impakfinance.com>.LicenseMIT. SeeLICENSEfor more details.
Package: django4-keycloak
Django app to add Keycloak  support to your project.Read documentationhttp://www.keycloak.org/An showcase/demo project is added in theexample folder.DevelopmentInstall development environment:$makeinstall-pythonWriting docsDocumentation is written using Sphinx and maintained in the docs folder.To make it easy to write docs Docker support is available.First build the Docker container:$dockerbuild.-fDockerfileDocs-tdjango-keycloak-docsRun the container$dockerrun-v`pwd`:/src--rm-t-i-p8050:8050django-keycloak-docsGo in the browser tohttp://localhost:8050and view the documentation which get
refreshed and updated on every update in the documentation source.Create release$gitcheckoutmaster$gitpull$bumpversionrelease$makedeploy-pypi$bumpversion--no-tagpatch$gitpushoriginmaster--tagsRelease Notesunreleasedv0.1.2-devv0.1.1Added support for remote user. Handling identities without registering a User
model. (thanks tobossan)Addes support for permissions using resources and scopes.
(thanks tobossan)Added example project.Updated documentation.v0.1.0Correctly extract email field name on UserModel (thanks toswist)Add support for Oauth2 Token Exchange to exchange tokens with remote clients.
Handy when using multiple applications with different clients which have to
communicate with each other.Support for session iframe
Package: django4-recaptcha-admin-login
Django4_reCAPTCHA_admin_login_pageWill add an reCAPTCHA field to Django Admin Login Page to provide a more secure page========================================================================Steps to fast deployment:Sign up for reCAPTCHAGoogle reCAPTCHA.Install using: pip3 install django4-recaptcha-admin-loginAdd 'django4_recaptcha_admin_login' and 'captcha' to your INSTALLED_APPS in settings.pyINSTALLED_APPS = [
    ...,
    'django4_recaptcha_admin_login',
    'captcha',
    ...
]Add the Google reCAPTCHA keys generated in step 1 to your Django production settings with RECAPTCHA_PUBLIC_KEY and RECAPTCHA_PRIVATE_KEY.Example: in settings.py:RECAPTCHA_PUBLIC_KEY = os.environ.get('RECAPTCHA_PUBLIC_KEY')
RECAPTCHA_PRIVATE_KEY = os.environ.get('RECAPTCHA_PRIVATE_KEY')And in env.py:os.environ.setdefault('RECAPTCHA_PUBLIC_KEY',
                      'your public key')
os.environ.setdefault('RECAPTCHA_PRIVATE_KEY',
                      'your private key')Edit project urls.py file and change the import of admin:From:from django.contrib import adminTo:from django4_recaptcha_admin_login import adminThis is all.This package is depending on django-recaptcha 3.0.0 package.
For extended informations and suport for django-recaptcha please see:https://pypi.org/project/django-recaptcha/This package was tested on Django==4.1.2 and Python 3.10.8
Package: django-503
Django 503==========An app to show 503 error page, while your django site is on maintenance.Sometimes you just need to temporarily stop your site to do some maintenance,maybe to run migrations, update packages, or something like that. Quick and easy solution is to set upa 503 error page for all requests. It should show human-friendly text for your site visitors,saying that site will be back online very soon, while you're working on it at the moment.After maintenance is over you can promptly turn 503 error page off.``503 Service Unavailable`` is a valid http response:The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.The implication is that this is a temporary condition which will be alleviated after some delay.It works well with search engine crawlers, your page index will stay intact if your maintenance doesn't last far too long.Installation------------Django-503 works with python>=2.5 and django>=1.2Recommended way to install is pip::pip install django-503* Add ``django_503`` to ``INSTALLED_APPS`` in settings.py::INSTALLED_APPS = (...'django_503',...)* Add ``'django_503.middleware.MaintenanceMiddleware'`` to your ``MIDDLEWARE_CLASSES``after session and auth middlewares like this::MIDDLEWARE_CLASSES = (...'django.contrib.sessions.middleware.SessionMiddleware','django.contrib.auth.middleware.AuthenticationMiddleware',...'django_503.middleware.MaintenanceMiddleware',)* Run ``python manage.py syncdb``* Make sure you use ``admin.autodiscover()`` to enable project ``admin.py``.Usage-----You can turn on maintenance mode by changing app config via django admin interface.It's located at url ``/admin/django_503/config/`` relative your site URL .Setting `mainteneance` to True will turn 503 error page for regular users.Admins will see a warning on top of every html page, stating site is on maintenance now,so that they can still access site and not forget to switch 503 mode off.Template overriding~~~~~~~~~~~~~~~~~~~* To change 503 error page looks you should override ``503.html`` template.* To change admin warning message you should override ``admin_warning.html`` template.Tests-----To run app testsuite use::python setup.py test django-503
Package: django5.0-oss-storage
Django AliCloud OSS Storagedjango-oss-storageprovides a Django AliCloud OSS file storage.FeaturesDjango file storage for AliCloud OSSDjango static file storage for AliCloud OSSWorks in Python 2 & 3InstallationInstall$pipinstalldjango-oss-storageAdd'django_oss_storage'to yourINSTALLED_APPSsettingSet yourDEFAULT_FILE_STORAGEsetting to"django_oss_storage.backends.OssMediaStorage"Set yourSTATICFILES_STORAGEsetting to"django_oss_storage.backends.OssStaticStorage"Configure your AliCloud OSS settings (Refer below).Use the following settings for file storage.STATICFILES_STORAGE='django_oss_storage.backends.OssStaticStorage'DEFAULT_FILE_STORAGE='django_oss_storage.backends.OssMediaStorage'Authentication settingsUse the following settings to authenticate with AliCloud OSS.# AliCloud access key IDOSS_ACCESS_KEY_ID=<YourAccessKeyID># AliCloud access key secretOSS_ACCESS_KEY_SECRET=<YourAccessKeySecret>Storage settingsFor public or public-read buckets, storage urls will be bucket_name.endpoint/key formatFor private buckets, storage urls will be signed url. The expires time can be set by OSS_EXPIRE_TIME as environment variable or as Django settings. The default value for OSS_EXPIRE_TIME is 30 days.OSS_EXPIRE_TIME=<ExpireTimeinSeconds>File storage settingsUse the following settings to configure AliCloud OSS file storage.# The name of the bucket to store files inOSS_BUCKET_NAME=<Yourbucketname># The URL of AliCloud OSS endpoint# Refer https://www.alibabacloud.com/help/zh/doc-detail/31837.htm for OSS Region & EndpointOSS_ENDPOINT=<Youraccessendpoint># The default location for your filesMEDIA_URL='/media/'Staticfiles storage settingsAll of the file storage settings are available for the staticfiles storage.# The default location for your static filesSTATIC_URL='/static/'staticfiles provides command ‘collectstatic’. Run following command to collect all sub-folder ‘static’ of each appand upload to STATIC_URL.$pythonmanage.pycollectstaticTestingFirst set the required AccessKeyId, AccessKeySecret, endpoint and bucket information for the test through environment variables (Do not use the bucket for the production environment).Take the Linux system for example:$exportOSS_ACCESS_KEY_ID=<AccessKeyId>$exportOSS_ACCESS_KEY_SECRET=<AccessKeySecret>$exportOSS_BUCKET_NAME=<bucket>$exportOSS_ENDPOINT=<endpoint>Support and announcementsDownloads and bug tracking can be found at themain project website.LicenseMIT.
Package: django-ab
django-ab=========AB-Testing framework with a difference.An easily pluggable utility for doing control group testing of componentsin django web applications.The application focuses importance of testing the product on actual usersbefore going for the final release.Usage=====- Install the package`pip install django-ab`- Add feature flag to distinguish a particular feature. Note that the flagshould start with `F`. The feature flag control the behaviour to turn on/offthe feature for the users.For example, if you have a feature flag `F_SHOW_ADS` set to `True` it wouldturn on the ads for the set of users and `False` would turn off that feature.- Using it as a decorator?`@quick(<feature_flag>, <callable_name>, only_authenticated=[True|False])`Here `callable name` is the name of the experiment that you want to conduct onthe set of users.- Using it as a django templatetag?`{% ifexperiment feature_flag callable_name only_authenticated=[True|False] %}<!-- Logic goes here -->{% elifexperiment ... %}...{% endif %}`Future Scope============- Add support for multiple experimets on the same view in the view layer itself.- Build analytics tool to give the developers a better idea on which strategiesturns out to be better- PEP8 fixes and rolling out django-ab.readthedocs.org
Package: django-aboutconfig
A firefox-likeabout:configimplementation for one-off settings in
Django apps.Compatible Python versions3.6+Compatible Django versions2.0 - 3.0InstallationYou can installaboutconfigeither from source or via pip:pipinstalldjango-aboutconfigThe only thing you need to do to configure it is add it to yourINSTALLED_APPSlike all other django applications:INSTALLED_APPS=['django.contrib.admin','django.contrib.auth',...'aboutconfig',]Then just runmanage.py migrateand you’re good to go.Note:aboutconfigrelies on having a good caching mechanism to
be fast (all configured values are preloaded into cache on start-up).
You should ideally have something like memcached configured to avoid
slowdowns.See Django documentation for
details.UsageBy default,aboutconfigcomes with four supported data-types:
integer, boolean, string and decimal. All data types are configurable
and you can add your own if necesessary.To add some configuration values, head over to the django admin and add
an instance of theConfigmodel.Having done this, you can access the configuration value viaaboutconfig.get_config()in Python code or theget_configtemplate filter (loadconfigbefore using).Python code:fromaboutconfigimportget_configdefmy_view(request):# some code...admin_email=get_config('admin.details.email')# some more code...Template code:{%loadconfig%}The website admin's email is{{'admin.details.email'|get_config}}.

>>> An assignment tag also exists for convenience:{%get_config'admin.details.email'asemail%}The website admin's email is <a href="mailto:{{email}}">{{email}}</a>.
Package: django-about-ds
django-about_dsdjango-about_ds is a Django app to use for demiansoft.Quick startAdd "about" to your INSTALLED_APPS setting like thisINSTALLED_APPS=[...'about',]코드를 넣고자 하는 위치에 다음을 추가 한다.{% load about_tags %}
{% make_about %}context examplecontext={"theme":"mentor_ds","about":{"title":"믿음을 주는 것은 의사의 몫입니다.","subtitle":"저,환자,그리고 직원 모두 최고로 만족할 수 있는 우리들의 '인생' 치과가 되었으면 좋겠습니다.","head":"저는 경희대학교를 졸업하고 삼성서울병원에서 구강외과레지던트를 수련받고 구강외과 전문의 자격증을 취득하였습니다. 다양","contents":["<strong>과잉진료나 허위진료를 하지 않습니다.</strong><br>현재 환자분의 상태에 대해 충분히 설명하고 필요한 치료를 진행합니다.","<strong>책임을 가진 의료진이 진료합니다.</strong><br>대표원장이 주치의로서 환자분을 책임지고 진료하고 있습니다."],"tail":"치과 이름과 같이 제 인생에 있어서 마지막 치과이면서 20여 년의 임상경험으로 환자분들에게 최고의 만족을 드려 ‘인생치과’가 될수 있도록 최선을 다해 다음의 약속을 치키도록 하겠습니다.","image_filename":"about.jpg","video_link":"https://www.youtube.com/watch?v=ehibwWyCyb0",}}
Package: django-AB-project
<h1> Django-AB-project </h1><p>Here is my first package for <b>Django</b>. I tried to write it so that it would be easy for you to use this package.</p><p>It provide four function in utils.py and some models in models.py.</p><p>This would be easy to used this package with Generic views in Django, but this can be work properly in methods, just used another technic.</p>(You can read about Generic Views in Django here - https://docs.djangoproject.com/en/1.11/topics/class-based-views/)<h2>How to install?</h2>1. Use pip to download this package - <b><i>pip install django-AB-project</i></b><br>2. Add <i>'ab',</i> to <b>INSTALLED_APPS</b> in settings.py<br>3. Configure your sessions - set in settings.py at the end of file (or where you want):<br>В В В В <b><i>SESSION_EXPIRE_AT_BROWSER_CLOSE</i> = True</b><br>В В В В <b><i>SESSION_COOKIE_AGE</i> = 60 * 60 * 24</b><br>In first line, if <b>True</b> sessions will be destroyed after browser close.In second case means sessions will be destroyed after 24 hours.<br>You can edit this lines if you need.<br>4. Run <b><i>python manage.py makemigrations</i></b>, and <b><i>python manage.py migrate</i></b><br>5. Run server (<i>python manage.py runserver</i>) and go to the admin page. If you see new line named <i>"Ab_Split_Testing"</i> and can click on them without error page - Congratulation! You successfully installed this package.<h2>How to use?</h2><i>(Generic views version)</i><p></p>
Package: django-absolute
Django AbsoluteDjango Absolute provides context processors and template tags to use full absolute URLs in templates.InstallationYou can install Django Absolute with pip:pip install django-absoluteor with easy_install:easy_install django-absoluteAddabsoluteto yoursettings.INSTALLED_APPS.Context processorAddabsolute.context_processors.absoluteto yoursettings.TEMPLATE_CONTEXT_PROCESSORS.
Django Absolute context processor depends on request context processor:from django.conf import global_settings

TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
    'django.core.context_processors.request',
    'absolute.context_processors.absolute',
)Then you can access the following variables in your templates:ABSOLUTE_ROOT: full absolute root URL (without trailing slash) based on incoming requestABSOLUTE_ROOT_URL: full absolute root URL (with trailing slash) based on incoming requestSITE_ROOT: full absolute root URL (without trailing slash) based on current Django SiteSITE_ROOT_URL: full absolute root URL (with trailing slash) based on current Django siteTemplate tagsDjango absolute provide 2 template tags:absolute: acts likeurlbut provide a full URL based on incoming request.site: acts likeurlbut provide a full URL based on current Django Site.To use theses template tags, you need to load theabsolutetemplate tag library.{% load absolute %}

{% url index %}
{% absolute index %}
{% site index %}These template tags have exactly the same syntax asurl, including the “as” syntax:{% absolute index as the_url %}
{{ the_url }}If you use Django 1.5, you need to use the “new-style” url syntax (quoted parameters):{% load absolute %}

{% url "index" %}
{% absolute "index" %}
{% site "index" %}

{% absolute "index" as the_url %}
{{ the_url }}If you want to match the “new-style” syntax in Django < 1.5 you need to loadabsolute_futureinstead (same behavior as{% load url from future %}).{% load url from future %}
{% load absolute_future %}

{% url "index" %}
{% absolute "index" %}
{% site "index" %}

{% absolute "index" as the_url %}
{{ the_url }}For more informations, see theDjango 1.5 release notes.Changelog0.3 (2013-03-03)Check if django.contrib.sites is enabled (thanks to Rodrigo Primo)Django 1.5 compatibility (Documentation and tests)Addedabsolute_futuretemplate tag library
(match{% load url from future %}syntax).drop support for Python 2.6 (test only)0.2.2 (2012-11-18)Handle template tagassyntax0.2.1 (2012-11-10)Fix packaging0.2 (2012-11-10){% site %}fallback on http protocol ifrequestis missing.0.1 (2012-06-10)Initial release
Package: django-absoluteuri
django-absoluteuriAbsolute URI functions and template tags for Django.WhyThere are times when you need to output an absolute URL (for example, inside an
email), but you don’t always have access to the request. These utilities use
the Sites Framework if available in order to create absolute URIs.InstallationInstall django-absoluteuri:pip install django-absoluteuriThen add it to yourINSTALLED_APPS:INSTALLED_APPS = (
    # ...
    'django.contrib.sites',
    'absoluteuri',
)django-absoluteuri requires theSites Frameworkto be inINSTALLED_APPSwell and configured as well.SettingsThe protocol of the uris returned by this library defaults tohttp.  You
can specify the protocol with theABSOLUTEURI_PROTOCOLsetting.# settings.pyABSOLUTEURI_PROTOCOL='https'# Elsewhere>>>absoluteuri.build_absolute_uri('/some/path/')'https://example.com/some/path/'Template TagsThere are two template tags,absoluteuriandabsolutize.absoluteuriworks just like theurltag, but that it outputs absolute
URLs.{%loadabsoluteuri%}<ahref="{%absoluteuri'my_view'kwarg1='foo'kwarg2='bar'%}">click here</a>absolutizewill take a relative URL and return an absolute URL.{%loadabsoluteuri%}<ahref="{%absolutizeurl_from_context%}">click here</a>FilterSometimes instead of template tags, it’s easier to use filters. You can do that
as well.{%loadabsoluteuri%}<ahref="{{my_object.get_absolute_url|absolutize}}">click here</a>But there are situations where tag can not be used but filter can.{%loadabsoluteuri%}{%include"some-other-template.html"withurl=my_object.get_absolute_url|absolutize%}FunctionsThere are also two functions that django-absoluteuri provides,build_absolute_uriandreverse, which are equivalents ofrequest.build_absolute_urlandurlresolvers.reverse.>>>importabsoluteuri>>>my_relative_url='/path/to/somewhere/'>>>absoluteuri.build_absolute_uri(my_relative_url)'http://example.com/path/to/somewhere/'>>>absoluteuri.reverse('viewname',kwargs={'foo':'bar'})'http://example.com/path/to/bar/'Changelog1.3.0 (2018-09-04)Add support for Django 2.1. Remove support for Django < 1.11.1.2.0 (2016-02-29)Add absolutize filter. This deprecates the absolutize tag. [#4]1.1.0 (2015-03-23)Added ABSOLUTEURI_PROTOCOL settings. [#1]Documented sites framework requirement.1.0.0 (2015-03-17)First release on PyPI.
Package: django-absoluteurl
=====Django Absolute Url Template Tag=====Absolute Url is an app for creating absolute urls in Django templates. It works like built-in Django ``url`` template tag but with absolute urls.Installation-----------Install using PIP``pip install django-absoluteurl``Add "absoluteurl" to your INSTALLED_APPS setting like this:INSTALLED_APPS = (...'absoluteurl',)Usage-----------First load it in Django template and use it as a tag.{% load absoluteurl %}This is simplest example:{% absoluteurl 'name_for_your_url' %}This is an absolute url for some object:{% absoluteurl 'your_namespace:your_view' some_id=some_object.id %}You can also use it with 'as' form:{% absoluteurl 'your_namespace:your_view' some_id=some_object.id as abs_url %}{{ abs_url }}Credits-------------Created by Bartosz Gryszko, 2014MIT License
Package: django-abstract-related-model
Django Abstract Related ModelIn django a related model can’t be abstract because of db issues. This module offers a workaround, pratically it doesn’t declare the abstract, just avoid it of being created on database, but allow the children. Database creation is needed so you can create relationships.Installing$pip3installdjango-abstract-related-modeland addabstract_related_modelto INSTALLED_APPS.Usingfromabstract_related_model.modelsimportAbstractRelatedModelclassExampleAbstractRelatedModel(AbstractRelatedModel):passRunning testsGo into example folder$cdexampleand run them$./manage.pytestTroubleshootingCheck the example folder if you have any doubts. Or you can create an
issue.
Package: django-abstract-utils
django-abstract-utilsCurrently, this library provides only one method that operates on Django abstract model class:without(orAbstractClassWithoutFieldsNamed) - create a subclass of an abstract Django model class with certain fieldsremovedThis was ripped off from someone’s Gist. Feel free to submit a PR with authorship!Installationpip install django_abstract_utilsUsagefromdjango_abstract_utilsimportwithoutfromoscar.apps.address.abstract_modelsimportAbstractBillingAddressclassBillingAddress(without(AbstractBillingAddress,'phone_number')):pass