Saravanan666/pypi-org huggingface dataset:
Package: django-fsm-admin2
django-fsm-admin2Django-fsmtransition integration to django admin.Passing arguments to transition is supported (unlikedjango-fsm-adminpackage).Installationpip install django-fsm-admin2Add fsm_admin to your settings.INSTALLED_APPSINSTALLED_APPS = [
    ...
    'fsm_admin2',
    ...
]UsageAdd FSMTransitionMixin to your admin class# admin.py

from django.contrib import admin
from fsm_admin2.admin import FSMTransitionMixin

class MyModelAdmin(FSMTransitionMixin, admin.ModelAdmin):
    fsm_fields = ['status',]    # list your fsm fields
    
    # you can override templates for transition arguments form view and transition buttons row
    fsm_transition_form_template = 'fsm_admin2/fsm_transition_form.html'         # default value
    fsm_transition_buttons_template = 'fsm_admin2/fsm_transition_buttons.html'   # default value
    ...This will add current field value as readonly field and buttons row to perform transitions.
Only allowed transitions are displayed.Customize transition display.@transition(field=status, source='disabled', target='enabled',
            custom={'short_description': 'Activate!!!'})
def activate(self):
    ...Add form to provide transition arguments. Form fields names should match transition function arguments.class DeactivateForm(forms.Form):
    text = forms.Charfield()

@transition(field=status, source='enabled', target='disabled',
            custom={'short_description': 'Deactivate', 'form': DeactivateForm})
def deactivate(self, text):
    ...Form class can also be set as import string:{'form': 'my_app.forms.DeactivateForm'}
