Saravanan666/pypi-org huggingface dataset:
Package: django-u2f
django-u2f provides support for FIDO U2F security tokens in Django. The
functionality is similar to theSecurity Key two-factor authentication that
Google recently announced,
and uses the same tokens.django-u2f isn’t yet production ready, but is a working proof of
concept. There are many TODOs sprinkled around the code that should be
fixed before relying on it.Installation$ pip install django-u2fAdddjango_u2ftoINSTALLED_APPSand includedjango_u2f.urlssomewhere in your url patterns. SetLOGIN_URL = 'u2f:login'. Make sure that Django’s built in login
view does not not have a urlpattern, because it will authenticate users
without their second factor. django-u2f provides its own login view to
handle that.DemoTo see a demo, use the test project included in the repo and perform the
following steps (using virtualenv is optional):git clone https://github.com/gavinwahl/django-u2f
cd django-u2f
virtualenv -p python3 venv
source venv/bin/activate
pip install -e .
cd testproj
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser

# finally create a self-signed certificate and start the webserver
./mkcert.sh
python manage.py runserver_plus --cert localhostFor now the only supported browser is Chrome, version 41 or higher.
U2F also requires that the page is served over a secure connection.Start by going tohttps://localhost:8000/u2f/login. Since you
haven’t added any security keys yet, you will be logged in with just a
username and password. Once logged in, click ‘Add another key’ on the
key management page and follow the instructions. Now your account is
protected by two factor authentication, and when you log in again your
U2F token will be required.You can administrate the keys attached to your account on the key
management page as well, at the URLhttps://localhost:8000/u2f/keys.Using U2F keys on linuxSome distros don’t come with udev rules to make USB HID /dev/
nodes accessible to normal users. If your key doesn’t light up
and start flashing when you expect it to, this might be what is
happening. Seehttps://github.com/Yubico/libu2f-host/issues/2andhttps://github.com/Yubico/libu2f-host/blob/master/70-u2f.rulesfor some
discussion of the rule to make it accessible. If you just want a quick
temporary fix, you can runsudo chmod 666 /dev/hidraw*every time
after you plug in your key (The files disappear after unplugging).Helpful linksThe code to actually implement the crypto in python:https://github.com/Yubico/python-u2flib-serverA description of the process from a developer’s perspective from Yubico:https://developers.yubico.com/U2F/Libraries/Using_a_library.html
Package: django-uaccounts
Pluggable user accounts and profilesdjango-uaccountsis a pluggable Django app that provides
user registration, login/logout and a “forgot password” feature.
Email verification is required for account activation and resetting
password. The app also supports simple user profiles, with multiple
email addresses that can be verified as well.InstallationDownload and install from PyPI:pip install django-uaccountsAdd it to yourINSTALLED_APPS, as well as‘django.contrib.sites’:INSTALLED_APPS=(...'django.contrib.sites',...'uaccounts',...)Make sure you have adjango.contrib.sites.models.Siteinstance saved in your database asdjango-uaccountsneeds it to get the name and the domain of your site to include them in the verification emails.Configure the email settings of your project as they are needed for sending the verification emails.Include the urlconf of the app in your project’s urls.py:fromdjango.conf.urlsimporturl,includeurlpatterns=[...url(r'accounts/',include('uaccounts.urls',namespace='uaccounts')),...]Of course, you can put it under any url you want,
liker’’orr’^mysite/myaccounts/’.Usagedjango-uaccountscan be a very simple standalone app, but its main
purpose is to offer user account capabilities to your project,
complementing your other apps. To test its usage on its own, you should
be ready to go by now. However you probably want to let it know
its “parent url”. This is a url to redirect to after a
successful login, and provide a link for in the “profile” page, so the
user can return to the main aspect of your website. This url can be set
through theUACCOUNTS_HOME_URLsetting.SettingsAll of the app settings are optional but you may want to modify them
to customize to your needs, and most probablyUACCOUNTS_HOME_URLto
connect this app with the rest of your project.UACCOUNTS_HOME_URL: The “parent url”. Can be anstror a call todjango.core.urlresolvers.reverse_lazy.Default:django.core.urlresolvers.reverse_lazy(‘uaccounts:index’)UACCOUNTS_USERNAME_MIN_LENGTH: Minimum allowed characters for username.Default:4UACCOUNTS_PASSWORD_MIN_LENGTH: Minimum allowed characters for password.Default:6UACCOUNTS_STATUS_MAX_LENGTH: Maximum allowed characters for status.Default:200UACCOUNTS_ACTIVATION_EXPIRES: Expiration time of an account activation request, in seconds. Can be anintorNonefor limitless time.Default:24 * 60 * 60UACCOUNTS_CHANGE_PASSWORD_EXPIRES: Expiration time of a “forgot password” request, in seconds. Can be anintorNonefor limitless time.Default:60 * 60UACCOUNTS_VERIFICATION_EXPIRES: Expiration time of an email verification request, in seconds. Can be anintorNonefor limitless time.Default:NoneUACCOUNTS_AVATAR_DIR: Directory for uploading user avatars. It gets appended to yourMEDIA_ROOT.Default:‘avatars/’UACCOUNTS_AVATAR_MAX_HEIGHT: Maximum allowed height for user avatars, in pixels. Avatars get resized (kept in scale) if this is exceeded.Default:200UACCOUNTS_AVATAR_MAX_WIDTH: Maximum allowed width for user avatars, in pixels. Avatars get resized (kept in scale) if this is exceeded.Default:200LicenseBSDAuthorAristotelis Mikropoulos<amikrop@gmail.com>
Package: django-ubigeo-peru
django-ubigeo-peru, is an app that will allow you to easily implement the ubiquites of INEI (Perú) in your django app.ConfigFor Django >= 4.x use django-ubigeo-peru>=0.5.0In yoursettings.pyINSTALLED_APPS=(.....'ubigeos',)Runpython manage.py migrate
python manage.py loaddata ubigeos.jsonIn yoururls.pyFor Django <= 1.11.xurlpatterns=patterns('',.....(r'^ubigeos/',include('ubigeos.urls')),)For Django 2.x and aboveurlpatterns=patterns('',....path('ubigeos/',include('ubigeos.urls')),)LicenseBSD
Package: django-ubivox-email
This is an e-mail backend for Django to route your outgoing e-mail
through your Ubivox account.Enabling this will route calls todjango.core.mail.send_mailtrough Ubivox.SetupTo install the backend:pip install django-ubivox-emailThen add the configuration parameters to your settings:UBIVOX_API_USERNAME = "sample"
UBIVOX_API_PASSWORD = "sample"
UBIVOX_API_URL = "https://sample.clients.ubivox.com/xmlrpc/"

