Skip to content

Commit 3d6d348

Browse files
committed
setup.py
1 parent 158c068 commit 3d6d348

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed

MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include AUTHORS
2+
include LICENSE
3+
include README.md
4+
include admin_adv_search_builder/templates/*
5+
include admin_adv_search_builder/templates/filters/*

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@ Django app that makes you able to build advanced queries via admin filters UI
44
This Application aims to give you the faster and easier way to do advanced query via Django Admin ModelAdmin UI, using the Django's ORM.
55
See example projects and gallery.
66

7+
### Setup
8+
9+
````
10+
pip install django-admin-search-builder
11+
````
12+
13+
in `settings.INSTALLED_APPS` add
14+
````
15+
'admin_adv_search_builder',
16+
````
17+
18+
in your ModelAdmin, use it following this example
19+
````
20+
from admin_adv_search_builder.filters import AdvancedSearchBuilder
21+
from django.contrib import admin
22+
23+
from . models import Identity
24+
25+
26+
@admin.register(Identity)
27+
class IdentityAdmin(admin.ModelAdmin):
28+
list_filter = (AdvancedSearchBuilder,)
29+
````
30+
731
#### Example
832

933
````
@@ -18,3 +42,8 @@ cd example
1842

1943
#### Gallery
2044
![Alt text](images/1.png)
45+
46+
47+
#### Authors
48+
49+
Giuseppe De Marco

setup.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import os
2+
from glob import glob
3+
from setuptools import find_packages, setup
4+
5+
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
6+
README = readme.read()
7+
8+
# allow setup.py to be run from any path
9+
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
10+
11+
# rm -R build/ dist/ *egg-info
12+
# python3 setup.py sdist
13+
# twine upload dist/*
14+
15+
setup(
16+
name='django-admin-search-builder',
17+
version='0.2.0',
18+
packages=find_packages(),
19+
include_package_data=True,
20+
license='BSD License',
21+
description="Django Admin Search Builder",
22+
long_description=README,
23+
long_description_content_type='text/markdown',
24+
url='https://github.com/UniversitaDellaCalabria/django-admin-search-builder',
25+
author='Giuseppe De Marco',
26+
author_email='giuseppe.demarco@unical.it',
27+
classifiers=[
28+
'Environment :: Web Environment',
29+
'Framework :: Django',
30+
'Framework :: Django :: 2.0',
31+
'Framework :: Django :: 3.0',
32+
'Intended Audience :: Developers',
33+
'License :: OSI Approved :: Apache',
34+
'Operating System :: OS Independent',
35+
'Programming Language :: Python',
36+
'Programming Language :: Python :: 3',
37+
],
38+
install_requires=[
39+
'django>=2.0,<4.0',
40+
],
41+
)

0 commit comments

Comments
 (0)