Where should I put the code for a Django admin action for a third party app?
I'm new to Django. I am writing my own administrative action for a third party app/model, similar to this: http://mnjournal.com/post/2009/jul/10/adding-django-admin-actions-contrib-apps/
It's a simple snippet of code. I'm just wondering where people suggest that I put it. I don't want to put 开发者_JAVA技巧in the third party app because I might need to update to a newer version at some point.
Thanks.
You could make an own app, called 'utils' for example and put the code there in admin.py. You probably just should make sure that utils comes after the app you want to extend in your installed apps in settings.py!
精彩评论