App for monitoring management commands on Django.
Project description
Django-mmc
==========
.. image:: https://api.travis-ci.org/LPgenerator/django-mmc.png?branch=master
:alt: Build Status
:target: https://travis-ci.org/LPgenerator/django-mmc
.. image:: https://coveralls.io/repos/LPgenerator/django-mmc/badge.png?branch=master
:target: https://coveralls.io/r/LPgenerator/django-mmc?branch=master
.. image:: https://pypip.in/v/django-mmc/badge.png
:alt: Current version on PyPi
:target: https://crate.io/packages/django-mmc/
.. image:: https://pypip.in/d/django-mmc/badge.png
:alt: Downloads from PyPi
:target: https://crate.io/packages/django-mmc/
What's that
-----------
App for monitoring management commands on Django.
Quick installation
------------------
1. Using pip:
.. code-block:: bash
$ pip install django-mmc
2. Add ``mmc`` application to ``INSTALLED_APPS`` in your settings file
3. Inject management classes before apps will be loaded
.. code-block:: python
from mmc.mixins import inject_management
inject_management()
4. Sync database (``./manage.py syncdb`` or ``./manage.py migrate``)
5. Enjoy
Local demo installation
-----------------------
.. code-block:: bash
$ sudo apt-get install virtualenvwrapper
$ mkvirtualenv django-mmc
$ git clone https://github.com/LPgenerator/django-mmc.git
$ cd django-mmc
$ python setup.py develop
$ cd demo
$ pip install -r ../requirements/dev.txt
$ python manage.py syncdb
$ python manage.py test_command >& /dev/null
$ python manage.py test_command_noargs >& /dev/null
$ python manage.py test_command_error >& /dev/null
$ python manage.py runserver >& /dev/null &
$ xdg-open http://127.0.0.1:8000/admin/mmc/mmclog/
Configuration
-------------
1. Execute the command, and script will be available at http://127.0.0.1:8000/admin/mmc/mmcscript/
2. Configure script options on script settings http://127.0.0.1:8000/admin/mmc/mmcscript/1/
3. Add email addresses for errors notification http://127.0.0.1:8000/admin/mmc/mmcemail/
4. All logs available on Logs page http://127.0.0.1:8000/admin/mmc/mmclog/
5. If you are using sentry, configure sentry, and all errors will be send into sentry too
Usage without inject
--------------------
If you want track only specified commands manually without auto-inject,
follow to examples below:
.. code-block:: python
# args
from mmc.mixins import BaseCommand
class Command(BaseCommand):
def handle(self, *args, **options):
print "OK"
# noargs
from mmc.mixins import NoArgsCommand
class Command(NoArgsCommand):
def handle_noargs(self, *args, **options):
print "OK"
When you are using auto-inject, you can use ignore flag on Scripts/Hosts settings.
Logs about execution not be stored, but if you got any error on your commands,
you will be notified to emails.
Screenshots
-----------
.. image:: /screenshots/log_changelist.jpg
.. image:: /screenshots/script_changelist.jpg
.. image:: /screenshots/email_changelist.jpg
.. image:: /screenshots/hosts_changelist.jpg
Compatibility:
-------------
* Python: 2.6, 2.7
* Django: 1.3.x, 1.4.x, 1.5.x, 1.6.x, 1.7.x
==========
.. image:: https://api.travis-ci.org/LPgenerator/django-mmc.png?branch=master
:alt: Build Status
:target: https://travis-ci.org/LPgenerator/django-mmc
.. image:: https://coveralls.io/repos/LPgenerator/django-mmc/badge.png?branch=master
:target: https://coveralls.io/r/LPgenerator/django-mmc?branch=master
.. image:: https://pypip.in/v/django-mmc/badge.png
:alt: Current version on PyPi
:target: https://crate.io/packages/django-mmc/
.. image:: https://pypip.in/d/django-mmc/badge.png
:alt: Downloads from PyPi
:target: https://crate.io/packages/django-mmc/
What's that
-----------
App for monitoring management commands on Django.
Quick installation
------------------
1. Using pip:
.. code-block:: bash
$ pip install django-mmc
2. Add ``mmc`` application to ``INSTALLED_APPS`` in your settings file
3. Inject management classes before apps will be loaded
.. code-block:: python
from mmc.mixins import inject_management
inject_management()
4. Sync database (``./manage.py syncdb`` or ``./manage.py migrate``)
5. Enjoy
Local demo installation
-----------------------
.. code-block:: bash
$ sudo apt-get install virtualenvwrapper
$ mkvirtualenv django-mmc
$ git clone https://github.com/LPgenerator/django-mmc.git
$ cd django-mmc
$ python setup.py develop
$ cd demo
$ pip install -r ../requirements/dev.txt
$ python manage.py syncdb
$ python manage.py test_command >& /dev/null
$ python manage.py test_command_noargs >& /dev/null
$ python manage.py test_command_error >& /dev/null
$ python manage.py runserver >& /dev/null &
$ xdg-open http://127.0.0.1:8000/admin/mmc/mmclog/
Configuration
-------------
1. Execute the command, and script will be available at http://127.0.0.1:8000/admin/mmc/mmcscript/
2. Configure script options on script settings http://127.0.0.1:8000/admin/mmc/mmcscript/1/
3. Add email addresses for errors notification http://127.0.0.1:8000/admin/mmc/mmcemail/
4. All logs available on Logs page http://127.0.0.1:8000/admin/mmc/mmclog/
5. If you are using sentry, configure sentry, and all errors will be send into sentry too
Usage without inject
--------------------
If you want track only specified commands manually without auto-inject,
follow to examples below:
.. code-block:: python
# args
from mmc.mixins import BaseCommand
class Command(BaseCommand):
def handle(self, *args, **options):
print "OK"
# noargs
from mmc.mixins import NoArgsCommand
class Command(NoArgsCommand):
def handle_noargs(self, *args, **options):
print "OK"
When you are using auto-inject, you can use ignore flag on Scripts/Hosts settings.
Logs about execution not be stored, but if you got any error on your commands,
you will be notified to emails.
Screenshots
-----------
.. image:: /screenshots/log_changelist.jpg
.. image:: /screenshots/script_changelist.jpg
.. image:: /screenshots/email_changelist.jpg
.. image:: /screenshots/hosts_changelist.jpg
Compatibility:
-------------
* Python: 2.6, 2.7
* Django: 1.3.x, 1.4.x, 1.5.x, 1.6.x, 1.7.x
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-mmc-1.3.tar.gz
(19.3 kB
view details)
Built Distribution
File details
Details for the file django-mmc-1.3.tar.gz
.
File metadata
- Download URL: django-mmc-1.3.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a98023d4ef3d19b7f0fdc03864bb2c91df4b50ac5333e217711c15f6dcd5e98e |
|
MD5 | 018bd4d6cda9da887a868acf5b1dbfac |
|
BLAKE2b-256 | 27ed57af3d4c955c75153dc6c10530d206a4f77c9de6e508c9b932e662702b98 |
File details
Details for the file django_mmc-1.3-py2.py3-none-any.whl
.
File metadata
- Download URL: django_mmc-1.3-py2.py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 220e5920c7bd05c241fa24878e51e0c0b0165835c8282c0d745fc858c3e5e5b6 |
|
MD5 | 03b04105f821c6a3839fac33d1afe6d4 |
|
BLAKE2b-256 | 5ada6905563078a08d14ffefc25ddb3460c1ef71d6f548b891cc49223c6a36d0 |