jschrewe / django-mongoadmin

Integrates mongodb into django's admin
http://www.schafproductions.com/projects/mongo-admin/
BSD 3-Clause "New" or "Revised" License
112 stars 38 forks source link

cannot import name MAX_SHOW_ALL_ALLOWED #18

Closed rafaelnovello closed 11 years ago

rafaelnovello commented 11 years ago

Hi guys!

MAX_SHOW_ALL_ALLOWED was removed in favor or ChangeList.list_max_show_all since Django changeset #16725

Very nice project!!

jschrewe commented 11 years ago

Hey,

Do you have a traceback for this? And are you using the Github version of mongoadmin? Because if I haven't missed the import anywhere there is already quite a bit of code in there to fix this. I'm not sure if the PyPI version has it though.

rafaelnovello commented 11 years ago

Jan,

I'm using the PyPI version. I will test with Github version and update here.

Thanks!

rafaelnovello commented 11 years ago

Jan,

I installed the Github version and the problem with MAX_SHOW_ALL_ALLOWED don't occur again, but now I have a "'StringField' object has no attribute 'rel'" when I use list_display option in admin.py.

This link is the error traceback

http://dpaste.com/hold/1236580/

jschrewe commented 11 years ago

Oh dear. Yeah looks like the list_display option is very much broken. It'll work fine without though until I've found a fix for this. Which might take a moment because I'd really love to avoid replacing as much code as possible.

rafaelnovello commented 11 years ago

Hmmm...ok. I can live without that kkk

Do you have an example of that? I would like to see what Django admin options works with MongoAdmin.

Thanks!

jschrewe commented 11 years ago

To be honest most of the options are try and error. I thought I had quite a few options covered for Django 1.4. But apparently they changed some internals of the admin. Again.

The trouble in general with integrating Mongo into Django is that both don't really work together. So I add lots of glue and hope for the best. Testing everything for several versions is something I simply can not manage to do. So in general I hope that if something blows up for someone I can just fix it.

So, if you stumble upon something that doesn't work, feel free to report it and I'll try to fix it. With the next major Django update something will break again though.

Not sure for what you want an example. Feel free to use everything just be aware that it might take some time to fix if it doesn't work :)

jschrewe commented 11 years ago

So, you can use the list_display option again without the app crashing. Field names are currently missing (at least with Django 1.5) and a couple other formatting stuff might be wrong. Working on it though.

Oh, you need to update mongodbforms from Github for it to work.

jschrewe commented 11 years ago

Works for me now. Let me know if there are more problems.

rafaelnovello commented 11 years ago

Jan, thanks for help!

I will try again and if I find more problems I notice.