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

[Suggestion]: Fail loudly when trying to install on Django>=1.9 #36

Open
filwaitman opened this issue Oct 26, 2018 · 9 comments · May be fixed by #37
Open

[Suggestion]: Fail loudly when trying to install on Django>=1.9 #36

filwaitman opened this issue Oct 26, 2018 · 9 comments · May be fixed by #37

Comments

@filwaitman
Copy link

Hi there!

I was wondering if it would be nice force an installation error when Django>=1.9 is present.

This may (or may not, IDK) be a rare scenario but take my case as an example: I just upgraded a project from Django 1.8 to Django 1.11... and my Django admin interface was... well... misbehaving. It took me a considerable amount of time to understand that that was being caused by conflicts between (in my case) this and that.

If you guys agree this is a good idea I'll be happy to implement the changes, if needed.

@fabiocaccamo
Copy link

@filwaitman I suggest you to try django-admin-interface, it is based on django-flat-theme for older django versions and does exactly what you need.

@filwaitman
Copy link
Author

@fabiocaccamo thanks for the quick reply!

I'm not sure if I made myself clear. My scenario is:
3-4 years ago I started a project in Django 1.8 and decided to use django-flat-theme.
Last week (yes, it took a long time 😆 ) I decided to upgrade Django to 1.11 and all my third party libraries.

What I got:
My admin interface became inconsistent, JS and CSS weren't loading properly for no reason. After a while I realized that my manage.py collectstatic was pointing to duplicated files (for instance the SelectFilter2 I sent above)... removed the django-flat-theme from INSTALLED_APPS and fixed everything.

What I'm suggesting:
As soon as I try to upgrade django-flat-theme, setup.py (or some similar technique) identifies that Django>1.9 is present, and raises an error like "Don't install it from scratch, django-flat-theme is part of Django since 1.9".

What do you think?

@fabiocaccamo
Copy link

fabiocaccamo commented Oct 29, 2018

@filwaitman I understood your scenario, I had your same problem while testing django-admin-interface on different django versions.

Here you can see how I solved it: https://github.com/fabiocaccamo/django-admin-interface/blob/master/admin_interface/settings.py

@filwaitman
Copy link
Author

@filwaitman a ha! So I misread your first comment. =P
That's precisely what I was thinking. I'm gonna land a PR with that.
Thanks!

@fabiocaccamo
Copy link

@filwaitman why you need to land a PR? it's already done...

@filwaitman
Copy link
Author

It's done for django-admin-interface, not for django-flat-theme, right?
I would like to see my installation fails if I try to install/upgrade django-flat-theme when using Django>=1.9.

@fabiocaccamo
Copy link

django-admin-interface uses django-flat-theme under the hood, so your installation will fail as expected :)

@filwaitman
Copy link
Author

Yes but the problem is: I wasn't using django-admin-interface. I was using pure django-flat-theme.

I upgraded django + another 50 third party libraries, it's a though work to look individually to each of them and check whether or not I should flip to another library at that point. I would love to simply upgrade django-flat-theme (again, nothing related to django-admin-interface at this point) and see it failing so I could see easily that this is "incompatible" (actually "no longer needed") for django>=1.9.

This is not about "use library X, it suits your needs best". This is about upgrading a super old version of some third party library I decided to use 3-4 years ago.

@fabiocaccamo
Copy link

Send a PR and hope it will be merged.

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

Successfully merging a pull request may close this issue.

2 participants