Skip to content

Commit

Permalink
made pip package
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyong committed Jul 11, 2013
1 parent f44968c commit e99feda
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include README
include README.rst
recursive-include valueinlist_filter/templates *
12 changes: 3 additions & 9 deletions README.md → README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,25 @@ Queryset can be filtered by a given list on the django admin page, just like: qs
Installation
------------

.. code-block:: bash

cd django-valueinlist-filter
python setup.py install
[sudo] pip install django-valueinlist-filter


Add valueinlist_filter to settings.INSTALLED_APPS:

.. code-block:: python

INSTALLED_APPS = (
...
'valueinlist_filter'
)

And then, set a CharField field in a model like this:

.. code-block:: python

class Model(models.Model):
...
serial_number = models.CharField(max_length=32)


If you want to filter the **serial_number** field by a given value list(split string by space), you can bind ValueInListFilter to this field:

.. code-block:: python

from valueinlist_filter.filter import ValueInListFilter
from django.contrib import admin
Expand All @@ -45,3 +37,5 @@ If you want to filter the **serial_number** field by a given value list(split st
)

Finally, you will get a textarea form on the filter side bar, the textarea's change event will trigger form.

Added a 'screenshot.png' picture.
19 changes: 16 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

setup(
name='django-valueinlist-filter',
version='0.1',
version='0.1.3',
description='Queryset can be filtered by a given list on the django admin page, just like: qs.filter(field__in=[list])',
long_description=open('README.md').read(-1),
long_description=open('README.rst').read(-1),
author='Chris Chen',
author_email='[email protected]',
url='http://github.com/gzeronet/django-valueinlist-filter',
Expand All @@ -19,5 +19,18 @@
packages=find_packages(),
include_package_data=True,
zip_safe=False,
license = 'BSD',
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Framework :: Django',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Internet :: WWW/HTTP :: WSGI',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Environment :: Web Environment',
'Operating System :: OS Independent'
],
license='License :: OSI Approved :: BSD License',
)

0 comments on commit e99feda

Please sign in to comment.