Skip to content

Instantly share code, notes, and snippets.

View belyak's full-sized avatar

Andrey Belyak belyak

  • Russian Federation, Saint-Petersburg
View GitHub Profile
@belyak
belyak / reverseadmin.py
Created October 29, 2015 13:49 — forked from wolever/reverseadmin.py
Forked from https://gist.github.com/mzbyszewska/8b6afc312b024832aa85 , updated to work with Django 1.8
'''
adminreverse from here http://djangosnippets.org/snippets/2032/
changed for working with ForeignKeys
'''
'''
reverseadmin
============
Module that makes django admin handle OneToOneFields in a better way.
A common use case for one-to-one relationships is to "embed" a model
inside another one. For example, a Person may have multiple foreign