Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django2 #593

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
fc8155b
适配django 2.0正式版
wgbbiao Dec 5, 2017
0fe415f
修改文档
wgbbiao Dec 5, 2017
bbaebd6
修改列表编辑插件不能使用的问题,暂时解决了,可能会有其它的问题,欢迎测试.
wgbbiao Dec 6, 2017
8263c23
适配python3
wgbbiao Dec 7, 2017
b046c86
增加检查 form media的判断
wgbbiao Dec 7, 2017
d3bcb12
修改不能使用只读字段的功能
wgbbiao Dec 8, 2017
b69e1aa
增加安装分支的说明
wgbbiao Dec 11, 2017
a0f6173
修改readme 格式
wgbbiao Dec 11, 2017
1f4a3e1
兼容django 2.0
wgbbiao Dec 12, 2017
ce7df0d
Update filters.py
ly0 Dec 12, 2017
a975de0
Merge pull request #476 from ly0/patch-2
wgbbiao Dec 14, 2017
749ff5b
删除手机插件
wgbbiao Dec 25, 2017
c53c33a
修复运行时缺少包的问题
hyzx86 Dec 31, 2017
b655aa7
Merge pull request #496 from hyzx86/patch-4
wgbbiao Jan 2, 2018
932e371
DeprecationWarning: inspect.getargspec() is deprecated, use inspect.s…
wgbbiao Jan 29, 2018
82a8a3b
Fix Django2.0 issue #449
YennyQ Apr 26, 2018
e95e6cb
Fix Django2.0 widgets.py AdminSplitDateTime IndexError
YennyQ Apr 26, 2018
9ca81ed
Merge pull request #570 from YennyQ/django2
wgbbiao May 7, 2018
9cbf87e
删除测试代码
wgbbiao May 7, 2018
031baee
Merge branch 'master' into django2
wgbbiao May 7, 2018
f2a3ae2
修改inline 点加号出现的问题
wgbbiao May 18, 2018
c2f0e8e
Update requirements.txt
xiaofeng283 Jun 17, 2018
21e6557
Merge pull request #587 from xiaofeng283-t/django2
wgbbiao Jun 19, 2018
694606d
django2.0适配版本的editable.py第59行,缺少Media的引用
wgbbiao Jun 19, 2018
66ebad6
Merge branch 'django2' of github.com:sshwsfc/xadmin into django2
wgbbiao Jun 19, 2018
f1f07f0
修复获取单个记录时引发select all的问题
hongweipeng Jun 25, 2018
4ed71ef
Merge pull request #589 from hongweipeng/patch-1
wgbbiao Jun 25, 2018
dbd5d4c
修复列表页重复查询的问题
hongweipeng Jun 25, 2018
475289b
Merge pull request #590 from hongweipeng/patch-1
wgbbiao Jun 27, 2018
1e3f7b1
修复meta.get_all_field_names不存在问题
hongweipeng Jun 27, 2018
b03dade
Merge pull request #591 from hongweipeng/patch-1
wgbbiao Jun 29, 2018
a3b200c
修改tab 不显示的问题
wgbbiao Aug 7, 2018
1276190
适配django 2.1
wgbbiao Aug 8, 2018
d7e283f
修改安装django2分支的命令
wgbbiao Aug 8, 2018
a9daa73
适配django 2.1 2.0 fixed : https://github.com/sshwsfc/xadmin/issues/612
wgbbiao Aug 15, 2018
9072fdd
fix images.py in django 2.1
njuFerret Aug 19, 2018
4f626bb
Merge pull request #614 from njuFerret/django2
wgbbiao Aug 19, 2018
0751cd9
兼容django 2.1版本,修改删除级联关系的记录时会抛出找不到 has_delete_permission 的问题
wgbbiao Aug 29, 2018
0b63e39
修改在详情页删除数据报的错误
wgbbiao Sep 17, 2018
5c0e836
左侧菜单内容过多时显示滚动条
hongweipeng Sep 20, 2018
0b214ac
Merge pull request #627 from hongweipeng/django2-sitemenu-scroll
wgbbiao Sep 25, 2018
992d780
fixed 有外键字段的,没有显示相关联字段详情的按钮 #629 https://github.com/sshwsfc/xadmin/is…
wgbbiao Sep 30, 2018
0aa9d2a
fix bug when using `get_deleted_objects` function
mymusise Oct 9, 2018
375db83
update version judgement
mymusise Oct 19, 2018
35a854c
修复django版本判断导致get_deleted_objects参数错误问题
hongweipeng Oct 30, 2018
33356ce
Merge pull request #638 from hongweipeng/fix-get_deleted_objects-djan…
wgbbiao Oct 31, 2018
47481fe
Merge pull request #633 from mymusise/django2
wgbbiao Oct 31, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions xadmin/views/base.py
Original file line number Diff line number Diff line change
@@ -526,11 +526,10 @@ def get_object(self, object_id):
Get model object instance by object_id, used for change admin view
"""
# first get base admin view property queryset, return default model queryset
queryset = self.queryset()
model = queryset.model
model = self.model
try:
object_id = model._meta.pk.to_python(object_id)
return queryset.get(pk=object_id)
return model.objects.get(pk=object_id)
except (model.DoesNotExist, ValidationError):
return None