My favorites | Sign in
Project Logo
                
Search
for
Updated Jan 24, 2009 by keyton
BatchImportSettings  
Descriptions of all available django-batchimport settings.

Customizable Settings for django-batchimport

You can set one or more of the following settings in your django project's settings.py file to override the default behavior of django-batchimport.

BATCH_IMPORT_START_TEMPLATE

BATCH_IMPORT_OPTIONS_TEMPLATE

BATCH_IMPORT_EXECUTE_TEMPLATE

BATCH_IMPORT_RESULTS_TEMPLATE

Template settings. The following settings can be set to point to a template to override the default template used (if you don't want to just edit the defaults):

BATCH_IMPORT_IMPORTABLE_MODELS

Specify the list of models in your application which are importable in batch. If you do not provide a list, the system will use introspection to get a list of ALL models in your application (via INSTALLED_APPS).

BATCH_IMPORT_TEMPFILE_LOCATION

Specify where the uploaded Microsoft Excel file will be saved to the system. NOTE: This must be a absolute path. NOTE: Django must have read/write access to this location.

BATCH_IMPORT_UNEDITABLE_FIELDS

By default, the system does not allow you to import data for fields that are not EDITABLE (i.e. in their model field declarations, you've set editable=False). You can override this behavior here.

BATCH_IMPORT_VALUE_OVERRIDES

Sometimes you will want to override the value coming in from the XLS file with a constant or a dynamically generated value. The following setting is a dictionary of values (or callables) per each fully specified model field. NOTE: You must import the item into your settings file if it is a callable.

BATCH_IMPORT_SHOW_SUCCESSFUL_IMPORTS

BATCH_IMPORT_SHOW_SUCCESSFUL_UPDATES

BATCH_IMPORT_SHOW_ERRORS

The system can show you individual imports, updates, or errors individually using the following boolean options. Note that True is assumed for all three if no setting is present.

BATCH_IMPORT_STOP_ON_FIRST_ERROR

Whether the system should stop on the first error or process the entire uploaded spreadsheet and show errors afterwards.

BATCH_IMPORT_UPDATE_DUPS

Whether or not to update duplicates or simply ignore them. Note that duplicates are determined based on the user's specification of model fields as identification fields. If these are not set, a duplicate must match at all column/fields.

BATCH_IMPORT_START_ROW

BATCH_IMPORT_END_ROW

If no options are set for start/end row, defaults are used that assume (1) the spreadsheet has a header row (indicating that data starts on row #2 and (2) the entire spreadsheet is to be processed.


Sign in to add a comment
Hosted by Google Code