Skip to content

Commit

Permalink
📚 update the documention to explain why we need django-excel, fix #43
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Mar 15, 2018
1 parent 3998e5b commit 9b79176
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .moban.d/docs/source/index.rst.jj2
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{% extends 'docs/source/WEB-index.rst.jj2' %}

{% block further_dissertation %}
Given the existence of pyexcel, what is the reason for django-excel?
1. **Speedy file uploads**. **django-excel** help you access the uploaded excel file directly using ExcelMemoryFileUploadHandler and TemporaryExcelFileUploadHandler. In particular, MemoryFileUploadHandler would hold the uploaded file in memory and django-excel could read the excel data from this memory buffer without caching it onto file system.
2. **Import excel data into database**. **django-excel** uses bulk_insert to import your excel
data into your django Model, which is very efficient.
{% endblock %}


{%block installation_note%}
Contrary to Django's philosophy of 'battery included', django-excel does not
come with all batteries due to the size of the dependency(xlwt, openpyxl, odfpy). Hence,
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ community, this library and its associated ones try to become a small and easy t
install alternative to Pandas.



The highlighted features are:

#. excel data import into and export from databases
Expand Down
3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
`django-excel` - Let you focus on data, instead of file formats
================================================================================

:Author: C. Wang
:Author: C.W.
:Source code: http://github.com/pyexcel-webwares/django-excel.git
:Issues: http://github.com/pyexcel-webwares/django-excel/issues
:License: New BSD License
Expand Down Expand Up @@ -42,6 +42,7 @@ community, this library and its associated ones try to become a small and easy t
install alternative to Pandas.



The highlighted features are:

#. excel data import into and export from databases
Expand Down
16 changes: 11 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
PY26 = PY2 and sys.version_info[1] < 7

NAME = 'django-excel'
AUTHOR = 'C. Wang'
AUTHOR = 'C.W.'
VERSION = '0.0.10'
EMAIL = 'wangc_2011@hotmail.com'
LICENSE = 'New BSD'
Expand All @@ -18,7 +18,7 @@
)
URL = 'https://github.com/pyexcel-webwares/django-excel'
DOWNLOAD_URL = '%s/archive/0.0.10.tar.gz' % URL
FILES = ['README.rst', 'CHANGELOG.rst']
FILES = ['README.rst', 'CHANGELOG.rst']
KEYWORDS = [
'API',
'Django',
Expand Down Expand Up @@ -58,6 +58,7 @@
'pyexcel-webio>=0.1.2',
'Django>=1.6.1',
]
SETUP_COMMANDS = {}


PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
Expand Down Expand Up @@ -99,6 +100,8 @@ def run(self):
try:
self.status('Removing previous builds...')
rmtree(os.path.join(HERE, 'dist'))
rmtree(os.path.join(HERE, 'build'))
rmtree(os.path.join(HERE, 'django_excel.egg-info'))
except OSError:
pass

Expand All @@ -115,6 +118,11 @@ def run(self):
sys.exit()


SETUP_COMMANDS.update({
'publish': PublishCommand
})


def has_gease():
"""
test if github release command is installed
Expand Down Expand Up @@ -188,7 +196,5 @@ def filter_out_test_code(file_handle):
include_package_data=True,
zip_safe=False,
classifiers=CLASSIFIERS,
cmdclass={
'publish': PublishCommand,
}
cmdclass=SETUP_COMMANDS
)

2 comments on commit 9b79176

@guettli
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"In particular, MemoryFileUploadHandler would hold"

why "would"? It sounds like it doesnt. But it would, if a pre-condition would be given. But this pre-condition is not given at the current moment.

@chfw
Copy link
Member Author

@chfw chfw commented on 9b79176 Mar 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right. I will remove 'would'. In reality, it indeed holds the content in memory.

Please sign in to comment.