Skip to main content
Django Actions
==============

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.

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)

Source distribution for django-actions 0.0.5
File Size Uploaded
django-actions-0.0.5.tar.gz 2.8 kB 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

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page