EMAIL_BACKEND = "django_ubivox_email.backend.UbivoxEmailBackend"ReferencesUbivox API DocumentationGet a free Ubivox account (10 day trial)Django e-mail backends
Package: django-ubuntu-deployer
Django Ubuntu DeployerThis is a simple package for deploying django projects on ubuntu server 16.04 or latest.Does what is written in articleHow To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 16.04 | DigitalOcean.In Ubuntu Serverubuntu@server:~# cd /home/
ubuntu@server:/home# sudo apt-get update
ubuntu@server:/home# sudo apt-get install python3-pip python3-dev libpq-dev nginxInstall virtualenv for creating virtual environment:ubuntu@server:/home# pip3 install virtualenvCreate project folder and enter in:ubuntu@server:/home# mkdir project && cd projectCreate virtual environment and activate:ubuntu@server:/home/project# virtualenv venv
ubuntu@server:/home/project# source venv/bin/activateInstall Django, django_ubuntu_deployer and gunicorn(venv)ubuntu@server:/home/project# pip install django django_ubuntu_deployer gunicornRegister django_ubuntu_deployer in INSTALLED_APPSINSTALLED_APPS=[...,'ubuntu_deployer',]Add domains to ALLOWED_HOSTS:ALLOWED_HOSTS=['your domain 1',...,'your domain n',]Collectstatic files:(venv)ubuntu@server:/home/project# python manage.py collectstaticNow deploy your APP in Ubuntu Server (use for this username and password):(venv)ubuntu@server:/home/project# python manage.py deployOr restart server(venv)ubuntu@server:/home/project# python manage.py deploy --restartConfigure gunicorn, nginx and virtual environment folderIn your settings.py:DJANGO_UBUNTU_DEPLOYER={# gunicorn config# required in gunicorn config {user}, {path}, {gunicorn}, {sock}, {name}'GUNICORN_CONFIG':"""Description=gunicorn daemonAfter=network.target[Service]User={user}Group=www-dataWorkingDirectory={path}ExecStart={gunicorn}--access-logfile - --workers 3 --bind unix:{sock}{name}.wsgi:application[Install]WantedBy=multi-user.target""",# nginx config# required in nginx config {domains}, {static}, {media}, {path}, {sock}, {extras}'NGINX_CONFIG':"""server {{listen 80;server_name{domains};location = /favicon.ico {{ access_log off; log_not_found off; }}location{static}{{root{path};}}location{media}{{root{path};}}location / {{include proxy_params;proxy_pass http://unix:{sock};}}{extras}}}""",# nginx_config extras'NGINX_EXTRAS':'',}
Package: django-uecookie9
Small app that detects if the current user is located in the European Union. If so, a small notification about cookies is displayed. Once notification is closed by the user, it will not appear anymore.uecookie9also creates a FlatPage with a Cookie Policy.Requirementspygeoipdjango.contrib.flatpagesInstallationInstall via pip:pip install django-uecookie9Adduecookie9to yourINSTALLED_APPSAdddjango.core.context_processors.requestto yourTEMPLATE_CONTEXT_PROCESSORS:from django.conf import settings
 TEMPLATE_CONTEXT_PROCESSORS = settings.TEMPLATE_CONTEXT_PROCESSORS + (
        'django.core.context_processors.request',
)Override templateuecookie9/policy.htmlwith your actual Cookie Policy.Execute the command below (creates a FlatPage/cookies/):python manage.py uecookie9UsagePaste the following code in the right place in your template:{% load uecookie9 %}{% uecookie9 %}CustomizationBy default, notification is wrapped in a fixed div that shows at the bottom of the page. In order to customize it you have to create your own version of templateuecookie9/message.html.DisclaimerThere is no guarantee that this app is enough to meet UE requirements. Use at your own risk.Notesuecookie9was tested with Django 1.6.5, however it should work with newer or older versions as well.This application includes GeoLite2 data created byMaxMind.
Package: django-ueditor
DJANGO UEditor PluginsThis project provide the ability for easy use UEditor in django admin and other pages in django.Many code is from other project, such as: django-ckeditor and so on.RequiredInstall or add django-ueditor to your environment.pip install django-ueditoraddueditorto yourINSTALLED_APPSsetting.add UEditor URL include to your project'surls.pyfile:re_path(r'^ueditor/', include('ueditor.urls')),UsageFieldThe quickest way to add rich text editing capabilities to your models is to use theUEditorFieldmodel field type.
For example:from django.db import models
from ueditor import UEditorField

