Skip to content

Commit 6d7f9e9

Browse files
committed
refresh readme documentation with simplifications/updates
1 parent f347dd4 commit 6d7f9e9

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

Diff for: Makefile

+14-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ MANAGE=$(PROJECT)/manage.py
33

44
help:
55
@echo "make commands:"
6-
@echo " make help - this help"
7-
@echo " make clean - remove files generated by distutils"
8-
@echo " make test - run test suite"
9-
@echo " make resetdb - delete and recreate the sqlite database"
6+
@echo " make help - this help"
7+
@echo " make clean - remove files generated by setup.py"
8+
@echo " make test - run test suite"
9+
@echo " make resetdb - delete and recreate the database"
10+
@echo " make quickstart - setup a dev environment the first time"
1011

1112

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

2627

28+
# destroy and then recreate your database
2729
resetdb:
2830
python $(MANAGE) reset_db --router=default --noinput
2931
python $(MANAGE) syncdb --noinput
32+
python $(MANAGE) loaddata sample_data
3033

3134

32-
.PHONY: help clean test resetdb
35+
# just a demo of how to get up and running quickly
36+
quickstart: resetdb
37+
python $(MANAGE) createsuperuser
38+
python $(MANAGE) runserver
39+
40+
41+
.PHONY: help clean test resetdb quickstart

Diff for: README.rst

+6-9
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Programmatically Enabling Object Admin Actions
117117
``````````````````````````````````````````````
118118

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

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

144144
return objectactions
145-
145+
146146

147147

148148
Alternate Installation
@@ -181,16 +181,13 @@ Getting started *(with virtualenvwrapper)*::
181181
# set up your virtualenv
182182
mkvirtualenv django-object-actions
183183
pip install -r requirements.txt
184-
export DJANGO_SETTINGS_MODULE=example_project.settings
184+
# hack your path so that we can reference packages starting from the root
185185
add2virtualenv .
186186
make test # run test suite
187-
tox # run full test suite, requires more setup
188-
make resetdb # reset the example db
189-
python example_project/manage.py runserver # run debug server
190-
191-
The fixtures will create a user, admin:admin, you can use to log in immediately.
187+
make quickstart # runs 'make resetdb' and some extra steps
192188

193-
Various helpers are available as make commands.
189+
Various helpers are available as make commands. View ``Makefile`` to see what
190+
other utilities you can do.
194191

195192

196193
Similar Packages

0 commit comments

Comments
 (0)