You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -106,9 +106,9 @@ If you would like to expand the list of supported excel file formats (see :ref:`
106
106
Tutorial
107
107
--------------
108
108
109
-
In order to dive in django-excel and get hands-on experience quickly, the test application for django-excel will be introduced here. So, it is advisable that you should check out the code from `github <https://github.com/chfw/django-excel>`_ ::
109
+
In order to dive in django-excel and get hands-on experience quickly, the test application for django-excel will be introduced here. So, it is advisable that you should check out the code from `github <https://github.com/pyexcel/django-excel>`_ ::
The test application is written according to `Part 1 <https://docs.djangoproject.com/en/1.7/intro/tutorial01/>`_, `Part 2 <https://docs.djangoproject.com/en/1.7/intro/tutorial02/>`_ and `Part 3 <https://docs.djangoproject.com/en/1.7/intro/tutorial03/>`_ of django tutorial version 1.7.1. If you should wonder how the test application was written, please visit django documentation and come back.
114
114
@@ -141,7 +141,7 @@ Choose an excel sheet, for example an xls file, and press "Submit". You will get
141
141
142
142
.. image :: download-file.png
143
143
144
-
Please open the file `polls/views.py <https://github.com/chfw/django-excel/blob/master/polls/views.py#L27>`_ and focus on the following code section::
144
+
Please open the file `polls/views.py <https://github.com/pyexcel/django-excel/blob/master/polls/views.py#L27>`_ and focus on the following code section::
145
145
146
146
class UploadFileForm(forms.Form):
147
147
file = forms.FileField()
@@ -166,7 +166,7 @@ Please feel free to change those functions according to :ref:`the mapping table
166
166
Handle data import
167
167
++++++++++++++++++++++++++++++
168
168
169
-
This example shows how to import uploaded excel file into django models. We are going to import `sample-data.xls <https://github.com/chfw/django-excel/blob/master/sample-data.xls>`_
169
+
This example shows how to import uploaded excel file into django models. We are going to import `sample-data.xls <https://github.com/pyexcel/django-excel/blob/master/sample-data.xls>`_
170
170
171
171
.. table:: Sheet 1 of sample-data.xls
172
172
@@ -211,7 +211,7 @@ Please visit this link http://localhost:8000/polls/import/, you shall see this u
211
211
212
212
.. image:: import-page.png
213
213
214
-
Please then select `sample-data.xls <https://github.com/chfw/django-excel/blob/master/sample-data.xls>`_ and upload. Then visit the admin page http://localhost:8000/admin/polls/question, you shall see questions have been populated:
214
+
Please then select `sample-data.xls <https://github.com/pyexcel/django-excel/blob/master/sample-data.xls>`_ and upload. Then visit the admin page http://localhost:8000/admin/polls/question, you shall see questions have been populated:
215
215
216
216
.. image:: question-admin.png
217
217
@@ -224,7 +224,7 @@ And choices too:
224
224
225
225
You may use admin interface to delete all those objects and try again.
226
226
227
-
Now please open `polls/views.py <https://github.com/chfw/django-excel/blob/master/polls/views.py#L54>`_ and focus on this part of code::
227
+
Now please open `polls/views.py <https://github.com/pyexcel/django-excel/blob/master/polls/views.py#L54>`_ and focus on this part of code::
228
228
229
229
def import_data(request):
230
230
if request.method == "POST":
@@ -281,7 +281,7 @@ Please save and open it. You shall see these data in your window:
281
281
.. image:: question-sheet.png
282
282
.. image:: choice-sheet.png
283
283
284
-
Now let's examine the code behind this in `polls/views.py <https://github.com/chfw/django-excel/blob/master/polls/views.py#L48>`_::
284
+
Now let's examine the code behind this in `polls/views.py <https://github.com/pyexcel/django-excel/blob/master/polls/views.py#L48>`_::
285
285
286
286
def export_data(request, atype):
287
287
if atype == "sheet":
@@ -297,7 +297,7 @@ How to import one sheet instead of multi-sheet book
297
297
298
298
Previous example shows how to import a multi-sheet book. However, what exactly is needed to import only one sheet instead? Before you proceed, please empty question and choice data using django admin.
299
299
300
-
Let's visit this url first http://localhost:8000/polls/imports_sheet/, where you see a similar file upload form. This time please choose `sample-sheet.xls <https://github.com/chfw/django-excel/blob/master/sample-sheet.xls>`_ instead. Then look at django admin and see if the question data have been imported or not.
300
+
Let's visit this url first http://localhost:8000/polls/imports_sheet/, where you see a similar file upload form. This time please choose `sample-sheet.xls <https://github.com/pyexcel/django-excel/blob/master/sample-sheet.xls>`_ instead. Then look at django admin and see if the question data have been imported or not.
301
301
302
302
Now let's look at the code::
303
303
@@ -318,7 +318,7 @@ Now let's look at the code::
318
318
319
319
Becuase it is a single sheet, the function to call is :meth:`~django_excel.ExcelMixin.save_to_database` where you specify a model and its mapping dictionary.
320
320
321
-
Have you noticed the extra parameter 'name_columns_by_row'? Why is this needed? Well, normally you *will not need* that if you have column names in the first row. In this example, the column names appears in the second row. Please open `sample-sheet.xls <https://github.com/chfw/django-excel/blob/master/sample-sheet.xls>`_ and have a look. The straight answer is because the column names in the data appears in the 2nd row of the data matrix.
321
+
Have you noticed the extra parameter 'name_columns_by_row'? Why is this needed? Well, normally you *will not need* that if you have column names in the first row. In this example, the column names appears in the second row. Please open `sample-sheet.xls <https://github.com/pyexcel/django-excel/blob/master/sample-sheet.xls>`_ and have a look. The straight answer is because the column names in the data appears in the 2nd row of the data matrix.
0 commit comments