django-genericforeignkey 0.60.4

Django application that allows yo yout generic relations have a nice admin widget

Generic Foreign Key

Information

Generic Foreign Key is a Django application that allows your Generic relations have a nice widget in the admin

It is distrubuted under the terms of the GNU Lesser General Public License <http://www.gnu.org/licenses/lgpl.html>

Dependencies

<script src="/media/js/jquery-1.2.6.min.js"></script>

Installation

Install in your base_site.html of django admin

<script src-"/media/js/jquery-1.2.6.min.js"></script>

In your settings.py

Add a setting EXCLUDE_CONTENT_TYPES, with the content types to exclude. This step is not necesary, but advisable

EXCLUDE_CONTENT_TYPES = (('auth', 'group'), ('auth', 'messege'), ...)

You can filter too, with this setting

FILTER_CONTENT_TYPES = (('auth', 'group'), ('auth', 'messege'), ...)

If you want to a UI more friendly to select a the content

SEARCH_MODELADMIN = True

And in your change_list.html overwrite extrastyle block:

{% block extrastyle %}
  {{ block.super }}
  <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/changelists.css" />
  {% if cl.formset %}
      <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />
      {% url admin:jsi18n as jsi18nurl %}
      <script type="text/javascript" src="{{ jsi18nurl|default:'../../jsi18n/' }}"></script>
  {% endif %}
  {{ media }}
  {% if not actions_on_top and not actions_on_bottom %}
      <style>
      #changelist table thead th:first-child {width: inherit}
      </style>
  {% endif %}
  {{ generic_fk_media }}
{% endblock %}

In your ModelAdmin

Extend yout ModelAdmin with GenericAdmin

class MyModelAdmin(GenericAdmin):
    ...

0.60.4

  • Spanish translations
LGPL 3

Author

Yaco Sistemas S.L.

Pip

django-genericforeignkey==0.60.4

Classifiers

  • Framework :: Django
  • Development Status :: 4 - Beta
  • License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
File Type Python Version Uploaded On Downloads
django-genericforeignkey-0.60.4.tar.gz Source June 23, 2011 5,435
Version Release Date
0.60.4 June 23, 2011
0.60.3 April 6, 2011
0.60.2 April 5, 2011
0.60 April 4, 2011
0.55 Feb. 10, 2011
0.51 Jan. 11, 2011
0.5 Dec. 22, 2010
Date Package Version Action
Aug. 24, 2015, 11:03 p.m. django-genericforeignkey 0.55 Release Created
Aug. 24, 2015, 11:03 p.m. django-genericforeignkey 0.51 Release Created
Aug. 24, 2015, 11:03 p.m. django-genericforeignkey 0.60 Release Created
Aug. 24, 2015, 11:03 p.m. django-genericforeignkey 0.5 Release Created
Aug. 24, 2015, 11:03 p.m. django-genericforeignkey 0.60.4 Release Created
Aug. 24, 2015, 11:03 p.m. django-genericforeignkey 0.60.3 Release Created
Aug. 24, 2015, 11:03 p.m. django-genericforeignkey 0.60.2 Release Created
Aug. 24, 2015, 11:03 p.m. django-genericforeignkey Package Created