You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Use cache for most fields and admin form for m2m files
* MR comments/clean up
* Cache should obey exclude and fields
* Some more tests and docs
* Only use cache for image files
* Even more tests and handle save as new
* fix test
* More tests
* minor refactor
* Improve test coverage
* Adding tests for fieldsets
* Added cache timeout
* Added another test for an edge case
* Fix issue with ManagementForm tampered with
* Update cache to only set when form is_multipart
* Even more testing changes
* Dockerize
* Setting up tests in docker
* Update github actions
* Got first integration test to work
* Refactor a bit
* Fix github action yml
* Use docker-compose up -d in github actions
* combine coveralls
* Updated readme
* Clean up code
* Remove dup code from rebase
Co-authored-by: Thu Trang Pham <thu@joinmodernhealth.com>
Copy file name to clipboardExpand all lines: README.md
+53-15Lines changed: 53 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,11 @@
5
5
6
6
AdminConfirmMixin is a mixin for ModelAdmin to add confirmations to change, add and actions.
7
7
8
-

8
+

9
9
10
-

10
+

11
11
12
-

12
+

13
13
14
14
It can be configured to add a confirmation page on ModelAdmin upon:
15
15
@@ -139,18 +139,21 @@ Your appreciation is also very welcome :) Feel free to:
139
139
140
140
### Local Development Setup
141
141
142
+
**Local:**
143
+
_You can skip this and just use docker if you want_
144
+
142
145
Install pyenv
143
-
Install python 3.8
146
+
pyenv install 3.8.0
144
147
145
-
Create virtualenv via pyenv
148
+
Create **virtualenv** via pyenv
146
149
147
150
```
148
-
pyenv vituralenv 3.8 django-admin-confirm-3.8
151
+
pyenv vituralenv 3.8.0 django-admin-confirm-3.8.0
149
152
```
150
153
151
-
Now your terminal should have `(django-admin-confirm-3.8)` prefix, because `.python-version` should have auto switch your virtual env
154
+
Now your terminal should have `(django-admin-confirm-3.8.0)` prefix, because `.python-version` should have auto switch your virtual env
152
155
153
-
Run migrations and create a superuser and run the server
156
+
Run **migrations** and create a superuser and run the server
154
157
155
158
```
156
159
./tests/manage.py migrate
@@ -160,43 +163,78 @@ Run migrations and create a superuser and run the server
160
163
161
164
You should be able to see the test app at `localhost:8000/admin`
162
165
163
-
Running tests:
166
+
**Running tests:**
164
167
168
+
```sh
169
+
make test# Runs unit tests with coverage locally without integration tests
170
+
make test-all # Runs unit tests + integration tests, requires extra setup to run locally
165
171
```
166
-
make test
167
-
```
168
172
169
-
Testing new changes on test project:
173
+
Use `python -m pytest` if you want to pass in arguments
174
+
175
+
`make t` is a short cut to run without coverage, last-failed, and fail fast
176
+
177
+
Testing local changes on test project:
170
178
171
179
```
172
180
pip install -e .
173
181
make run
174
182
```
175
183
184
+
**Docker:**
185
+
186
+
Instead of local set-up, you can also use docker.
187
+
188
+
Install docker-compose (or Docker Desktop which installs this for you)
189
+
190
+
```
191
+
docker-compose build
192
+
docker-compose up -d
193
+
```
194
+
195
+
You should now be able to see the app running on `localhost:8000`
196
+
197
+
If you haven't already done migrations and created a superuser, you'll want to do it here
198
+
199
+
```
200
+
docker-compose exec web tests/manage.py migrate
201
+
docker-compose exec web tests/manage.py createsuperuser
202
+
```
203
+
204
+
Running tests in docker:
205
+
206
+
```
207
+
docker-compose exec -T web make test-all
208
+
```
209
+
210
+
The integration tests are set up within docker. I recommend running the integration tests only in docker.
211
+
212
+
Docker is also set to mirror local folder so that you can edit code/tests and don't have to rebuild to run new code/tests.
213
+
176
214
### Release process
177
215
178
216
Honestly this part is just for my reference. But who knows :) maybe we'll have another maintainer in the future.
179
217
180
218
Run tests, check coverage, check readme
181
219
182
220
```
183
-
make test
221
+
docker-compose exec -T web make test-all
184
222
make check-readme
185
223
```
186
224
187
225
Update version in `setup.py`
188
226
189
227
```
190
228
make package
191
-
make upload-testpypi
229
+
make upload-testpypi VERSION=<VERSION>
192
230
```
193
231
194
232
Install new version locally
195
233
First you have to uninstall if you used `pip install -e` earlier
0 commit comments