GithubHelp home page GithubHelp logo

benjaoming / django-relatedadminwidget Goto Github PK

View Code? Open in Web Editor NEW
40.0 7.0 9.0 21 KB

AS OF DJANGO 1.9 THIS PROJECT IS UNNECESSARY! Widget for displaying edit and delete links alongside foreign key admin widgets

Python 72.38% JavaScript 16.80% HTML 10.81%

django-relatedadminwidget's Introduction

django-relatedadminwidget

Widget for displaying edit and delete links alongside foreign key admin widgets

Flowers

Also see this project: django-admin-enhancer

Installation:

  1. pip install django-relatedadminwidget

  2. Add "relatedwidget" to settings.INSTALLED_APPS

  3. You may want to run your project's ./manage.py collectstatic

  4. In your applications' admin.py, let the model admins inherit from RelatedWidgetWrapperBase like in this example:

    from django.contrib import admin from relatedwidget import RelatedWidgetWrapperBase

    class MyModelAdmin(RelatedWidgetWrapperBase, admin.ModelAdmin): pass

    admin.site.register(MyModel, MyModelAdmin)

It also works with TabularInline and StackedInline! Remember the order of inheritence, always put RelatedWidgetWrapperBase first!

Troubleshooting

If you get a TemplateDoesNotExist error on 'relatedwidget/widget.html', you might have to add django.template.loaders.eggs.Loader to your settings.TEMPLATE_LOADERS.

Credits

User nasp did most of the work, I just updated it for Django 1.4 and packed it as an app.

django-relatedadminwidget's People

Contributors

benjaoming avatar joelcrocker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-relatedadminwidget's Issues

replace .live by .on in jquery

Deprecated 'live' function (http://api.jquery.com/live/) in relatedwidget.js caused javascript error, breaking the grappelli interface i'm using. I understand it's a jquery version issue. It could solve it quite easily by replacing the two live() function calls on lines 36 and 48 by on()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.