class Post(models.Model):
    content = UEditorField('内容')That's all you need to do, enjoy the plugins and feel free to contact me when you has any problem with it.
Package: django-ug
This repository contains a modified version of the Django web framework that includes support for the Uyghur language (ug) in all three scripts: Arabic, Latin, and Cyrillic.FeaturesFull support for Uyghur language in Arabic, Latin, and Cyrillic scripts.
Includes translation files for all three scripts.
Compatible with Django 4.x versions.UsageTo use the Uyghur language support in your Django project, update the LANGUAGE_CODE setting in your settings.py file to ‘ug’ for Uyghur in Arabic script,‘ug@latin’ for Uyghur in Latin script, or‘ug@cyrillic’ for Uyghur in Cyrillic script.For example, to use Uyghur in Arabic script, add the following line to your settings.py file:` LANGUAGE_CODE = 'ug' `About DjangoDjango is a high-level Python web framework that encourages rapid development
and clean, pragmatic design. Thanks for checking it out.All documentation is in the “docs” directory and online athttps://docs.djangoproject.com/en/stable/. If you’re just getting started,
here’s how we recommend you read the docs:First, readdocs/intro/install.txtfor instructions on installing Django.Next, work through the tutorials in order (docs/intro/tutorial01.txt,docs/intro/tutorial02.txt, etc.).If you want to set up an actual deployment server, readdocs/howto/deployment/index.txtfor instructions.You’ll probably want to read through the topical guides (indocs/topics)
next; from there you can jump to the HOWTOs (indocs/howto) for specific
problems, and check out the reference (docs/ref) for gory details.Seedocs/READMEfor instructions on building an HTML version of the docs.Docs are updated rigorously. If you find any problems in the docs, or think
they should be clarified in any way, please take 30 seconds to fill out a
ticket here:https://code.djangoproject.com/newticketTo get more help:Join the#djangochannel onirc.libera.chat. Lots of helpful people
hang out there. Seehttps://web.libera.chatif you’re new to IRC.Join the django-users mailing list, or read the archives, athttps://groups.google.com/group/django-users.To contribute to Django:Check outhttps://docs.djangoproject.com/en/dev/internals/contributing/for
information about getting involved.To run Django’s test suite:Follow the instructions in the “Unit tests” section ofdocs/internals/contributing/writing-code/unit-tests.txt, published online athttps://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#running-the-unit-testsSupporting the Development of DjangoDjango’s development depends on your contributions.If you depend on Django, remember to support the Django Software Foundation:https://www.djangoproject.com/fundraising/
Package: django-ui
Django UIDynamic fields and settings theme color adminConditional fields show/hiddenShow or hidden fieldsChanged color theme admin appPreview of images in formsVersion Python:^3Version django:^2.2Installationpip install django_uiAdd of firstdjango_uito your installed appsRun migrations./ manage.py migrationsUsage (Show or hidden fields)Conditional choiceAdd the class{name_choice} j__{key_choice}to the trigger elementConditional CheckboxAdd the classj__{name_bolean}to the trigger elementTo use, create the forms.py file and add the class created in ModelAdminExample choice:{name_choice} j__{key_choice}forms.pyfromdjangoimportformsclassModelExampleForm(forms.ModelForm):occupation=forms.ChoiceField(choices=[('study','Study'),('work','Work')],)study=forms.CharField(label='Name Institution',required=False,widget=forms.TextInput(attrs={'class':"occupation j__study"}))semester=forms.CharField(label='Semester',required=False,widget=forms.TextInput(attrs={'class':"occupation j__study"}))company=forms.CharField(required=False,widget=forms.TextInput(attrs={'class':"occupation j__work"}))position=forms.CharField(required=False,widget=forms.TextInput(attrs={'class':"occupation j__work"}))admin.pyfromdjango.contribimportadminfromyour_app.formsimportModelExampleFormfromyour_app.modelsimportModelExampleclassModelExampleAdmin(admin.ModelAdmin):model=ModelExampleform=ModelExampleForm\Example checkbox:j__{name_bolean}fromdjangoimportformsclassModelExampleForm(forms.ModelForm):...nick=forms.BooleanField(required=False,label='Add NickName?',help_text='Select if you want to add NickName',widget=forms.CheckboxInput())nickname=forms.CharField(required=False,widget=forms.TextInput(attrs={'class':"j__nick"}))NOTE:In the form just add the fields you want to be dynamicPreviewUsage (Show or hidden fields)Create as many themes as you want and activate the one you wantExample of image filePreview of images in formsBy default app hidden:Show model example:In settings create varDJANGO_UI_SHOW_MODEL_EXAMPLE_DYNAMIC = TrueUse model theme:In settings create varUSE_APP_THEME_UI_ADMIN = TrueMade with ♥ byJose Florez
Package: django-uicomponents
Django UI ComponentsReusable UI components for your Django templatesUsageCreate a component file, such as./templates/components/button.html.<buttonclass="px-4 py-2 font-semibold rounded-lg shadow text-sm text-white{% if variant == 'danger' %}bg-red-500 hover:bg-red-400{% elif variant == 'success' %}bg-green-500 hover:bg-green-400{% else %}bg-blue-500 hover:bg-blue-400{%endif%}">{{ text }}</button>Loadcomponentsat the top of your template and include the UI component by using thecomponenttemplate tag possibly with keyword arguments.{% load static %}
{% load components %}<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metahttp-equiv="X-UA-Compatible"content="ie=edge"><title>Django UI Components</title><linkrel="stylesheet"href="{% static 'css/styles.css' %}"><linkrel="icon"type="image/x-icon"href="{% static 'favicon.ico' %}"></head><bodyclass="bg-gray-50 flex items-center min-h-screen justify-center">{% component 'button.html' text="Delete" variant="danger" %}
    {% component 'button.html' text="Save" variant="success" %}
    {% component 'button.html' text="Ok" %}</body></html>This results in three button variations.InstallInstall the package frompypi.$ pip install django-uicomponentsAdddjango_uicomponentsto your INSTALLED_APPS.# settings.pyINSTALLED_APPS=[...'django_uicomponents',...]SettingsOptionDescriptionDefaultCOMPONENTS_DIRDirectory inside your template dir from which components are loaded.'components'LicenseReleased under theMIT license.
