Saravanan666/pypi-org huggingface dataset:
Package: django-regex-field
django-regex-fieldStores regular expressions in Django models.A Brief OverviewThe Django regex field app provides a custom field for a Django model that
stores a regex. This provides the ability to easily store regexs and access
them as compiled regular expressions from your models.Storing and Retrieving a RegexA regular expression can be stored and retrieved in a Django model as follows:fromdjango.dbimportmodelsfromregex_field.fieldsimportRegexFieldclassRegexModel(models.Model):regex=RegexField(max_length=128)model_obj=RegexModel.objects.create(regex='a')# Access the regex as a compiled regular expression>>>print(model_obj.regex.match('b'))NoneUsing regex flagsFlags can be provided in the field definition and will be applied when the regex is compiled. If you manually
compile a regex object with other flags and set it on the model, those flags will not be preserved. Only the flags
passed to the field's constructor are used.importrefromdjango.dbimportmodelsfromregex_field.fieldsimportRegexFieldclassRegexModel(models.Model):regex=RegexField(max_length=128,re_flags=re.IGNORECASE)model_obj=RegexModel.objects.create(regex='A')# Case insensitive matching>>>print(model_obj.regex.match('a')isnotNone)True
Package: django-regions
Django Regions基于django的中国省市区数据模块数据由高德地图接口获取Quick StartInstall$ pip install django-regionsUpdatesettings.pyINSTALLED_APPS = [
    ...,
    'regions',
]

