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

Two models named "Post" causes confusion in admin area #150

Closed
deronsizemore opened this issue Sep 16, 2013 · 10 comments
Closed

Two models named "Post" causes confusion in admin area #150

deronsizemore opened this issue Sep 16, 2013 · 10 comments

Comments

@deronsizemore
Copy link

Hi,

I have two apps currently in development. I have "Shares" and "Blog." I've named the model for both of these apps "Post." Everything works fine except for the left sidebar menu highlighting. It seems to get confused by the two models being named the same.

For example, if I go to "Blog" and add a new entry, "Blog" in the sidebar is highlighted with blue background to indicate what I'm posting into. If I then go to "Shares" and click to make a new post, "Shares" background in the sidebar menu does not turn blue, "Blog" in the sidebar menu actually is the link that turns blue. The breadcrumb trail at the top seems to be okay and it actually takes me to the correct form, it's just that the sidebar menu seems confused on what section I'm in.

@deronsizemore
Copy link
Author

After some more testing, I wanted to add that for whatever reason, after changing my models to unique names instead of both being "Post" the issue went away. A little while later, the issue came back again, so it's definitely not related to having two models named the same in two different apps.

@darklow
Copy link
Owner

darklow commented Sep 17, 2013

Please post your MENU config. Thanks.

@deronsizemore
Copy link
Author

Thanks for the reply. I'm sorry for my ignorance, but I have no idea where my MENU Config is located so that I can post it?

@deronsizemore
Copy link
Author

Sorry, doesn't seem to be formatting that code correctly. I hope you get the idea.

@darklow
Copy link
Owner

darklow commented Sep 17, 2013

Please post content of your models.py file (using http://dpaste.com)

@deronsizemore
Copy link
Author

Here is my models.py for my "Blog:" http://dpaste.com/1384612/

And here is my models.py for my "Shares:" http://dpaste.com/1384614/

@darklow
Copy link
Owner

darklow commented Sep 17, 2013

But previously you wrote, that you changed to unique names and problem still appeared.
I see you have the same names again.

@deronsizemore
Copy link
Author

Correct. I changed everthing to use unique names and the problem went away for probably 30 minutes and magically came back with the unique names. So, given that I wanted non-unique names and the problem was still happening with unique names, I changed everything back again. Sorry.. I'm new to all this so I'm probably not doing things the most efficient way.

@darklow
Copy link
Owner

darklow commented Sep 17, 2013

I fixed the problem. Please test if it works correctly using latest development version:

pip uninstall django-suit
pip install https://github.com/darklow/django-suit/tarball/develop

@deronsizemore
Copy link
Author

Looks like things are fixed! Thanks so much for bearing with my ignorance on this and fixing it so quickly. I was afraid I was doing something incorrectly. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants