Saravanan666/pypi-org huggingface dataset:
Package: django-user-login
AuthenticationA django user authentication and login application.01.  To install and use the package, use:pip install django-user-loginInstructions02.	Add "authentication" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
        ...
        'authentication',
    ]03.	Include the authentication URLconf in your project urls.py like this:path('authentication/', include('authentication.urls')),04.	Runpython manage.py migrateto create theUsermodel (you'll need the Admin app enabled).05.	The App requiresDjango Sessions06.  In your settings.py file include the following:SITE_TITLE = 'site-title' # title of your site
    LOGIN_URL = '/authentication/'
    EMAIL_HOST = 'email-host' # e.g. 'smtp-mail.outlook.com'
    EMAIL_PORT = email-port # e.g. 587
    EMAIL_HOST_USER = 'email-address'
    EMAIL_HOST_PASSWORD = 'email password'
    EMAIL_USE_TLS = True
    AUTHENTICATION_DEBUG = Boolean # True or False (use False in production)
    VERIFICATION_CODE_VALIDITY_IN_MINUTES = Integer # range of [1, 60] only07.  For login and logout functionality, use -To Login, use anyone one of these- <a href="{% url 'authentication:login' %}">Login</a>
          - <a href='/authentication/'>Login</a>To Logout, use anyone one of these- <a href="{% url 'authentication:logout' %}">Logout</a>
          - <a href="/authentication/logout/">Logout</a>To visit My Account page and edit profile credentials, use any one of these -- <a href="{% url 'authentication:account' %}">Account</a>
          - <a href="/authentication/account/">Account</a>08. WhenAUTHENTICATION_DEBUG = TRUE- Live EMAILS will not be sent and verification codes / messages, if any, will be displayed in the terminal.09. When a user closes their account, the app will not delete theUserbut setis_activetoFalse(see:User Model) andset_unusable_password()(see:Methods).10. CheckDemo Website
Package: django-user-login-register-activate
django-user-login-register-activate is a django app to make user login and registrationQuick startTo install from PyPi:pip install django-user-login-register-activateAdd “login” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'login',
]Add Email setting like this:EMAIL_HOST = "smtp.163.com"
EMAIL_PORT = 25
EMAIL_HOST_USER = "your_email_name@163.com"
EMAIL_HOST_PASSWORD = "your_email_host_password"Include the login URLconf in your project urls.py like this:from django.contrib import admin
from django.urls import path, include

urlpatterns = [
        ...
        path('accounts/', include('login.urls')),
]Your can use this project like this:from django.contrib.auth.decorators import login_required

@login_required
def index(request):
        return HttpResponse("Hello World.")
Package: django-user-management
django-user-managementUser management model mixins and API views/serializers based onDjangoanddjangorestframework.All documentation is in thedocsdirectory.InstallationMixinsViewsAvataruser_managementmodel mixins give flexibility to create your ownUsermodel.
By default all mixins are optional. Our mixins allow to create, identify users
(from their emails instead of their username) as well as sending password reset
and account validation emails.user_managementAPI views and serializers can be grouped into five sections:auth: authenticate and destroy a user sessionpassword_reset: send and confirm a request to reset a passwordprofile: retrieve/update/delete the current user profileregister: create an account and send an email to validate itusers: give a list and a detail (retrieve, update, destroy) views about users
Package: django-user-messages
django-user-messages adds offline messaging support to Django’s
messaging framework. It achieves this by allowing to save messages in
the database. Theuser_messages.api.get_messagesutility and theuser_messages.context_processors.messagescontext processor
transparently concatenate Django’s messages and our own messages in a single
list, therefore existing code works without any changes and without
causing database writes.  django-user-messages’ functions have to be
used explicitly. I consider this a feature, not a bug.InstallationInstalldjango-user-messagesusing pip into your virtualenv.Adduser_messagestoINSTALLED_APPSand runmigrate.Add theuser_messages.context_processors.messagesmessage processor
somewhereafterthe default messages processor. Django’s admin app checks
for the presence of the latter so you cannot simply remove it (except if you
want to silence the"admin.E404"system check).Useuser_messages.apias you would usedjango.contrib.messagesexcept that you pass the user model or ID
as first parameter, not the current request.UsagePretty much the same as Django’s messaging framework:from user_messages import api

api.info(user, 'Hey there')
api.warning(user, 'Stop this')
api.error(user, 'Not nice!')

# Passing the ID is also possible; the user instance does not
# have to be instantiated at all:
api.success(user.id, 'Yay!')django-user-messages’ messages supports two additional features not
available in Django’s messages framework:Messages can be delivered more than once by passingdeliver_once=False. These messages have to be acknowledged
explicitly. django-user-messages does not contain any code to do this.It is possible to attach additional data by passing a dictionary asmeta:api.debug(user, 'Oww', meta={
    'url': 'http://example.com',
})For convenience, our messages have the sametagsandlevel_tagproperties as Django’s messages. Meta properties are also accessible in
templates:{% if messages %}
  <ul class="messages">
  {% for message in messages %}
    <li class="{{ message.tags }}".>
      {% if message.meta.url %}<a href="{{ message.meta.url }}">{% endif %}
      {{ message }}
      {% if message.meta.url %}</a>{% endif %}
    </li>
  {% endfor %}
  </ul>
{% endif %}django-user-messages’ messages are also evaluated lazily.
Package: django-user-mixins
django-user-mixinsUser model mixins based onDjango.user_mixinsmodel mixins give flexibility to create your ownUsermodel.
By default all mixins are optional. Our mixins allow to create, identify users
(from their emails instead of their username) as well as sending password reset
and account validation emails.InstallationInstall the package:pip install django-user-mixinsInstall with avatar functionality:pip install django-user-mixins[avatar]User modelTo create a custom user model using thedjango-user-mixinsfunctionality, declare
your user class like this:from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
from user_mixins.mixins import ActiveUserMixin


class User(ActiveUserMixin, PermissionsMixin, AbstractBaseUser):
    passIf you want to use theVerifyEmailMixin, substitute it forActiveUserMixin.Make sure the app containing your custom user model is added tosettings.INSTALLED_APPS,
and setsettings.AUTH_USER_MODELto be the path to your custom user model.If you useEmailUserMixinor any of its derivatives, you'll need to set up Postgres to support aCITextextension in your migration. Add the following to your migration:from django.contrib.postgres.operations import CITextExtension

operations = [
    CITextExtension(),
    ...
]MixinsActiveUserMixinuser_mixins.mixins.ActiveUserMixinprovides a base custom user
mixin with aname,email,date_joined,is_staff, andis_active.VerifyEmailMixinuser_mixins.mixins.VerifyEmailMixinextends ActiveUserMixin to
provide functionality to verify the email. It includes an additionalemail_verifiedfield.By default, users will be created withis_active = False. A verification email
will be sent including a link to verify the email and activate the account.AvatarMixinuser_mixins.mixins.AvatarMixinadds an avatar field. The
serializers for this field requiredjango-imagekitto be installed.
Package: django-username-tools
Username validation et ceteraDocumentationThe full documentation is athttps://django-username-tools.readthedocs.io.QuickstartInstall Django Username Tools:pip install django-username-toolsAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'username_tools.apps.UsernameToolsConfig',...)FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements_test.txt
(myenv) $ python runtests.pyCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2018-02-20)First release on PyPI.
Package: django-user-notification
Django user notificationOverviewDjango user notification is intended to provide a way to send multiple types of notification messages to django users out of box.Documentationon the way...RequirementsPython 3.8, 3.9, 3.10Django 3.1, 3.2, 4.0, 4.1InstallationInstall usingpip...pip install django-user-notificationAdd'tinymce'and'notification'to yourINSTALLED_APPSsetting.INSTALLED_APPS=['django.contrib.admin',...'tinymce','notification',]Quick StartLet's take a look at a quick start of using Django user notification to send notification messages to users.Run thenotificationmigrations using:python manage.py migrate notificationAdd the following to yoursettings.pymodule:INSTALLED_APPS=[...# Make sure to include the default installed apps here.'tinymce','notification',]DJANGO_USER_NOTIFICATION={"aliyunsms":{"access_key_id":"Your Access Key ID","access_key_secret":"Your Access Key Secret","sign_name":"Your Sign Name",},"dingtalkchatbot":{"webhook":"Your Webhook URL",},"dingtalkworkmessage":{"agent_id":"Your App Agent ID","app_key":"Your App Key","app_secret":"Your App Secret",},"dingtalktodotask":{"app_key":"Your App Key","app_secret":"Your App Secret",},}Addtinymce.urlstourls.pyfor your project:urlpatterns=[...path('tinymce/',include('tinymce.urls')),...]Let's send a notificationfrom django.contrib.auth import get_user_model
from notification.backends import notify_by_email, notify_by_dingtalk_workmessage

User = get_user_model()

recipient = User.objects.first()

# send a dingtalk work message notification
notify_by_dingtalk_workmessage([recipient], phone_field="phone", title="This is a title", message="A test message")


# send a email notiofication
notify_by_email([recipient], title="This is a title", message="A test message")Send Message With Templatedjango-user-notificationsupport send notifications with custom template, To
specify a custom message template you can provide thetemplate_codeandcontextparameters.Create a template message with code namedTMP01on django adminProvide thetemplate_codeandcontexttosendmethod:...

notify_by_email([recipient], template_code="TMP01", context={"content": "Hello"})Supported backendsDummyNotificationBackend: send dummy messageEmailNotificationBackend: send email notification.WebsocketNotificationBackend: send webdocket notification, need install extension:channels.AliyunSMSNotificationBackend: send aliyun sms notification, need install extension:aliyunsms.DingTalkChatbotNotificationBackend: send dingtalk chatbot notification.DingTalkToDoTaskNotificationBackend: send dingtalk todo tasks notificationDingTalkWorkMessageNotificationBackend: send dingtalk work message notification.WechatNotificationBackend: planning...Running the testsTo run the tests against the current environment:$ pytest tests/Changelog0.7.0Initial releaseContributingAs an open source project, we welcome contributions. The code lives onGitHubThanks
Package: django-user-notifications
django-user-notifications is an extention of django-user-messages that extends the default django.contrib.messages framework.The goal of the project is for a developer to create user messages with a set of rules.Eg. You need a user to accept new terms of service for your site. You should be able to create that notification every day, every hour, every login until they accept the terms for which the notification will cease to appear.FeaturesCreate per site and or per user messagesCreate messages based on schedule, login, and or views.Dismiss messages after user confirmation or end date.Automate message creation upon defined events.Select between modals or tranditional bootstrap notifications to display your message.
Package: django-userpref
Django-Userprefdjango-userpref provides a abstract and reuseable framework for userspecific settingsThis includes:Abstract UserPref ClassAdmin interfaceTemplates for an userspecific settings pageBasic usageJust define a abstract model that can be used in the applications.
In you app you should define something like:fromuserpref.modelsimportUserprefclassMyappSettings(Userpref):special_setting=models.BooleanField(default=False,verbose_name='Make me a superhero')another_field=models.CharField(max_length=100,default="<unset>")classMeta:verbose_name="My Custom Setting for app Myapp"In your application or template you can access the settings over the users attributes{% if request.user.myappsettings.special_settings %}
    You are special man!
{% endif %}
Package: django-userpreferences
=====================================django-userpreferences (django-userpreferences)=====================================This Django_ app has for purpose to integrate easily for other apps to use.It aims to be easily added into existing projects.Installation============Depedencies~~~~~~~~~~~django-userpreferences requires django-picklefield.When upgrading you need south.Installing django-userpreferences~~~~~~~~~~~~~~~~~~~~~~~~~~Install into your python path using pip or easy_install::pip install django-userpreferenceseasy_install django-userpreferencesAdd *'preferences'* to your INSTALLED_APPS in settings.py::INSTALLED_APPS = (...'preferences',)Add *'(r'^preferences/', include('preferences.urls')'* to your urls::urlpatterns = patterns( '',....(r'^preferences/', include('preferences.urls'),)Don't forget to run ::./manage.py syncdbto create the table that is going to receive the preferences.And if you are using south (you need south if you are upgrading)::./manage.py migrateChanging the default separator~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~django-userpreferences uses a separator between the app name and thepreference name in forms. By default the separator is '/'. To override thisin the weird case you might be needing it in some variable name, you needto change it in you settings.py file::PREFERENCES_SEPARATOR = '/'
Package: django-userprofile
AuthorsPraekelt FoundationShaun SephtonChangelog0.0.6 (2012-05-29)After user registered populate profile and user fields from form cleaned data instead of raw POST data.0.0.5 (2012-05-14)One or two small correction and more additions for rename.0.0.4 (2012-05-13)Renamed package from profile to userprofile to prevent clash with builtin Python profile lib.0.0.3 (2010-08-04)Initial release.
Package: django-user-proxy
AuthProxyApp is a Django app containing a single User Proxy model, which is shared between multiple
Django instances.The purpose of this Proxy model is to access a single shared “Users” database between Django
applications, with no explicit foreign relations.It currently operates with a modified User implementation featuring a UUID as a PK, you can easily
implement this by creating your own AbstractUser implementation, and storing all users and permissions
in a single “Users” database.Quick startAdd “auth_proxy” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'auth_proxy'
]Runpython manage.py migrateto create the auth_proxy model.To use the proxy, useauth_proxy.models.UserProxyon foreign relations (like OneToOne, ManyToMany, ManyToOne), instead ofdjango.contrib.auth.models.User. Remember that you’re responsible of creating these proxies, unless you use the optional middlewares.Optional:If you wish to use the Middlewares, include them in settings like this:MIDDLEWARE_CLASSES = (
    ...
    'auth_proxy.middleware.GenerateUserProxy',
    'auth_proxy.middleware.AddUserProxyToRequest'
)GenerateUserProxy will create the UserProxy on user login, and AddUserProxyToRequest will add the UserProxy to the request, where it can be obtained like this: request.user_proxy.An user router is included. It will route the following labels:"admin",
"auth",
"profiles",
"sessions",
"oauth2_provider",
"contenttypes"To a database calledusers, which you should define in settings (refer tohttps://docs.djangoproject.com/en/4.0/topics/db/multi-db/for more instructions). To use this router,
define the following in settings:DATABASE_ROUTERS = [
    ...
    'auth_proxy.routers.UsersRouter'
]Note that upper-most routers will have more importance to Django. If you wish to ensure the router will do its intended purpose, insert it in the first position.RequirementsThis UserProxy is intended to be a shared local reference to a User object found in a separate database. This architecture allows multiple Django instances to share the same Users,
and permissions, while retaining the ability to reference User models.Hence, a shared database is needed, and it should be declared as “users” in all django instances. And a custom User model should be declared, with UUID as primary key.TODOREST endpoints to manage UserProxy instancesErase UserProxy instances when Users are deletedBuildingRunpython-mbuild
Package: django-userpure
# django-userpureBasic feature set for managing users in Django 1.5.With the deprecation of user profiles and the growth ofcustom user models, the need for a new user management systemwas necessary.## InstallationTo install ``django-userpure``, download django-userpure and run:python setup.py insatll## UsageThe following is an example of how to use the Activation feature:``models.py``:class UserManager(UserpureActivationManager, BaseUserManager):def create_user(self, email, password, **extra_fields):now = timezone.now()if not email:raise ValueError('The given email must be set')email = UserManager.normalize_email(email)user = self.model(email=email, is_active=True, is_superuser=False, last_login=now, **extra_fields)user.set_password(password)user.save(using=self._db)return userclass User(UserpureActivationMixin, PermissionsMixin, AbstractBaseUser):objects = UserManager()USERNAME_FIELD = 'email'REQUIRED_FIELDS = []``views.py``:class Activate(View):"""Activate a user by activation key."""activation_key = Noneuser = Noneredirect_url = Nonedef get(self, request):self.activation_key = request.GET.get('activation_key', None)if self.activation_key:self.user = get_user_model().objects.activate(self.activation_key)if self.user:messages.success(request, _("User activated successfully."))else:messages.error(request, _("Could not activate user."))return HttpResponseRedirect(self.redirect_url)## DesignThe idea is that any amount of functionality can be mixed into managers or models.Since there are two types of forms, mixins can be danerous to use with forms.This is largely why forms are left out of the picture for now.### Available models1. ``UserpureActivationMixin`` enables activation of a user.### Available managers1. ``UserpureActivationManager`` enables activation of a user through a manager.
Package: django-user-report
=====User Content Report System=====IOS apps may may require server side has a report system to ensure each content user created can be reporeted and removed. This small django app comes with those essential features that you don't have to implement yourself:1. Query, monitor all tickets users sent from front-end app on Django Admin Page.2. Admin can set priorities, delete content, banning users directly on the admin page.3. Built in REST api for front-end calling and sumbitting a ticket.4. By default, enabled Email notification to target User (content creator).Quick start-----------1. Add "report_system" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'report_system',]2. Configure Those settings (Recommended)::# REPORT SYSTEMREPORT_SLUG_MODEL_MAPPINGS = (('user', AUTH_USER_MODEL),('user_blog', 'blogs.blog'),...)REPORT_EMAIL_RECEIVER_FIELDNAME = {AUTH_USER_MODEL: None,'blogs.blog': 'author',}REPORT_EMAIL_FROM = DEFAULT_FROM_EMAIL3. Run `python manage.py migrate` to create the Report System Tickets models.
Package: django-user-sessions
Django includes excellent built-in sessions, however all the data is hidden
away into base64 encoded data. This makes it very difficult to run a query on
all active sessions for a particular user.django-user-sessionsfixes this
and makes session objects a first class citizen like other ORM objects. It is
a drop-in replacement fordjango.contrib.sessions.I would love to hear your feedback on this package. If you run into
problems, please file an issue on GitHub, or contribute to the project by
forking the repository and sending some pull requests. The package is
translated into English, Dutch and other languages. Please contribute your own
language usingTransifex.Also have a look at the bundled example templates and views to see how you
can integrate the application into your project.Compatible with Django 3.2 and 4.0 on Python 3.7, 3.8, 3.9 and 3.10.
Documentation is available atreadthedocs.org.FeaturesTo get the list of a user’s sessions:user.session_set.filter(expire_date__gt=now())Or logout the user everywhere:user.session_set.all().delete()The user’s IP address and user agent are also stored on the session. This
allows to show a list of active sessions to the user in the admin:And also in a custom layout:InstallationRefer to theinstallation instructionsin the documentation.GeoIPYou need to setup GeoIP for the location detection to work. See the Django
documentation oninstalling GeoIP.Getting helpFor general questions regarding this package, please hop over to Stack
Overflow. If you think there is an issue with this package; check if the
issue is already listed (either open or closed), and file an issue if
it’s not.DevelopmentHow to contributeFork the repository on GitHub and start hacking.Run the tests.Send a pull request with your changes.Provide a translation usingTransifex.Running testsThis project aims for full code-coverage, this means that your code should be
well-tested. Also test branches for hardened code. You can run the full test
suite with:make testOr run a specific test with:make test TARGET=tests.tests.MiddlewareTestFor Python compatibility,toxis used. You can run the full test suite with:toxReleasingThe following actions are required to push a new version:Update release notesIf any new translations strings were added, push the new source language toTransifex. Make sure translators have sufficient time to translate those
new strings:make tx-pushAdd migrations:python example/manage.py makemigrations user_sessions
git commit user_sessions/migrations -m "Added migrations"Update translations:make tx-pullPackage and upload:bumpversion [major|minor|patch]
git push && git push --tags
python setup.py sdist bdist_wheel
twine upload dist/*LicenseThis project is licensed under the MIT license.CreditsThis library was written byBouke Haarsmaandcontributors.