This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Django third app for manage you models in command line environment.

Features

This app is based on Django Admin Site and ModelAdmin defined by developpers. It is supposed to allow user to make same things as in Admin site:

  • List model’s instance:
    • Filtering with Django’s Lookup
    • Choosing which field you want including ModelAdmin and Model attributes
    • Default display is the Admin one
  • Add an instance:
    • Prepopulate with default values
  • Update instances:
    • Filtering with Django’s Lookup
  • Delete instances:
    • Filtering with Django’s Lookup
  • Describe model and modeladmin
  • System user restriction (Read/Write)
  • Use admin actions (further)

Install

Install the package on your system:

pip install django-admin-cli

Add admin_cli to INSTALLED_APPS.

Usage

List model’s instance

$ ./manage.py cli user list
Username                      Email address                 First name                    Last name                     Staff status
zulu                                                                                                                    True
admin                                                                                                                   True

List specified fields

$ ./manage.py cli user list -f id -f username
Id                   Username
1                    zulu
2                    admin

Filter specified fields

$ ./manage.py cli user list -F id=1
Username                      Email address                 First name                    Last name                     Staff status
zulu                                                                                                                    True

Add an instance

$ ./manage.py cli site add -f domain=mysite.org -f 'name=My site'
Created 'mysite.org'

Update an instance

$ ./manage.py cli site update -F domain=mysite.org -f 'name=New name'
Update 'mysite.org' ? [Yes|No|All|Cancel] y
Updated 'mysite.org'

Delete an instance

$ ./manage.py cli site delete -F domain=mysite.org
Delete 'mysite.org' ? [Yes|No|All|Cancel] y
Deleted 'mysite.org'

Resctrict access to users

Put a dict named ADMIN_CLI_USERS in settings.py. It must have the following format:

ADMIN_CLI_USERS = {
  'login': 'RW',
}

Keys are UID or username, values are rights ‘R’ for read, ‘W’ for write/update/delete and ‘RW’ for both.

By default ADMIN_CLI_USERS is {} which allows all users to make all operations.

Testing

All tests are simply launched by:

python setup.py test
Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-admin-cli-0.1.1.tar.gz (11.2 kB) Copy SHA256 Checksum SHA256 Source Jul 10, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting