beniwohli / django-treeadmin Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
class SkillAdmin(TreeAdmin):
list_per_page = 1000
jquery_use_google_cdn = True
jquery_no_conflict = False
this works... defaults do NOT
File "/local/lib/python2.7/site-packages/treeadmin/admin.py", line 6, in
from django.utils import simplejson
ImportError: cannot import name simplejson
Everytime I run a management task in my Django app, in which I am using django-treeadmin, I get the following Warning on console
/home/stefano/venvs/open_bilanci/local/lib/python2.7/site-packages/treeadmin/admin.py:6: DeprecationWarning: django.utils.simplejson is deprecated; use json instead.
from django.utils import simplejson
Upgrading to latest FeinCMS solved the issue for me, however, it turns out this is currently broken in this repository.
Running:
Django 1.4 on Mac OSX 10.7 with django-mptt==0.5.5, latest django-treeadmin, latest grappelli
Reproducing:
Set up TreeAdmin as base of Model's admin class and load up the list page for your model. Moving an object causes a 403 on the POST method. Looks like the XHR expects a relative path, where as I am handing it an absolute path that is still pointing to my local machine. Check toolbox.js in the ajaxSetup function, I think that's where it bugs out.
The $.ajaxSetup function never fires, changing it to treeadmin.jQuery.ajaxSetup resolves the issue.
django-mptt provides an MPTTMeta options class allowing for overriding the attribute names. This TreeAdmin implementation (and possibly the one upstream; I've not checked, and your policy on bug reports isn't clear ;)) has hard coded usages of the default, mitigating any ability to customise the MPTTMeta.
Specifically, at a glance:
admin.py:131
admin.py:140
(links are hardcoded against 881b018 so that changes applied do not cause these to point to the wrong lines)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.