Hi all,

I've got a Django app with a whole stack of data which I want to be
able to update on a semi-regular basis.  It's currently in Excel
format, which is then easily converted to CSV and imported into a
pre-defined MySQL table, with a relevant Django model defined around
it.

It all works pretty swiftly and efficiently - particularly considering
there are around 12,000 rows of data!

However, there is an image asset which relates to each row, and I want
a way to find a way to easily use the Django API to assign the
relevant image to the associated record, using a filename which
references a unique identifier.

I've got the bare-bones of a python script which will iterate over
each record and search a directory for a file with the relevant name,
but I'm having difficulty seeing how I can assign that image to the
relevant Django object.  Assigning it using the standard ImageField
gives me problems: even though the image is referenced, it gets saved
in the DB with it's full filesystem path.

Anyone have any pointers on how I might be able to implement this
gracefully?  Or am I just being too hacky with the API? ;)

-Phil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to