Skip to content

Commit

Permalink
refresh readme documentation with simplifications/updates
Browse files Browse the repository at this point in the history
  • Loading branch information
crccheck committed Jul 11, 2014
1 parent f347dd4 commit 6d7f9e9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ MANAGE=$(PROJECT)/manage.py

help:
@echo "make commands:"
@echo " make help - this help"
@echo " make clean - remove files generated by distutils"
@echo " make test - run test suite"
@echo " make resetdb - delete and recreate the sqlite database"
@echo " make help - this help"
@echo " make clean - remove files generated by setup.py"
@echo " make test - run test suite"
@echo " make resetdb - delete and recreate the database"
@echo " make quickstart - setup a dev environment the first time"


clean:
Expand All @@ -24,9 +25,17 @@ test:
python -W ignore::RuntimeWarning $(MANAGE) test django_object_actions -s


# destroy and then recreate your database
resetdb:
python $(MANAGE) reset_db --router=default --noinput
python $(MANAGE) syncdb --noinput
python $(MANAGE) loaddata sample_data


.PHONY: help clean test resetdb
# just a demo of how to get up and running quickly
quickstart: resetdb
python $(MANAGE) createsuperuser
python $(MANAGE) runserver


.PHONY: help clean test resetdb quickstart
15 changes: 6 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Programmatically Enabling Object Admin Actions
``````````````````````````````````````````````

You can programatically enable and disable registered object actions by defining
your own custom ``get_object_actions()`` method. In this example, certain actions
your own custom ``get_object_actions()`` method. In this example, certain actions
only apply to certain object states (i.e. You should not be able to close an company
account if the account is already closed)::

Expand All @@ -142,7 +142,7 @@ account if the account is already closed)::
objectactions.extend(['reactivate_company_account_action', ])

return objectactions



Alternate Installation
Expand Down Expand Up @@ -181,16 +181,13 @@ Getting started *(with virtualenvwrapper)*::
# set up your virtualenv
mkvirtualenv django-object-actions
pip install -r requirements.txt
export DJANGO_SETTINGS_MODULE=example_project.settings
# hack your path so that we can reference packages starting from the root
add2virtualenv .
make test # run test suite
tox # run full test suite, requires more setup
make resetdb # reset the example db
python example_project/manage.py runserver # run debug server

The fixtures will create a user, admin:admin, you can use to log in immediately.
make quickstart # runs 'make resetdb' and some extra steps

Various helpers are available as make commands.
Various helpers are available as make commands. View ``Makefile`` to see what
other utilities you can do.


Similar Packages
Expand Down

0 comments on commit 6d7f9e9

Please sign in to comment.