What I ended up doing is customizing the ModelAdmin for the Product class.
I went this route instead of adding a new form because I wanted to be able
to use the admin form to search for a particular product or products, and
once located, upload the serialized product file.
The admin effectivel
My suggestion is to not have any kind of model-linked-file. Use a standard
Form that accepts a file, then as part of the POST processing, you open the
file, do all the necessary reading and object creation, then return a
render/redirect for success. You might want to wrap the entire view in a
c
I also have a case where I would need to bulk add items from a file, the
client receives an excel file with products (up to a couple of hundreds).
I still haven't implemented nothing yet as the feature doesn't
have priority, in any case I thought adding a file upload option on the
admin, or maybe a
Say I've got a model like this:
class Product(models.Model):
name = models.CharField(max_length=200)
class ProductItem(models.Model):
product = models.ForeignKey(Product)
serialnumber = models.charField()
sold = models.BooleanField(default=False)
ProductItem represents physical p
4 matches
Mail list logo