Saravanan666/pypi-org huggingface dataset:
Package: django-reversion-extras
Extra tools to work with django-reversion!DANGER!It is not ready for use, it does not have tests and only serves to try to validate the use of django-reversion for things which it was not designedDocumentationThe full documentation is athttps://django-reversion-extras.readthedocs.org.QuickstartInstall django-reversion-extras:pip install django-reversion-extrasThen use it in a project:from reversion_extras.views import DetailVersionListView, UpdateVersionListViewDetailVersionListViewprovides the same functionality as django.views.generic.DetailViewUpdateVersionListViewprovides the same functionality as django.views.generic.UpdateViewAll inject in the template context some new variables:object_versions_list: contains the list of django-reversion Versions of current model instance. The same
value  returned fromreversion.get_for_object(model_instance)model_name_versions_list: is a alias to object_versions_listversion_paginatorversion_page_objversion_is_paginatedFeaturesTODO:Create ReversionView
Create CompareVersionViewHistory0.1.0 (2015-06-26)First release on PyPI.
Package: django-reversion-pynamodb
django-reversion-pynamodbis an extension to the Django web framework that provides
version control for model instances. Library extendsdjango-reversion-pynamodblibrary and provides
possibility to store version data in DynamoDB database.RequirementsPython 3.6 or laterDjango 2.2 or laterFeaturesRoll back to any point in a model instance’s history.Recover deleted model instances.Simple admin integration.DocumentationCheck out the latestdjango-reversion-pynamodbdocumentation atGetting StartedIssue tracking and source code can be found at themain project website.UpgradingPlease check theChangelogbefore upgrading
your installation of django-reversion-pynamodb.ContributingBug reports, bug fixes, and new features are always welcome. Please raise issues on thedjango-reversion-pynamodb project site, and submit
pull requests for any new code.Fork therepositoryon GitHub.Make a branch off of master and commit your changes to it.Install requirements.$pipinstalldjangopsycopg2mysqlclient-e.Run the tests$tests/manage.pytesttestsCreate a Pull Request with your contributionContributorsThe django-reversion-pynamodb project was developed byDave Halland contributed
to bymany other people.
Package: django-reversion-rest-framework
django-reversion-rest-frameworkA package for adding a django-reversion history endpoint to django-rest-framework ModelViewSet.ConfigurationFollow the official website for the installation and the integration of django-reversion in your project, otherwise future steps won't work.You might need to enable theReversionMiddlewarefor storing a version for each API change.Follow the instructionshere,
you should add'reversion.middleware.RevisionMiddleware'to yourMIDDLEWAREsetting.Using the HistoryModelViewSetTheHistoryModelViewSetextends django-rest-framework'sModelViewSetaddinga GEThistoryaction in the detail (/my-model-url/<pk>/history/)displaying a list of all revisions of that specific recorda GETversionaction in the history detail (/my-model-url/<pk>/history/<version_pk>/)displaying a specific revisions of that specific recorda GETdeletedaction in the list (/my-model-url/deleted/)displaying a list of all deleted recordsa POSTrevertaction in the detail (/my-model-url/<pk>/revert/<version_pk>/)allowing users to revert to a previous revision of the objectYou can use theHistoryModelViewSetin place of theModelViewSetduring viewsets definition.fromreversion_rest_framework.viewsetsimportHistoryModelViewSetclassMyModelViewSet(HistoryModelViewSet):# ...For advanced or selective implementation, you can usereversion_rest_framework.mixins.HistoryMixincontainshistoryandversionactionsDeletedMixincontains only thedeletedactionReadOnlyMixincontainshistory,versionanddeletedactionsRevertMixincontainshistory,versionandrevertactionsCustomizing the VersionSerializerTheHistoryModelViewSetcomes up with actions using aVersionSerializer.To customize the serializer with one of your own, you can useversion_serializer.For example, if you want to customize theuserserializer inside a revision,
you can use the following code:fromdjango.contrib.auth.modelsimportUserfromrest_frameworkimportserializersfromreversion.modelsimportRevision,Versionfromreversion_rest_framework.serializersimport(RevisionSerializer,VersionSerializer,)fromreversion_rest_framework.viewsetsimportHistoryModelViewSetclassUserSerializer(serializers.ModelSerializer):classMeta:model=Userfields=["id","username"]classCustomRevisionSerializer(RevisionSerializer):user=UserSerializer()classCustomVersionSerializer(VersionSerializer):revision=CustomRevisionSerializer()classMyModelViewSet(HistoryModelViewSet):version_serializer=CustomVersionSerializer# ...
Package: django-reviewable
Reviewable provides simple, customizable reviews for any of your Django models. The templates for each of your reviewable
models can be customised with ease.Quick Start$pipinstalldjango-reviewableAdd “Reviewable” to your INSTALLED_APPS setting:INSTALLED_APPS=[...'Reviewable',...]Include the Reviewable URLconf in your projects urls.py:url(r'^reviews/',include('Reviewable.urls',namespace='Reviewable')),Runpython manage.py migrateAdd the mixinReviewableto any model you want to be reviewable....fromReviewable.modelsimportReviewable...classReviewableModel(models.Model,Reviewable):...Custom TemplatesReviewable allows you to customise the templates for each reviewable model. Furthemore, the reviewable object is magically
made available in the template context.For example:You have a model calledHotelin an app calledHotelYou want a custom template for the review creation viewYou would add a template inHotel/templates/Hotelcalledhotel_review_create.htmlNote: This the template name has to be in camel case and all lower caseThe hotel object is made available in the template context by the usual{{ hotel }}tagThis can be repeated for templates for all views:hotel_review_list.html,hotel_review_update.html,hotel_review_confirm_delete.htmlandhotel_review_detail.htmlTemplate TagsReviewable provides one simple but useful template inclusion tag that will include controls for your reviewable object.To use this just load in the template tag:{%loadreviewable%}...{%show_review_controlsreviewable_object%}The template for the inclusion tag is very basic so it is a good idea to override it in the usual Django fashion.
The name of the template is “Reviewable/__review_controls.html”.Post Delete SignalsDeletion of a reviewable object won’t automatically cause a cascade delete of all of the objects reviews. Hence, it
is a good idea to use the post delete signal somewhere in your app as below:fromMyApp.modelsimportReviewableModelfromdjango.db.models.signalsimportpost_delete...post_delete.connect(ReviewableModel.delete_reviews,sender=ReviewableModel)SettingsAll settings are shown below with their defaults.REVIEW_RATING_CHOICESREVIEW_RATING_CHOICES=((1,'1 Star'),(2,'2 Star'),(3,'3 Star'),(4,'4 Star'),(5,'5 Star'))REVIEW_DELETE_SUCCESS_URLREVIEW_DELETE_SUCCESS_URL='/'REVIEW_STREAM_ENABLEDReviewable can utilise GetStream if required. This would mean reviews are automatically published to your GetStream.io
feed. Seehttps://github.com/GetStream/stream-djangofor more informationREVIEW_STREAM_ENABLED=False
Package: django-reviews
What is it?A review consists of a comment and a rating. Reviews can be attached to
arbitrary content objects.Features:Anonymous / personalized reviewsFlexible rating scoresOptional moderationOptional previewDocumentationFor more documentation please visit:http://packages.python.org/django-reviews/Changes1.2.1 (2017-03-03)Handle review requests which does not exist (Maciej Wiśniowski)1.2 (2017-02-19)Adds Django 1.10 support1.1 (2015-04-20)Adds Django 1.8 support1.0 (2014-06-08)Adds Django 1.6 support0.2.1 (2009-10-17)Added more testsUpdated installation section of documentation0.2.0 (2009-10-13)Addedget_best_ratedandget_best_rated_for modelmethodsAdded tests for utils’ methods0.1.1 (2009-10-13)Added documentationAdded a simple example0.1.0 (2009-10-11)Initial public release
Package: django-revision
django-revisionAdd a Django field class to your models to track the git revision with every model instance saved.python 3.7, Django 3.0+. UsesGitPython.For example:fromdjango.dbimportmodelsfromdjango_revisionimportRevisionFieldclassTestModel(models.Model):revision=RevisionField()>>>test_model=TestModel.objects.create()>>>test_model.revision'0.1dev0'If the source is modified after the git tag was applied:>>>test_model=TestModel.objects.create()>>>test_model.revision>>>'0.1dev0-35-ge9f632e:develop:e9f632e92143c53411290b576487f48c15156603'Reference git information from anywhere in your app:>>>fromdjango_revisionimportsite_revision>>>site_revision.tag'0.1dev0'>>>site_revision.revision'0.1dev0'For research trial data, we need to track the source code revision at time of data collection. We deploy our source as a git branch and django-revision picks up thetag:branch:commitand updates
each saved model instance as data is collected.InstallationAdd to settings:INSTALLED_APPS=[...'django_revision.apps.AppConfig',...]If yourgitworking directory is something other thansettings.BASE_DIRaddGIT_DIRtosettingswith the path to yourgitworking directory. For example:GIT_DIR=BASE_DIR.ancestor(2)If you have a deployment case where the source folder is not agitrepo, you can set the revision manually in settings:REVISION='0.1.3'Using in a View and TemplateIn the view’sget_context_dataset a context attribute torevision.tagor just use theRevisionMixin:fromdjango_revision.viewsimportRevisionMixinclassMyView(RevisionMixin,TemplateView):...In your template:{%blockfooter%}<footerclass="footer"><divclass="container"><divclass="col-md-4"><pclass="text-muted text-center"><small>{{year}}&nbsp;{{institution}}</small></p></div><divclass="col-md-4"><pclass="text-muted text-center"><small>Revision:{{revision}}</small></p></div><divclass="col-md-4"><pclass="text-muted text-center"><small>ForResearchPurposesOnly</small></p></div></div></footer>{%endblockfooter%}
Package: django-revproxy
A simple reverse proxy using Django. It allows to use Django as a
reverse Proxy to HTTP requests. It also allows to use Django as an
authentication Proxy.Documentation available athttp://django-revproxy.readthedocs.org/FeaturesProxies all HTTP methods: HEAD, GET, POST, PUT, DELETE, OPTIONS, TRACE, CONNECT and PATCHCopy all http headers sent from the client to the proxied serverCopy all http headers sent from the proxied server to the client (excepthop-by-hop)Basic URL rewriteSets the http header REMOTE_USER if the user is logged in DjangoSets the http headers X-Forwarded-For and X-Forwarded-ProtoHandles redirectsFew external dependenciesApply XSLT transformation in the response (requires Diazo)Dependenciesdjango >= 3.0urllib3 >= 1.12diazo >= 1.0.5 (optional)lxml >= 3.4, < 3.5 (optional, but diazo dependency)Installpip installdjango-revproxy
Package: django-revproxy-coprocure
ATTENTION
This is a FORK of jazzband/django-revproxy created for a specialized usecase. It is not intended for public use.
ATTENTIONA simple reverse proxy using Django. It allows to use Django as a
reverse Proxy to HTTP requests. It also allows to use Django as an
authentication Proxy.Documentation available athttp://django-revproxy.readthedocs.org/FeaturesProxies all HTTP methods: HEAD, GET, POST, PUT, DELETE, OPTIONS, TRACE, CONNECT and PATCHCopy all http headers sent from the client to the proxied serverCopy all http headers sent from the proxied server to the client (excepthop-by-hop)Basic URL rewriteSets the http header REQUEST_USER if the user is logged in DjangoSets the http headers X-Forwarded-For and X-Forwarded-ProtoHandles redirectsFew external dependenciesApply XSLT transformation in the response (requires Diazo)Dependenciesdjango >= 1.8urllib3 >= 1.12diazo >= 1.0.5 (optional)lxml >= 3.4, < 3.5 (optional, but diazo dependency)Installpip installdjango-revproxy-coprocure
Package: django-revproxy-fix
A simple reverse proxy using Django. It allows to use Django as a
reverse Proxy to HTTP requests. It also allows to use Django as an
authentication Proxy.Documentation available athttp://django-revproxy.readthedocs.org/FeaturesProxies all HTTP methods: HEAD, GET, POST, PUT, DELETE, OPTIONS, TRACE, CONNECT and PATCHCopy all http headers sent from the client to the proxied serverCopy all http headers sent from the proxied server to the client (excepthop-by-hop)Basic URL rewriteSets the http header REQUEST_USER if the user is logged in DjangoHandles redirectsFew external dependenciesApply XSLT transformation in the response (requires Diazo)Dependenciesdjango >= 1.8urllib3 >= 1.12diazo >= 1.0.5 (optional)lxml >= 3.4, < 3.5 (optional, but diazo dependency)Installpip installdjango-revproxy
Package: django-revproxy-verteva
A simple reverse proxy using Django. It allows to use Django as a
reverse Proxy to HTTP requests. It also allows to use Django as an
authentication Proxy.Documentation available athttp://django-revproxy.readthedocs.org/FeaturesProxies all HTTP methods: HEAD, GET, POST, PUT, DELETE, OPTIONS, TRACE, CONNECT and PATCHCopy all http headers sent from the client to the proxied serverCopy all http headers sent from the proxied server to the client (excepthop-by-hop)Basic URL rewriteSets the http header REQUEST_USER if the user is logged in DjangoHandles redirectsFew external dependenciesApply XSLT transformation in the response (requires Diazo)Dependenciesdjango >= 1.8urllib3 >= 1.12diazo >= 1.0.5 (optional)lxml >= 3.4, < 3.5 (optional, but diazo dependency)Installpip installdjango-revproxy
Package: django-revuo
=====Revuo=====Revuo is a simple CMS app for Django.News----Version 0.4 -* refactored models (not compatible with previous versions)Version 0.3 -* python 3 migration* coding style improvementsVersion 0.2.1 -* test updates, passing with django 1.7Version 0.2 -* using summernote wysiwyg editor* removing Video items, because it easy to embed them on news or postsVersion 0.1.1 -* styling pages* static handlingVersion 0.1 -basic, first versionQuick start-----------1. Add revuo and summernote to your INSTALLED_APPS settings like this:INSTALLED_APPS = {...'revuo','django_summernote',}2. Import and include revuo and summernote urls in your urls.py like this:from revuo.urls import urlpatterns as revuo_patterns...# revuo urlsurl(r'', include(revuo_patterns, namespace='revuo')),# summernote urlsurl(r'^summernote/', include('django_summernote.urls')),# password recovery urlsurl(r'^restricted/password/change$','django.contrib.auth.views.password_change',name='password_change'),url(r'^restricted/password/ok$','django.contrib.auth.views.password_change_done', {},name='password_change_done'),3. Run 'python manage.py migrate' to create revuo models4. Start the server
Package: django-rework
Django ReworkRapid develop framework base on Django, with non-verbose Django development experience.Installation& Cli commandsRequirementsPython >= 3.8Django >= 3.2Django REST framework >=3.13,<4.0Install django-reworkpipinstalldjango-reworkGeneric CLI CommandsStart a new project# It will create project in current dir# eg: initialize a new project named `pony`reworkinitponyAdd build-in contrib AppsreworkaddusersAdd deployment configurationsreworkdeploy--initDeploy to test or productionreworkdeploy# or 'fab -H web1 deploy'Core docsCustom exceptionsThe exception handler must also be configured in your settings, using the EXCEPTION_HANDLER setting key. For example:REST_FRAMEWORK={'EXCEPTION_HANDLER':'rework.core.views.exception_handler'}Use build-in custom exceptions:fromrework.core.exceptionsimportValidateErrorValidateError(detail='You do not have permission to perform this action.',code='permission_denied',)🥭Build-in custom exceptionsApp docsAppDescriptiondocs in English简体中文文档usersUsers systemusers.mdusers_cn.mdDevOps Fabric scriptsSetup hostsdjango-reworkdeal with DevOps usingFabric. You should add hosts configurations infabfile.py.importosfromrework.core.devops.hostsimportloads# The first argument `default` is host alias# `user` is optional, default value is `root`# `envs` is the server support deploy environments# `exclude_components` is optional, it's been used in `fab setup_server`loads('default',{'host':'your-server-ip','port':22,'user':'root','connect_kwargs':{'password':'server-password',},'envs':['test','prod'],'exclude_components':['redis'],})# Using SSH keyloads('web1',{'host':'your-server-ip','connect_kwargs':{'key_filename':os.path.join(os.path.abspath('.'),'.deploy/private.pem'),},})You can change host alias as you like:web1etc.fab-Hweb1deployif not-Hprovided, the default alias will use according the order below:environment name:dev,test,proddefaultDeploy environmentsBy default, environments isdev,test,prod, every environment name is a generic fabric tasks.# deploy to `test` environmentfabtestdeployIf you want to update requirements, you should add arguments-ror--requirements_updatefabtestdeploy-r
Package: djangorf-accounts
========Accounts========Accounts es un app de Django que permite el control y manejo de cuentas de usuario por medio del uso de tokens. Utiliza el Django Rest Framework.Accounts contiene las siguientes funcionalidades:- Registro de usuario.- Login y logout.- Expiracion de tokens.Inicio rapido-------------1. Agrega "accounts" a tus apps instaladas::INSTALLED_APPS = (...'accounts.apps.AccountsConfig',)2. Instala Django Rest Framework y agregalo a tus apps instaladas asi::INSTALLED_APPS = (...'rest_framework','rest_framework.authtoken')3. Registra el modelo de usuario y el backend de autenticacion en tu archivo settings::AUTH_USER_MODEL = 'accounts.User'AUTHENTICATION_BACKENDS = ('accounts.authentication.CustomAuthenticationBackend')4. Agrega el tiempo de expiracion para los tokens en tu archivo settings::EXPIRATION_TIME = 245. Registra tus clases de permisos y autenticacion para el rest framework, puedes usar algo como esto::REST_FRAMEWORK = {'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticated',),'DEFAULT_AUTHENTICATION_CLASSES': ('accounts.authentication.ExpiringTokenAuthentication',),'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend','rest_framework.filters.SearchFilter'),'PAGINATE_BY': 10}6. Incluye las urls de accounts en tu proyecto, algo asi::from accounts import urls as accounts_urlsurl(r'^accounts/', include(accounts_urls))7. Corre las pruebas para aseguranos que el paquete se instalo correctamente::python3 manage.py test accounts
Package: django-rf-candv-choices
Usedjango-candv-choiceswithdjango-rest-framework.Table of contentsInstallationUsageSerializing choicesExposing choices to the outer worldChangelogInstallationInstall fromPyPI:$pipinstalldjango-rf-candv-choicesUsageSerializing choicesFor example, you have some model which usescandv_x.django.choices.ChoiceFieldto store one of allowed values. This
might be aUsermodel, which hasuser_rolefield, where values foruser_roleare defined byUSER_ROLESconstants container.Usecandv_x.rest_framework.choices.ChoiceFieldforuser_roleserialization:fromrest_frameworkimportserializersfromcandv_x.rest_framework.choicesimportChoiceFieldfrom.constantsimportUSER_ROLESfrom.modelsimportUserclassUserSerializer(serializers.ModelSerializer):user_role=ChoiceField(USER_ROLES)classMeta:model=Userfields=('id','name','user_role',)Exposing choices to the outer worldIf you need to expose list of possible choices for your field, then you can
use aChoicesListbase view to get a class-based view:fromcandv_x.rest_framework.choicesimportChoicesListfrom.constantsimportUSER_ROLESclassUserRoleList(ChoicesList):choices=USER_ROLESThe only thing you need to do is to definechoicesattribute.There is a faster way also: you can use acoalitions_listview factory to
get a function-based view:fromcandv_x.rest_framework.choicesimportsimple_choices_listfrom.constantsimportUSER_ROLESuser_role_list=simple_choices_list(USER_ROLES)ChangelogYou can click a version name to see a diff with the previous one.1.0.0(Aug 1, 2015)Initial version
Package: django-rgbfield
django-rgbfield=====================An extension to the Django web framework that provides database and form color fields to accept RGB encoded colorin HEX and store it as 4 bytes int.Why use it?-------It saves up to 3 bytes for you!!! :)The only loss is when you want to save color in packed form (i.e. you trying to save 'abc' (not '#abc'), which is 3 bytes but its intrepresentation is 4 bytes)Installation-------Python package:```pip install django-rgbfield```No need to include 'rgbfield' to INSTALLED_APPS because it provides only fields and nothing more.Usage-------```pythonfrom django.db import modelsfrom rgbfield.fields import RGBColorFieldclass ExampleModel(models.Model):color = RGBColorField(default='#fff')```You can both generate form using ModelForm class or do it manually:```pythonfrom django import formsfrom rgbfield.fields import RGBColorFormFieldclass ExampleForm(forms.Form):color = RGBColorFormField(default='#fff')```
Package: django-rgd-3d
Resonant GeoData 3DA subapplication of Resonant GeoData for storing 3D data with an optional
spatial reference.InstallationFollow the instructions for the coredjango-rgdapp first, thenpip install --find-links https://girder.github.io/large_image_wheels django-rgd-3dAdd this app to yourINSTALLED_APPSalong with the core RGD app:INSTALLED_APPS+=['django.contrib.gis','rgd','rgd_3d',]ModelsThis app adds a few additional models on top of the core app for storign 3D dataMesh3D: the base 3D data model for ingesting data. This will automatically convert many popular formats to the VTP format. A 3D viewer is included for previewing these data on the front-end.Mesh3DSpatial: A way to link a geospatial context withMesh3D.Management Commandsrgd_3d_demo: populate the database with example 3D data.
Package: django-rgd-fmv
Resonant GeoData Full Motion Video (FMV)A submodule of Resonant GeoData for storing Full Motion Video (FMV) datasetsInstallationFollow the instructions for the coredjango-rgdapp first, thenpip install --find-links https://girder.github.io/large_image_wheels django-rgd-fmvAdd this app to yourINSTALLED_APPSalong with the core RGD app:INSTALLED_APPS+=['django.contrib.gis','rgd','rgd_fmv',]ModelsThis app adds a few additional models on top of the core app for storing FMV dataFMV: the base data model for ingesting FMV data. This will preprocess the video file using KWIVER to generate aFMVMetarecord with the spatial metadata extracted.FMVMeta: an automatically populated record of the data extracted from the FMV data with spatial context.Management Commandsrgd_fmv_demo: populate the database with example FMV data.rgd_fmv_wasabi: populate the database with example FMV data from the WASABI project.
Package: django-rgd-geometry
Resonant GeoData GeometryA submodule of Resonant GeoData for storing shapefiles.InstallationFollow the instructions for the coredjango-rgdapp first, thenpip install --find-links https://girder.github.io/large_image_wheels django-rgd-geometryAdd this app to yourINSTALLED_APPSalong with the core RGD app:INSTALLED_APPS+=['django.contrib.gis','rgd','rgd_geometry',]ModelsThis app adds a few additional models on top of the core app for storing geometry dataGeometryArchive: the base data model for ingesting shapefile data. This will run a background task to pull out all vector geometry from an uploaded archive to generate a newGeometryrecord.Geometry: A place to store a collection of vector geometry. This can be manually created without a shapefile.Management Commandsrgd_geometry_demo: populate the database with example shapefiles.