I am not quite sure what you are trying to achieve (without seeing sample code), but here is some very basic code showing how a proxy could work:
-- models.py
class MainModel(Model):
"""mother of models"""
...
class MainModelProxy(MainModel):
objects = MainModelProxyManager()
class Meta:
proxy = True
admin.py
class MainModelAdmin(ModelAdmin):
"""mother of all admin"""
...
class MainModelProxyAdmin(MainModelAdmin):
#add salt to taste
admin.site.register(MainModel, MainModelAdmin)
admin.site.register(MainModelProxy, MainModelProxyAdmin)
On Monday, 2 March 2015 18:16:36 UTC+2, Rootz wrote:
Question.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bef0acd2-3a6b-4c61-b3f8-70e55e46d7d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment