Skip to content

Commit 144184e

Browse files
committed
Merge branch 'release/0.0.4' into main
2 parents 603bd67 + 1a18038 commit 144184e

File tree

7 files changed

+29
-4
lines changed

7 files changed

+29
-4
lines changed
File renamed without changes.
File renamed without changes.

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish Python 🐍 distributions 📦 to PyPI
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build-and-publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python 3.9
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: 3.9
16+
- name: Install pypa/build
17+
run: python -m pip install build --user
18+
- name: Build a binary wheel and a source tarball
19+
run: python -m build --sdist --wheel --outdir dist/
20+
- name: Publish distribution to PyPI
21+
uses: pypa/gh-action-pypi-publish@master
22+
with:
23+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
env
2+
venv
23
__pycache__
34
*.sqlite3
45
media/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<h2 align="center">Simple Image Upload Widget</h2>
22
<p align="center">
3-
<img src="preview/single.gif" />
3+
<img src=".github/images/single.gif" />
44
</p>
55
<h2 align="center">Inline Multiple Images Upload</h2>
66
<p align="center">
7-
<img src="preview/multiple.gif" />
7+
<img src=".github/images/multiple.gif" />
88
</p>
99

1010
## Introduction

image_uploader_widget/static/widgets/image_uploader_widget.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
},
2020
fileRemarker: function(e) {
2121
var iuw = $(this).parent().data('iuw');
22-
if (this.files.length == 0) {
22+
var raw = $(this).parent().attr('data-raw');
23+
if (this.files.length == 0 && !raw) {
2324
this.classList.remove('non-empty');
2425
$(this).parent().find('input[type=checkbox]').prop('checked', true);
2526
} else {

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name='django-image-uploader-widget',
11-
version='0.0.3',
11+
version='0.0.4',
1212
description='Simple Image Uploader Widget for Django-Admin',
1313
long_description=readme,
1414
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)