Package: django-fsm-admin-django-4
Mixin and template tags to integratedjango-fsmstate transitions into the
Django Admin.Note: This is a fork ofhttps://github.com/gadventures/django-fsm-adminwhich is not maintained anymore. This fork is compatible with Django 4.Installation$pipinstalldjango-fsm-admin-django-4Or from GitHub:$pipinstall-egit://github.com/7tg/django-fsm-admin-django-4.git#egg=django-fsm-admin-django-4UsageAddfsm_adminto yourINSTALLED_APPS.Ensure that you have"django.core.context_processors.request"in yourTEMPLATE_CONTEXT_PROCESSORSin Django settings. If the setting variable
is not yet defined, add:fromdjango.confimportsettingsTEMPLATE_CONTEXT_PROCESSORS=settings.TEMPLATE_CONTEXT_PROCESSORS+("django.core.context_processors.request",)In youradmin.pyfile, useFSMTransitionMixinto add behaviour to your
ModelAdmin.FSMTransitionMixinshould be beforeModelAdmin, the order is
important.It assumes that your workflow state field is namedstate, however you can
override it or add additional workflow state fields with the attributefsm_field.fromfsm_admin.mixinsimportFSMTransitionMixinclassYourModelAdmin(FSMTransitionMixin,admin.ModelAdmin):# The name of one or more FSMFields on the model to transitionfsm_field=['wf_state',]admin.site.register(YourModel,YourModelAdmin)By addingcustom=dict(admin=False)to the transition decorator, one can
disallow a transition to show up in the admin interface. This specially is
useful, if the transition method accepts parameters without default values,
since indjango-fsm-admin-django-4no arguments can be passed into the transition
method.@transition(field='state',source=['startstate'],target='finalstate',custom=dict(admin=False),)defdo_something(self,param):# will not add a button "Do Something" to your admin model interfaceBy addingFSM_ADMIN_FORCE_PERMIT = Trueto your configuration settings, the
above restriction becomes the default. Then one must explicitly allow that a
transition method shows up in the admin interface.@transition(field='state',source=['startstate'],target='finalstate',custom=dict(admin=True),)defproceed(self):# will add a button "Proceed" to your admin model interfaceThis is useful, if most of your state transitions are handled by other means,
such as external events communicating with the API of your application.Try the example$gitclonegit@github.com:7tg/django-fsm-admin-django-4.git$cddjango-fsm-admin-django-4$mkvirtualenvfsm_admin$pipinstall-rrequirements.txt$pythonsetup.pydevelop$cdexample$pythonmanage.pysyncdb$pythonmanage.pyrunserver
Package: django-fsm-admin-lite
django-fsm-admin-liteIntegratedjango-fsmstate transitions into Django Admin.Alternative ofdjango-fsm-admin, with a lighter version of the frontend part.Features:display available transitions in model admin so that user can apply themmark FSM protected fields as read onlyLimitations:transition methods parameters are not handledInstallationpip install django-fsm-admin-liteOr, for the latest git versionpython -m pip install 'django-fsm-admin-lite @ git+https://github.com/etchegom/django-fsm-admin-lite.git'UsageMake you model admin class inherit from the mixin classFSMAdminMixin.fromdjango.contribimportadminfromfsm_admin_lite.mixinsimportFSMAdminMixin@admin.register(MyModel)classMyModelAdmin(FSMAdminMixin,admin.ModelAdmin):fsm_fields=["state",]ConfigurationAdmin class attributeOptionfsm_fieldsList of FSM fields to handlefsm_transition_success_msgAdmin message for transition successfsm_transition_error_msgAdmin message for transition errorfsm_transition_not_allowed_msgAdmin message for transition not allowed errorfsm_transition_not_valid_msgAdmin message for transition not valid errorfsm_context_keyTemplate context key for FSM transitionsfsm_post_paramPOST parameter name for FSM transitionsRun examplemake exampleThen go tohttp://127.0.0.1:8000/admin, login withadmin/passwordand create a new blog post object.TODOimprove the default template filesdisplay all the transitions (not available transition should be represented as disabled buttons)
Package: django-fsm-admin-maintained
Mixin and template tags to integratedjango-fsmstate transitions into the
Django Admin.Note: This is a fork ofhttps://github.com/gadventures/django-fsm-adminwhich is not maintained anymore. This fork is compatible with Django 4.Installation$pipinstalldjango-fsm-admin-maintainedOr from GitHub:$pipinstall-egit://github.com/7tg/django-fsm-admin-maintained.git#egg=django-fsm-admin-maintainedUsageAddfsm_adminto yourINSTALLED_APPS.Ensure that you have"django.core.context_processors.request"in yourTEMPLATE_CONTEXT_PROCESSORSin Django settings. If the setting variable
is not yet defined, add:fromdjango.confimportsettingsTEMPLATE_CONTEXT_PROCESSORS=settings.TEMPLATE_CONTEXT_PROCESSORS+("django.core.context_processors.request",)In youradmin.pyfile, useFSMTransitionMixinto add behaviour to your
ModelAdmin.FSMTransitionMixinshould be beforeModelAdmin, the order is
important.It assumes that your workflow state field is namedstate, however you can
override it or add additional workflow state fields with the attributefsm_field.fromfsm_admin.mixinsimportFSMTransitionMixinclassYourModelAdmin(FSMTransitionMixin,admin.ModelAdmin):# The name of one or more FSMFields on the model to transitionfsm_field=['wf_state',]admin.site.register(YourModel,YourModelAdmin)By addingcustom=dict(admin=False)to the transition decorator, one can
disallow a transition to show up in the admin interface. This specially is
useful, if the transition method accepts parameters without default values,
since indjango-fsm-admin-maintainedno arguments can be passed into the transition
method.@transition(field='state',source=['startstate'],target='finalstate',custom=dict(admin=False),)defdo_something(self,param):# will not add a button "Do Something" to your admin model interfaceBy addingFSM_ADMIN_FORCE_PERMIT = Trueto your configuration settings, the
above restriction becomes the default. Then one must explicitly allow that a
transition method shows up in the admin interface.@transition(field='state',source=['startstate'],target='finalstate',custom=dict(admin=True),)defproceed(self):# will add a button "Proceed" to your admin model interfaceThis is useful, if most of your state transitions are handled by other means,
such as external events communicating with the API of your application.Try the example$gitclonegit@github.com:7tg/django-fsm-admin-maintained.git$cddjango-fsm-admin-maintained$mkvirtualenvfsm_admin$pipinstall-rrequirements.txt$pythonsetup.pydevelop$cdexample$pythonmanage.pysyncdb$pythonmanage.pyrunserver
Package: django-fsmedhro-core
Dies ist die Grundlage für Webseite des Fachschaftsrates der medizinischen
Fakultät der Uni Rostock. Hier wird definiert, was einFachschaftsUser, einStudiengang, einStudienabschnittund was einGenderist.InstallationFügefsmedhro_corewie folgt zu deinenINSTALLED_APPShinzu:INSTALLED_APPS = [
    ...
    'fsmedhro_core.apps.FachschaftConfig',
]Erzeuge die Models mittelspython manage.py migrateFüge das LDAP-Backend zuAUTHENTICATION_BACKENDShinzu:AUTHENTICATION_BACKENDS = [
    'django.contrib.auth.backends.ModelBackend',
    'fsmedhro_core.backends.auth.LDAPUniRostock',
]
Package: django-fsmedhro-diva
DIVA - Deine individuelle Veranstaltungs-AuswertungEine Django-App für die Auswertung von Veranstaltungen. Benötigtdjango-fsmedhro-core.InstallationFügefsmedhro_divazu deinenINSTALLED_APPShinzu.Erzeuge die Models mittelspython manage.py migrate.Binde die URLs in dieurls.pydeines Projekts ein.
Package: django-fsm-ex
Django friendly finite state machine supportdjango-fsm-ex 基于django-fsm. 不过由于 django-fsm 基本停止开发了,
本项目在原项目的基础上调整结构,去掉了部分兼容代码.
调整了结构,增加了类型信息, 优化了错误信息(主要针对中文项目)
Package: django-fsm-wagtail
Mixin to integratedjango-fsmstate transitions into the
Wagtail Admin.Installation$pipinstalldjango-fsm-wagtailOr from GitHub:$pipinstall-egit://github.com/abahnihi/django-fsm-wagtail.git#egg=django-fsm-wagtailUsageAddfsm_wagtailto yourINSTALLED_APPS.fromdjango.confimportsettingsTEMPLATE_CONTEXT_PROCESSORS=settings.TEMPLATE_CONTEXT_PROCESSORS+("django.core.context_processors.request",)In youradmin.pyfile, useFsmWagtailAdminMixinto add behaviour to your
ModelAdmin. You can removeModelAdminorFsmWagtailAdminMixinshould be beforeModelAdmin, the order is
important.It assumes that your workflow state field is namedstate, however you can
override it or add additional workflow state fields with the attributefsm_field.fromfsm_wagtail.adminimportFsmWagtailAdminMixinclassYourModelAdmin(FsmWagtailAdminMixin):# The name of one or more FSMFields on the model to transitionfsm_field=['wf_state',]By addingcustom=dict(admin=False)to the transition decorator, one can
disallow a transition to show up in the admin interface. This specially is
useful, if the transition method accepts parameters without default values,
since indjango-fsm-adminno arguments can be passed into the transition
method.@transition(field='state',source=['startstate'],target='finalstate',custom=dict(admin=False),)defdo_something(self,param):# will not add a button "Do Something" to your admin model interfaceBy addingFSM_ADMIN_FORCE_PERMIT = Trueto your configuration settings, the
above restriction becomes the default. Then one must explicitly allow that a
transition method shows up in the admin interface.@transition(field='state',source=['startstate'],target='finalstate',custom=dict(admin=True),)defproceed(self):# will add a button "Proceed" to your admin model interfaceThis is useful, if most of your state transitions are handled by other means,
such as external events communicating with the API of your application.CreditsSpecial thanks togadventuresfor thedjango-fsm-adminlibrary where we used some of his code in this repo.0.1.0 (2021-03-03)First release on PyPI.
Package: django-fs-smsaero
InstallationInstalldjango-fs-smsaerousingpip:$ pip install django-fs-smsaeroAdd'smsaero'to yourINSTALLED_APPSsetting:INSTALLED_APPS = (
    ...
    'smsaero',
    ...
)Runsyncdbormigrate:$ ./manage.py syncdb