Package: django-uidfield
AboutPretty UID fields for your Django models, with customizable prefixes and
controlled length. Tested vs. Python 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 and
Django 2.2, 3.1, 3.2, 4.0, 4.1.UsageSee examples below. You can optionally inherit your models fromUIDModel,
which gracefully handles IntegrityError on saving UIDs, making up to 3 attempts
with random UIDs. Integrity errors should be pretty rare if you use large enoughmax_lengthon your fields, but you may still want to use it for extra safety:from django_uidfield.fields import UIDField

class YourModel(models.Model):
    uid_field = UIDField(prefix='tmp_', max_length=20)

# the value will be like 'tmp_Akw81LmtPqS93dKb'or:from django_uidfield.models import UIDModel
from django_uidfield.fields import UIDField


class YourModel(UIDModel):
    uid_field = UIDField(prefix='tmp_', max_length=20)Adding a UIDField to an existing modelYou can populate the field with a data-migration:def populate_uid(apps, schema_editor):
    User = apps.get_model("users", "User")

    for user in User.objects.all():
        user._meta.get_field("uid").populate(user, force_renew=True)
        user.save()


class Migration(migrations.Migration):
    operations = [migrations.RunPython(code=populate_uid)]Note that the 3-attempt deduplication mechanism will not work, and you can get
