==============
Simple interface to do things.
Setup
-----
Add `'django_actions'` to your `INSTALLED_APPS`.
Set `ACTIONS_PATH` to the python module/package where your actions will live.
Add `url(r'^actions/', include('django_actions.urls'))` to your `urls.py`.
Create your actions:
# actions.py
from django_actions import action
from django.contrib.auth.models import User
@action('Create Admin', 'name', 'password')
def create_admin_account_if_not_created(name, password):
"""
Create admin account with input name and password if it doesn't already exist.
"""
if not User.objects.filter(username=name).count():
User.objects.create_superuser(name, '', password)
Now just `http://myserver.com/actions/` to see your interface to do things.
Metadata
Release files for django-actions 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-actions-0.0.5.tar.gz | 2.8 kB | Without provenance | Details |
Release files / django-actions-0.0.5.tar.gz
| Download URL | django-actions-0.0.5.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7961af84b8d0921c9f23993bd4bdb2a39209b36b54103877d7cc8c8e7181110b
|
|
BLAKE2b-256 checksum How to use checksums |
adcff1fb4357fa2a2442cfb3d18076f4a3fb91a9eb56a315570bc4b6500e6fd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-actions 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.