or

$ ./manage.py migrateUsageJust importsend_smsfunction and use it:from smsaero.api import send_sms

send_sms('+79135461856', 'Some text.')CreditsFogstream
Package: django-fs-smsc
InstallationInstalldjango-fs-smscusingpip:$ pip install django-fs-smscAdd'smsc'to yourINSTALLED_APPSsetting:INSTALLED_APPS = (
    ...
    'smsc',
    ...
)Add'smsc.urls'to your url-patterns:urlpatterns = patterns('',
    ...
    url(r'^smsc/', include('smsc.urls')),
    ...
)Runsyncdbormigrate:$ ./manage.py syncdb

or

$ ./manage.py migrateUsageJust importsend_smsfunction and use it:from smsc.api import send_sms

send_sms('+79135461856', 'Some text.')CreditsFogstream
Package: django-fs-trumbowyg
Introductiondjango-fs-trumbowyg is the Django-related reusable app for integrating Trumbowyg WYSIWYG editorhttp://alex-d.github.io/Trumbowyg/.InstallationInstalldjango-fs-trumbowygusingpip:$ pip install django-fs-trumbowygAdd'trumbowyg'to yourINSTALLED_APPSsetting:INSTALLED_APPS = (
    ...
    'trumbowyg',
    ...
)Update yoururls.py:url(r'^trumbowyg/', include('trumbowyg.urls'))UsageUseTrumbowygWidgetin your forms:from django.forms import ModelForm
from django.contrib.admin import ModelAdmin
from trumbowyg.widgets import TrumbowygWidget
from your_app.models import YourModel