an error if you have a lot of objects and a small max_length.Changelog
Package: django-uikit-admin
=====Django Uikit Admin=====Django Uikit Admin is a modern grid based skin for Django built-in administration interface.Detailed documentation is in the "docs" directory.Quick start-----------1. Install Django Uikit Admin using pip::pip install django-uikit-admin2. Add "uikit_admin" to your INSTALLED_APPS setting like this::INSTALLED_APPS = ['uikit_admin',...]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/(you'll need the Admin app enabled).
Package: django-uikit-editor
What’s thatuikit_editoris a reusable application for Django, usingUiKit editorDependenceDjango >= 1.3Getting startedInstalluikit_editor:`pip installdjango-uikit-editor`Add‘uikit_editor’to INSTALLED_APPS.Using in modelfromdjango.dbimportmodelsfromuikit_editorimportUiKitFieldclassEntry(models.Model):title=models.CharField(max_length=250,verbose_name=u'Title')text=UiKitField(verbose_name=u'Text')or use custom parametrs:text=UiKitField(verbose_name=u'Text',mode="tab",# 'split', 'tab' default 'split'markdown=True#default False)Using for only admin interfacefromdjangoimportformsfromuikit_editorimportUiKitWidgetfromblog.modelsimportEntryclassEntryAdminForm(forms.ModelForm):classMeta:model=Entrywidgets={'text':UiKitWidget(),}classEntryAdmin(admin.ModelAdmin):form=EntryAdminFormUiKitWidgettakes the same parameters asUiKitField.ContributingFork it!Create your feature branch:git checkout -b my-new-featureCommit your changes:git commit -am ‘Add some feature’Push to the branch:git push origin my-new-featureSubmit a pull request =]
Package: django-ui-permissions
WARNING:This module is under development and is more a proof of concept than ready solutiondjango-ui-permissionstries to speed up adding and managing very detailed permissions.
Detailed enough so that you can specify which fields or page elements are visible or editable for given role.
It does all that independently from typical Model permissions. Instead you describe role by what given user can do on
web page (e.g what part of web page does he sees or what fields he can edit).
Package: django-ulid
Universally Unique Lexicographically Sortable Identifier
(ULID)support inDjango.StatusThis project is actively maintained.InstallationTo install django-ulid frompip:$pipinstalldjango-ulidTo install ulid from source:$gitclonegit@github.com:ahawker/django-ulid.git$cddjango-ulid&&pythonsetup.pyinstallUsageAdding a ULID field to your Django models is straightforward. It can be
a normal field or a primary key.fromdjango.dbimportmodelsfromdjango_ulid.modelsimportdefault,ULIDFieldclassPerson(models.Model):id=ULIDField(default=default,primary_key=True,editable=False)Passing indefaultto theULIDFieldwill automatically create a
default value using theulid.newfunction. If you do not want a default value,Noneby default, feel
free to omit it.fromdjango.dbimportmodelsfromdjango_ulid.modelsimportULIDFieldclassPerson(models.Model):optional_id=ULIDField()Adding a ULID field to yourDjango REST
Frameworkserializers is
also straightforward.Simply importing thedjango_ulid.serializersmodule will
automatically register theULIDFieldserializer by overriding theserializer_field_mappingon the defaultModelSerializer.fromdjango_ulidimportserializersIf you are using a ULID as a primary key on a model, you need to create
a customPrimaryKeyRelatedFieldto automatically serialize the instance through the foreign key.importfunctoolsfromdjango_ulid.serializersimportULIDFieldfromrest_frameworkimportserializersPersonPrimaryKeyRelatedField=functools.partial(serializers.PrimaryKeyRelatedField,allow_null=True,allow_empty=True,pk_field=ULIDField(),queryset=Person.objects.all())classOrganizationSerializer(serializers.ModelSerializer):owner=PersonPrimaryKeyRelatedField()ContributingIf you would like to contribute, simply fork the repository, push your
changes and send a pull request. Pull requests will be brought into themasterbranch via a rebase and fast-forward merge with the goal of
having a linear branch history with no merge commits.LicenseApache 2.0DependenciesDjangoulid-py
Package: django-ulogin
Описаниеdjango-ulogin— подключаемое универсальное django-приложение для социальной аутентификации пользователей с помощью внешнего интернет-сервисаuLoginAttention!Создатели приложения никак не связаны с интернет-сервисомuLogin, поэтому все вопросы, касающиеся непосредственно работы сервиса, а не этого приложения, просьба отправлять наteam@ulogin.ru.Подробная документация проекта доступна наRead the Docs.
Package: django-ultimatethumb
django-ultimatethumbis another Django library for generating thumbnails but
has some advantages:Thumbnails are not generated when the templatetag is called. Instead, images
are generated on demand when they are requested by the browser. This can
lead to a major speedup of your page response times.Thumbnails can be generated from static files too (for example to downscale
retina-optimized images and therefore reducing traffic).Generate multiple thumbnail sizes at once for use inpicturehtml tags with
multiple sources (e.g. with media queries).Requirementsdjango-ultimatethumb supports Python 3 only and requires at least Django 1.11.Prepare for developmentA Python 3.6 interpreter is required in addition to pipenv.$poetryinstallNow you’re ready to run the tests:$maketestsResourcesDocumentationBug TrackerCode