1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ### Example:
###
### from django.db import models
### from django.contrib.options import MetaOptions
###
### class ExampleNamedObject(models.Model):
### class CSV(MetaOptions):
### separator = ';'
### format = (
### ('name', 'Name'),
### ('describe', 'Description'),
### )
### name = models.CharField(maxlength=32)
### def describe(self):
### return str(self)
###
### from django.contrib.options.csv import csv
### for row in csv(ExampleNamedObject):
### print row
|
More like this
- Markup Selection in Admin by jonathan 5 years, 9 months ago
- Admin Download as CSV File by msaron 1 year, 3 months ago
- Run a testcase with custom INSTALLED_APPS by vdboor 6 months, 2 weeks ago
- Generic csv export admin action by dek 3 years, 9 months ago
- Admin action for a generic "CSV Export" by javinievas 2 years, 3 months ago
Comments
Please never install anything into the django tree like that. It means most of us can never use it.
Is there any reason why this is not just a third party app like everyone else writes?
#