class YourModelAdminForm(ModelForm):
    class Meta:
        model = YourModel
        widgets = {
            'text': TrumbowygWidget(),
        }

class YourModelAdmin(admin.ModelAdmin):
    form = YourModelAdminForm


admin.site.register(YourModel, YourModelAdmin)CreditsFogstreamAlex-D
Package: django-fsu
Flask-Style URL Patterns for DjangoInstallationpipinstalldjango-fsuUsageIn urls.py: change your regex patterns to flask-styled paths.fromdjango.conf.urlsimportincludefromdjango_fsuimporturlfrom.importviewsurlpatterns=[url('login',views.login),url('user/<username>',views.profile),url('article/<int:pk>',views.article),url('projects/',include('projects.urls'),]Variable parts in the route can be specified with angular brackets (user/<username>). By default a variable part in the URL accepts a string without a slash however a different format code can be specified as well by using<code:name>.Variable parts are passed to the view function as keyword arguments. In the above example,views.profilewill be passed with a keyword argument:username.Currently supported formats codes are:string(the default, accepts string without a slash)intfloatuuidpath(accepts any string)Please note thatintandfloatvariables are still passed to the view function as a string.To see how individual functions work,
see the docstrings or typehelp('django_fsu')in the interactive prompt.Credits to:http://flask.pocoo.org/docs/latest/api/#url-route-registrations.
Package: django-ft-cache
A fault-tolerant pylibmc cache backend for DjangoDocumentationBy default, a failed cache operation in Django is fatal and will raise a 500
error. In some cases, this might not be desirable behavior. This cache
backend will catch failures and log them, but not raise an exception. A
cachegetthat fails will appear to be a miss to the application.Installationpip install pylibmc django-ft-cacheReplace the existing pylibmc cache backend in your settings with'django_ft_cache.FaultTolerantPyLibMCCache'. For example:CACHES={'default':{'BACKEND':'django_ft_cache.FaultTolerantPyLibMCCache','LOCATION':['127.0.0.1:11211'],},}Building Your OwnIf you are already using a custom cache backend, a mixin is provided that
should add this capability:django_ft_cache.FaultTolerantCacheMixin.History1.0.0 (2017-06-27)Tests against Django 1.11 and Python 3.6Bump to stable/production0.9.0 (2016-02-01)Tests against Django 1.9 and Python 3.4, 3.50.1.0 (2014-07-16)Initial release
Package: django-ftp-deploy
django-ftp-deploy allows you to automatically deploy GIT repositories to FTP servers. You don’t need to install git on the server!Support:Django 1.7Python 2.7 / 3.3 / 3.4Features:Manage multiple services (a service is one repository-to-ftp configuration)Verification service configurationRepository hook managementRestore failed deploysEmail notificationsLogs and StatisticsSupported GIT repositories:BitbucketGithubDocumentationRead The Docs.
Package: django-ftpserver
FTP server application that used user authentication of Django.Getting StartedInstall django-ftpserver by pip.$ pip install django-ftpserverAdd line to settings.INSTALLED_APPS for your django project.INSTALLED_APPS = (
    # ..
    'django_ftpserver',
)Migrate app.$ python manage.py migrateCreate FTP user group.$ python manage.py createftpusergroup my-ftp-groupCreate FTP user account.$ python manage.py createftpuseraccount <username> my-ftp-group<username>is the django authentication username.Runmanage.py ftpservercommand.$ python manage.py ftpserver 127.0.0.1:10021Connect with your favorite FTP client.RequirementsTarget Python version is 3.6, 3.7, 3.8, 3.9, 3.10Django>=2.2pyftpdlibLicenseThis software is licensed under the MIT License.DocumentationThe latest documentation is hosted at Read The Docs.https://django-ftpserver.readthedocs.org/en/latest/DevelopThis project is hosted at Github:https://github.com/tokibito/django-ftpserverAuthorShinya Okano
Package: djangofu
by John Mark Schofield (jms@schof.org)Provides common utility functions for Django projects.(It’s django-fu as in Kung Fu, not as in F-U.)Currently provides django-fu.djangoenvironment.get_env_variable().Loads an environment variable into the current context, or raises an exception.Usage:>>> from djangofu.general import get_env_variable
>>> get_env_variable('SHELL')
'/bin/bash'
>>> get_env_variable('foobar')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/schof/.virtualenvs/dbfweb/lib/python2.7/site-packages/djangofu/general.py", line 12, in get_env_variable
    raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: Set the foobar environment variable
>>>Thanksget_env_variable was taken from the book “Two Scoops of Django,” by Daniel Greenfield and Audrey Roy. [https://django.2scoops.org/]
Package: django-fuelsdk
django-fuelsdk==============ExactTarget FuelSDK wrapper for Django.![Travis CI Build Status](https://travis-ci.org/bradjasper/django-jsonfield.png?branch=master)Install=======**Install Dependencies**```bashpip install -r requirements.txt```**Add To INSTALLED_APPS**```pythonINSTALLED_APPS = [# ...django_fuelsdk,]```**Add Settings**```pythonEXACT_TARGET_CLIENT_ID = 'xxxx'EXACT_TARGET_CLIENT_SECRET = 'xxxx'# https://code.exacttarget.com/question/there-any-cetificrate-install-our-server-access-et-apiEXACT_TARGET_WSDL_URL = 'https://webservice.exacttarget.com/etframework.wsdl'```Usage=====```pythonfrom django_fuelsdk.fuel import FuelClientf = FuelClient()# Send a triggered send to a specific subscriber (used for transactional email)f.send('Welcome', 'test@example.com', {'variable': 'test'})# Add a subscriber# Note: The underlying ExactTarget API throws an error when trying to# add a subscriber that already exists. This method will silence that error,# making add_subscriber idempotent.f.add_subscriber('test@example.com', {'variable': 'test'})# Any error returned by the API will cause a django_fuelsdk.fuel.FuelApiError# exception to be raised.f.send('Not an Email', 'test@example.com', {})```
Package: django-fujita
This is a Tornado server built to run theDjangobuiltin ‘runserver’ command.This uses WebSockets, so modern browsers only.Why on earth would one want to do such a crazy thing?The main reason this was built was for the use case of a team environment where
the developers are usingVagrantfor local development and want to give the
less terminal savvy users an easy way to run and control theDjangodevelopment
server.How do I use this?For testing purposes:Clone this repository.Create a new virtualenvInstallDjango&tornadovia pipRun the fujita.py script with the command to run the testproject (see below)Visit the Fujita Console in your browserTo distribute a Fujita Console in your project simply listdjango-fujitain
your requirements and then add afujita.pyscript to the root.Running the fujita.py scriptYou need to tell the script how to run your development server through the--commandoption.If you’re following the steps above then you’ll want to use something similar
to the following command:./fujita.py --command "/home/user/.virtualenvs/fujita/bin/python /home/user/projects/django-fujita/testproject/manage.py runserver 0:8000"The above command assumes you have a virtualenv namedfujitain the.virtualenvsdirectory in your home. It also assumes that you have a
projects directory in your home and thedjango-fujitarepository has been
checked out there. Adjust for your setup.Thecommandis run under/bin/shso you can set environment variables
by prefixing them in front of the command:./fujita.py --command "DJANGO_SETTINGS_MODULE=project.settings.dev django-admin.py runserver 0:8000"
Package: django-full-crud
Django full crud!This package is for you to create a fully automatic CRUD of your models.DependenciesDjango
Build your apps using thisapp template.Installationpipinstalldjango-full-crudAdd the following in settings.py:INSTALLED_APPS=[...'django_full_crud',...]FeaturesCreation the admin file.Creation the form file.Creation the templates (delete, detail, form and list).Creation the serializer.Creation the views (create, delete, detail, list and update).Creation the viewsets.Creation the init files.RecommendationsDo not make your init files with strings, the package will not find your models.
Make a single file for each class, and import them in the init file.Getting startCreate a .vscode file at the root of your project, then add a file called "django_full_crud.json".Add the following to it:{"project_name":"name_of_your_project"}After that in need to create your models and add them to init.py.
The following commands can be run in the terminal:pythonmanage.pyfull_crudnome_appNomeModelThe full_crud runs on the specified model.pythonmanage.pyfull_crudnome_appThe full_crud runs ont the specified app.pythonmanage.pyfull_crudThe full_crud runs on the project.Extra configs of django_full_crud.jsonYou can make extra settings, saying what you want to be generated.
By default the values are true, but you can change them in the django_full_crud.json file:{"project_name":"name_of_your_project","make_admins":false,"make_admins_init":false,//"make_forms":false,"make_forms_init":false,//"make_serializers":false,"make_serializers_init":false,//"make_templates":false,//"make_views":false,"make_views_init":false,//"make_viewsets":false,"make_viewsets_init":false}
Package: django-full-directmessages
Django-DirectmessagesDjango-Directmessages is a low-level and easy-to-use Django App to manage simple directmessages.
In contrast to other Django Apps for messaging, Django-Directmessages doesn’t use any type of pre-built templates and is concentrated on the programmatic usage.Django-Directmessage is thought to be used with APIs or small apps, but can be used for any type of messaging. It featues:Sending of private 1-to-1 messages between users.Listing unread messages for a given user.Read a given messageGet all conversation partners/contacted users for a given userRead a whole conversation between two users.RequirementsDjango >= 1.5is supportedInstallationpip installdjango-directmessagesadd"directmessages"toINSTALLED_APPSand runpython manage.py migrate.UsageImport the Message Management API on top of yourviews.pyfrom directmessages.apps import InboxSend message:Inbox.send_message(from_user, to_user, message)List all unread messages:Inbox.get_unread_messages(user)Read a message (and mark as read):Inbox.read_message(message)Print a message as <user>: <message>:Inbox.read_message_formatted(message)Print a list of all conversation partners for a user:Inbox.get_conversations(users)Get a conversation between two users:Inbox.get_conversation(user1, user2, _limit_, _reversed_, _mark_read_)Limit (Int: optional): Instead of getting the whole conversation, get the first 50 (depends on reversed)Reversed (Bool: optional): Usually the ‘limit’-param gives back the first x messages, if you put Reversed to True, limit will give back the x latest messages.Mark_Read (Bool: optional): Mark all messages in conversation as readSignalsYou can use the following signals to extend the app for your needsmessage_sent:Gets called as soon as a message is sent.
Provides the Message object, the sender and the recipient as params.message_read:Gets called as soon as a message is read:
Provides the Message object, the sender and the recipient as params.ContributingBug reports, patches and fixes are always welcome!To DoAdd some security functions (e.g checking if user is allowed to read a message)Add some custom exceptions (e.g. when no message was found)