...
AMAP_KEY = ''Migrations$ python manage.py makemigrations regions
$ python manage.py migrateSync Data$ python manage.py sync_regions
Package: django-register-activate
=====Register-Activate=====Register-activate is a simple Django app to conduct sign up, custom user emailaccount verification and activation, login and logout functions. This app modifies django'User model to realize the registering and activation process together with database.Detailed documentation is in the "docs" directory.Quick start-----------1. In your setting.py, import the module register_activate like this::import register_activate2. In your setting.py, get the absolut path the register_activate_dir (following BASE_DIR) like this::register_activate_dir=os.path.dirname(os.path.dirname(os.path.abspath(register_activate.__file__)))3. In your setting.py, add "register_activate" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'register_activate',]4. In your setting.py, add the template path of register_activate to TEMPLATES by updating 'DIRS' like this:TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates','DIRS': [os.path.join(register_activate_dir,'register_activate/templates/register_activate')],'APP_DIRS': True,'OPTIONS': {'context_processors': ['django.template.context_processors.debug','django.template.context_processors.request','django.contrib.auth.context_processors.auth','django.contrib.messages.context_processors.messages',],},},]5. In your setting.py, add the AUTHENTICATION_BACKENDS setting like this::AUTHENTICATION_BACKENDS=['django.contrib.auth.backends.ModelBackend','register_activate.email_auth.EmailBackend',]6. In your project urls.py, include the polls URLconf like this::from django.conf.urls import url, includefrom django.contrib import adminurlpatterns = [...url(r'^register_activate/',include('register_activate.urls')),url(r'^admin/', admin.site.urls),]7. Run `python manage.py migrate` to create the models.8. Run `python manage.py runserver` to start the server.9. Visit http://127.0.0.1:8000/register_activate/signup to create an account.10. After creating your account, your account is not activated yet.You will receive an email from a google account django.registeractivate@gmail.comwith an activation link. By clicking that link your account will be activated.You can change the from email to your own email address by go toregister_activate/views to your own account and password::fromaddr='django.registeractivate@gmail.com'username='django.registeractivate'password='django_register_activate'(You can use register_activate_dir=os.path.dirname(os.path.dirname(os.path.abspath(register_activate.__file__))) to find where this package is)
Package: django-registration2
# django-registration2[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/bruth/django-registration2/trend.png)](https://bitdeli.com/free "Bitdeli Badge")## Install```bashpip install django-registration2```## SetupAdd `registration` to `INSTALLED_APPS`:```pythonINSTALLED_APPS = ('django.contrib.auth','registration',)```Add `registration.urls` to your project's urls.py:```pythonurlpatterns = patterns('',...url(r'^', 'registration.urls')),)```Run [South](http://south.readthedocs.org) migrations (if installed):```pythonpython manage.py migrate registration```Otherwise run `syncdb`:```pythonpython manage.py syncdb```## SettingsRegistration is handled by a _backend_ which is a class composed of variousmethods for performing each step in the registration process. In most casesthe default behavior is suitable, but for convenience a few settings areavailable to customize a few common scenarios.### REGISTRATION_OPENA boolean which determines whether users can register or not. Default is `True`### REGISTRATION_MODERATIONA boolean which defines whether or not users will be moderated beforecompleting their registration. Default is `False`### REGISTRATION_MODERATORSA tuple of name/email pairs (like `ADMINS` or `MANAGERS`) whom will be notifiedof newly registered users. Defaults to `MANAGERS`### REGISTRATION_ACTIVATION_DAYSAn integer of the number of days an account activation link is valid. Usersreceive one in their email after they sign up to verify their email addressis valid. Default is `0` (no time limit)## SignalsA few signals are exposed to notify when various events occurs. All signalsprovide the following arguments:- `user` - The new user instance- `request` - The request instance used during registration- `backend` - The registration backend used for registration### `user_registered`Sent when a user registers.### `user_verified`Sent when a user verifies their email address using the verification link theyreceive via email. This occurs only for registration that is moderated sincemoderators will not receive notice of new registrations unless they verifytheir email address.### `user_activated`Sent when a user verifies their account using the verification link theyreceive via email. This applies to non-moderated registrants.### `user_moderated`Sent when a moderator has moderated a user's registration (pass or fail).## BackendsMultiple backends are supported which may be necessary to handle differentregistration methods for different kinds of users.```pythonREGISTRATION_BACKENDS = {'default': 'registration.backends.default.Backend','other': 'myapp.backends.MyBackend',}```
Package: django-registration-bootstrap
Bootstrap friendly pieces for django-registrationInstallationFirst, get and install django-registrationThen get django-registration-bootstrap from PyPI:$pipinstalldjango-registration-bootstrap==0.2.0Into the settings file, add the following toINSTALLED_APPS:INSTALLED_APPS=(# ... everything else# Add the templates via INSTALLED_APPS'registration_bootstrap',# only add crispy_forms if you aren't already using it'crispy_forms')RequirementsDjango 1.5+Python 2.7+ or Python 3.3+django-registration 1+ or django-reg 1+django-crispy-forms 1.3.2+History0.2 (2013-06-28)Removed absolute dependency on django-registration so this can rely on forks.Implemented default registration’s templates.Discovery that no one had deployed a working, modern bootstrap implementation to PyPI.0.1 (2013-06-27)Implemented simple registration’s templates.Discovery that no one had deployed a working, modern bootstrap implementation to PyPI.
Package: django-registration-html-email
This is a fairly simple user-registration application for Django,
designed to make allowing user signups as painless as possible. It
requires a functional installation of Django 1.3 or newer, but has no
other dependencies.For installation instructions, see the file “INSTALL” in this
directory; for instructions on how to use this application, and on
what it provides, see the file “quickstart.rst” in the “docs/”
directory.
Package: django-registration-invite
Installation:Includeregistration_invitein yourINSTALLED_APPSsetting.Include the activation URLS in your URL confurl(r'^',include('registration_invite.urls.activation')),If using the user-based invitation workflow, you may instead includeurl(r'^',include('registration_invite.urls.activation')),Override the invitation templates. Basic examples are provided, but
will most likely be insufficient.registration/invite/email/body.txtregistration/invite/email/subject.txtregistration/invite/activation_complete.htmlregistration/invite/activation_form.htmlregistration/invite/invitation_complete.htmlregistration/invite/invitation_form.htmlFeatures:automatically registers the user model with the adminworkflows for both admin-based and user-based invitationsTODO:re-invite for expired userstestsRelease ProcessUpdate package version insetup.pyCreate git tag for versionUpload release to PyPIbash   $ pip install-Usetuptools wheel   $ rm-rfdist/ build/   $ python setup.py sdist bdist_wheel uploadCopyright & LicenseCopyright © 2017 NC State University. See LICENSE for details.
Package: django-registration-me
========================Django user registration========================This is a fairly simple user-registration application for Django_,designed to make allowing user signups as painless as possible. Itrequires a functional installation of Django 1.0 or newer and MongoEngine,but has no other dependencies.For installation instructions, see the file "INSTALL.txt" in thisdirectory; for instructions on how to use this application, and onwhat it provides, see the file "overview.txt" in the "docs/"directory.
Package: django-registration-paypal
This is a django-registration backend to integrate with paypal. The workflow is
as follows:User signs up for account.User is directed to paypal to pay for their account.Paypal notifies site that account has been paid for.User receives email containing instructions for activating the account.User activates and begins using the site.This is a backend for the django-registration project:http://bitbucket.org/ubernostrum/django-registration/It requires the development version of django-registration; 0.7 did not support
registration backends.This code uses paypal’s standard integration. It posts to an Instant Payment
Notification URL when complete.
Package: django-registration-redux
Description:Django-registration provides user registration functionality for Django websites.maintainers:Macropin,DiCato, andjoshblumcontributors:list of contributorsIf you have issues with the “django-registration-redux” package then pleaseraise them here.This is a fairly simple user-registration application for Django, designed to
make allowing user signups as painless as possible. It requires a functional
installation of Django 3.1 or newer, but has no other dependencies.InstallationInstall, upgrade and uninstall django-registration-redux with these commands:pip install django-registration-redux
pip install --upgrade django-registration-redux
pip uninstall django-registration-reduxTo install it manually, run the following command inside this source directory:python setup.py installOr if you’d prefer you can simply place the includedregistrationdirectory somewhere on your Python path, or symlink to it from
somewhere on your Python path; this is useful if you’re working from a
Git checkout.Note that this application requires Python 3.5 or later, and a
functional installation of Django 3.1 or newer.If you are running on Django <=2.0, you can install a previous version ofdjango-registration-redux, which supports older versions of Django. See theCHANGELOGfor support details. Older versions will receive minor bug fixes as
needed, but are no longer actively developed:pip install django-registration-redux==1.10Getting started with developmentTo get started with development, first install the required packages:make installdepsFor convenience aMakefileis included which wraps the Pythoninvokelibrary. Once you work on a patch, you can test
the functionality by running:make testOr equivalently:invoke testCommand line arguments can be passed to theinvokescript through theMakefilevia theARGSparameter. For example:make build ARGS=--docsOr equivalently:invoke build --docsAlternativesdjangopackages.comhas a comprehensive comparison of Django packages used for user registration
and authentication.For example,django-allauthis an alternative to django-registration-redux that provides user registration
in addition to social authentication and email address management.LicenseDjango-registration-redux is licensed underBSD License.
Package: django-registration-redux-referrals
This is a fork of django-registration(redux) that provides basic support for email referrals.Installationpip install django-registration-redux-referralsor simply download the zip, extract it and copy the ‘registration’ directory into PYTHONPATHConfigurationConfiguration instructions remains similar to django-registration-redux. Here is the full
documentation:http://django-registration-redux.readthedocs.orgAfter installation and configuration, all you need is to write the view to send referral emails.Example:# Import the ReferCodes and Refer models.
# The ReferCodes model holds refer codes generated by users.
# The Refer model holds referred users and the referees. Both are instances of django.contrib.auth.models.User

from registration.models import ReferCodes, Refer

# The ReferForm is a simple form with only an email field. You can implement your own if you like.

from registration.forms import ReferForm

# gen_code is a utility for generating the 20-character refer code

from registration.utils import gen_code

from django.core.mail import send_mail
from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.core.urlresolvers import reverse


def refer(request):
    form = ReferForm()
    if request.POST:
        code = gen_code()
        obj, new = ReferCodes.objects.get_or_create(code=code, user=request.user)
        if new:
            # Generation of the refer URL
            # registration_register is the name of the registration url
            # Please note the structure of the URL
            url = 'http://' + get_current_site(request) + reverse('registration_register') + code + '/'
            # The refer email message
            message = "Hello, \n Please register for the writing service here {0}".format(url)
            # Sending the refer email.
            send_mail('Subject here', message, settings.EMAIL_HOST_USER,
                      [request.POST['email']], fail_silently=False)

        ...Referred users who register will now be saved to the Refers table and you will be able to query them and their
referees.
Package: django-registration-rest-framework
Clone of Django Resgistration flow for Django Rest FrameworkNeeds ‘django.contrib.sites’ and an email backendBased onStackOverflow answerhttp://stackoverflow.com/a/19337404anddjango-registrationhttps://django-registration.readthedocs.org/Install$ pip install django-registration-rest-frameworkUsagesettings.pyINSTALLED_APPS=...'registration_api',...# This setting is mandatoryREGISTRATION_API_ACTIVATION_SUCCESS_URL='/'urls.pyurlpatterns=patterns(...url(r'^accounts_api/',include('registration_api.urls')),...)Front-endFrom your front-end or mobile application send a post to the register
url ‘accounts_api/register/’. The fields depends on yourAUTH_USER_MODELbut should be
something like[{"username":"john","email":"john@example.com","password":"verylongpassword"}]This will trigger an email to the addess specified by the user. When
the user follows the link the account is activated.Test$ python tests/runtests.py [TestsCase[.test_method]]or$ python setup.py test
Package: django-registrationwall
Django Registration Wallis aDjangomixinapplicationthat limits ananonymous user’s access to content, after which the user is redirected to thelogin URL. The behavior is modeled after the commonpaywallscenario.Fake news articles credit goes to The Onion.Package distributionCode repositoryDocumentationTestsInstall$pipinstalldjango-registrationwallAdd tosettings.py.INSTALLED_APPS=[# ...'regwall',]Add to one of yourviews.py.fromdjango.views.genericimportDetailViewfromregwall.mixinsimportRaiseRegWallMixinfrom.modelsimportArticleclassArticleDetailView(RaiseRegWallMixin,DetailView):model=Article
Package: django-registration-with-email
Overridedjango-registration-reduxto log-in by e-mail.
This package provides:Log-in with e-mail or usernameUser-convenient messages for various cases in login and password reset formSend password reset e-mail even for users without passwordIncludes phishing-safe next_url mechanismSecurity note: For better user experience the password reset form informs users if the e-mail doesn’t exist in the system.
This lowers security, because attacker can query the system whether the account exists or not. The risk is lowered by
using captcha on the form, but still you should evaluate if this is secure enough for your system.DocumentationThe full documentation is athttps://django-registration-with-email.readthedocs.io.QuickstartInstall Django registration with email:pip install django-registration-redux
pip install django-registration-with-emailAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'registration','django_registration_with_email','captcha',...)Add Django registration with email’s URL patterns:urlpatterns=[...path('accounts/',include('django_registration_with_email.urls')),path('accounts/',include('registration.backends.default.urls')),...]Set email as unique=True in your User model:classUser(TimeStampedModel,AbstractUser):email=models.EmailField(verbose_name='email address',max_length=254,blank=True,null=True,unique=True,)FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxDevelopment commandspip install -r requirements_dev.txt
invoke -lCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.2.0 (2021-04-05)Use django-registration-redux0.1.0 (2021-03-01)First release on PyPI.
Package: django-registries
Django Registriesdjango-registriesis a structured way to create registries of implementations.Table of ContentsInstallationLicenseInstallationpip install django-registriesDevelopmentgit clonecd django-registriespip install hatchhatch run tests:covhatch run tests:typecheckLicensedjango-registriesis distributed under the terms of theMITlicense.
Package: django-registry
# HHypermap Registry
[![Build Status](https://travis-ci.org/cga-harvard/HHypermap.svg?branch=registry)](https://travis-ci.org/cga-harvard/HHypermap)## IntroductionHHypermap (Harvard Hypermap) Registry is a platform that manages OWS, Esri REST, and other types of map service harvesting, and orchestration and maintains uptime statistics for services and layers. Where possible, layers will be cached by MapProxy. It is anticipated that other types of OGC service such as WFS, WCS, WPS, as well as flavors of Esri REST and other web-GIS protocols will eventually be included. The platform is initially being developed to collect and organize map services for Harvard WorldMap, but there is no dependency on WorldMap. HHypermap Registry publishes to HHypermap Search (based on Lucene) which provides a fast search and visualization environment for spatio-temporal materials.  The initial funding for HHypermap Registry came from a grant to the Center for Geographic Analysis from the National Endowment for the Humanities.## Installation### Running Hypermap on DockerEasiest way to have an HHypermap instance up and running is to use Docker.` git clonegit@github.com:cga-harvard/HHypermap.gitcd HHypermap make build make up make sync make logs `Wait for the instance to be provisioned (about 3/4 minutes).Then connect to:http://localhost:8000and your instance should be up and running.You can edit the files with your IDE from your host, as the directory
/code on the guest is synced with your host.To run unit tests:` make test `To debug Django, this is what it can be done:`docker-composestop djangodocker-composerun--service-portsdjango `Then add some breakpoint - import ipdb;ipdb.set_trace() - and happy debugging!## Start using HypermapLogin to the home page,http://localhost:8000. It will be empty. You need to add some
endpoints to Hypermap. So go to the administrative interface:http://localhost:8000/admin/Go to Endpoint List and add an endpoint list, for example the one included in /data.After saving, Hypermap should be start harvesting the endpoint.Harvesting will be performed by the Django server if SKIP_CELERY_TASK
= True, otherwise by Celery. Please note that harvesting operations can be time consuming, so it is better to setup a Celery process if possible.
Package: django-registry-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-rehive-extras
Django Rehive ExtrasExtra utilities for using Django.FeaturesPython >= 3.6Django >= 3.0Money model field using decimals.Date model with created/updated field.State model that stores the previous state of a model instance in memory.Cascading archive model class.Integrated model class that supports date, state and cascading archives.Getting startedInstall the package:pipinstalldjango-rehive-extrasAdd "django_rehive_extras" to your INSTALLED_APPS settings like this:INSTALLED_APPS=[...'django_rehive_extras',]