Skip to content

Commit 1cb808a

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 3a44502 + 38a5525 commit 1cb808a

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ filtering sidebar to avoid this problem.
1313
Install:
1414

1515
```sh
16-
pip install git+http://github.com/mrts/django-admin-list-filter-dropdown.git
16+
pip install django-admin-list-filter-dropdown
1717
```
1818

1919
Enable in `settings.py`:
@@ -46,7 +46,7 @@ class EntityAdmin(admin.ModelAdmin):
4646

4747
Here's what it looks like:
4848

49-
![Screenshot of dropdown admin filter](docs/list-filter-dropdown.png)
49+
![Screenshot of dropdown admin filter](https://raw.githubusercontent.com/mrts/django-admin-list-filter-dropdown/master/docs/list-filter-dropdown.png)
5050

5151
# Credits
5252

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
from django.contrib.admin.filters import AllValuesFieldListFilter, RelatedFieldListFilter
1+
from django.contrib.admin.filters import AllValuesFieldListFilter, RelatedFieldListFilter, ChoicesFieldListFilter
22

33
class DropdownFilter(AllValuesFieldListFilter):
44
template = 'django_admin_listfilter_dropdown/dropdown_filter.html'
55

6+
class ChoiceDropdownFilter(ChoicesFieldListFilter):
7+
template = 'django_admin_listfilter_dropdown/dropdown_filter.html'
8+
69
class RelatedDropdownFilter(RelatedFieldListFilter):
710
template = 'django_admin_listfilter_dropdown/dropdown_filter.html'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import pandoc
2+
import os
3+
4+
doc = pandoc.Document()
5+
doc.markdown = open('README.md').read()
6+
with open('README.txt','w+') as f:
7+
f.write(doc.rst)
8+
os.system("python setup.py register")
9+
os.remove('README.txt')

setup.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,29 @@
33
import os
44
from setuptools import find_packages, setup
55

6+
VERSION = '1.0.1'
7+
68
# allow setup.py to be run from any path
79
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
810

11+
description = 'Use dropdowns in Django admin list filter'
12+
long_description = description
13+
if os.path.exists('README.txt'):
14+
long_description = open('README.txt').read()
15+
916
setup(
1017
name='django-admin-list-filter-dropdown',
11-
version='1.0.0',
18+
version=VERSION,
1219
packages=find_packages(),
1320
include_package_data=True,
1421
license='MIT License',
15-
description='Use dropdowns in Django admin list filter',
22+
description=description,
23+
long_description=long_description,
1624
url='https://github.com/mrts/django-admin-list-filter-dropdown',
25+
download_url='https://github.com/mrts/django-admin-list-filter-dropdown/archive/%s.zip' % VERSION,
1726
author='Mart Sõmermaa',
1827
author_email="mrts.pydev at gmail dot com",
28+
keywords=['django', 'admin', 'filter', 'dropdown'],
1929
classifiers=[
2030
'Environment :: Web Environment',
2131
'Framework :: Django',

0 commit comments

Comments
 (0)