Thanks Chris.
I was trying to access the _meta in the __init__ method and it didn't
worked because I didn't have an instance.
Then I used a post_init method to set up my custom "upload_to".
Now I don't have to worry about where to put my uploads! That's nice!
:)
Regards.
Enrico
--~--~---
You can get the application and model name from the object by doing
To get app name:
obj._meta.app_label
To get model name(I think, I've never tried this):
obj._meta.module_name
Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribe
2 matches
Mail list logo