darklow / django-suit

Modern theme for Django admin interface
http://djangosuit.com/
Other
2.33k stars 704 forks source link

Django Suit version 2.0 #475

Open darklow opened 8 years ago

darklow commented 8 years ago

Brace yourselves, this is going to be a long post!

I have bad news and good news. The bad news is - Bootstrap 3 branch will be discontinued. The good news is what is coming instead! 

Some history

Some time after i launched the very first Django Suit (DS) version I realised biggest challenge is to keep up with Django admin changes. And bs3 branch version proved that even more. I haven’t finished it yet as Django admin started changing quite a lot. New templates, new features, new styles etc. Third party apps are also changing and evolving a lot, therefore same problem existed with 3rd party apps too. I knew i needed to solve this issue before continuing.

Flexbox

Recently I did a lot of thinking and experimenting and because browsers have evolved significantly I found an answer to my problems - Flexbox. I’ve been working on Django Suit fresh rewrite for few weeks and haven’t overridden a single Django admin template and in the end of the post you can see real screenshot of what i achieved by CSS only.

So this is a short story how Django Suit v2.0 rewrite started.

I will try to avoid any Django admin templates override as long as possible and if needed i will use JS DOM manipulations instead of overriding templates, which gives a few huge benefits: When Django admin templates changes, some minor visual bugs may appear, but it will not break anything.

Without overriding admin templates, we have much wider 3rd party app support. Any app that haven’t modified templates too much and use Django admin markup should work perfectly. This gives us much wider Django version support range, however I think Django Suit will stay with 2-3 recent version support.

What’s new in Django Suit v2

So here is the current state of v2.0 rewrite. No templates overridden except base_site.html:

image

Todo:

If you're ok with incomplete features and missing documentation (demo app with all examples is included) then feel free to install or even use it for production (I personally use it in production for a few projects already):

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

In requirements.txt:

 -e git://github.com/darklow/django-suit.git@v2#egg=django-suit

Work in progress links: v2 demo: http://v2.djangosuit.com/admin/ v2 branch: https://github.com/darklow/django-suit/tree/v2 v2 docs: http://django-suit.readthedocs.org/en/v2/

Feel free to share your thoughts.

chris-erickson commented 8 years ago

We use Suit on every project (paid!), and it looks like the future is going to be good. 🎩 Really appreciate the work you've done.

fyaconiello commented 8 years ago

Any ballpark when suit v2 is going to be ready? I have a couple paid django 1.x folks i wanted to upgrade to 1.9, but i'm afraid to break their admin.

gamesbook commented 8 years ago

I really hope we will see support for Django 1.8 as that is a long term release - that could be a deal--breaker.

gamesbook commented 8 years ago

Also hope to see the left-menu option retained as an alternative to the top menu - there was a lot of discussion about this before -- the fact remains that there is simply more horizontal screen space than vertical and avoiding "bar creep" is very desirable.

darklow commented 8 years ago

@gamesbook Thanks for your feedback. I'll look into Django 1.8 support. As the stage is early, probably I can adjust it to make work for both. Supporting Django LTS release makes sense. And I added horizontal menu to features list as well, it was planned, just forgot to mention in roadmap.

SalahAdDin commented 8 years ago

What's about left or right sidebar? I want all previous suit versio features.

gamesbook commented 8 years ago

@darklow Thanks for the positive feedback. This a great product that we hope to keep using and deploying further in future. (I see 1.8LTS has planned support through to April 2018).

darklow commented 8 years ago

Day by day suit v2 is getting more and more mature.

Status update:

PS. You can see total progress in main issue description.

image

v2 demo: http://v2.djangosuit.com/admin/

darklow commented 8 years ago

I know many of you will like these features that I just deployed ;)

You can see full list of updates in v2 branch commit log: https://github.com/darklow/django-suit/commits/v2

v2 demo: http://v2.djangosuit.com/admin/demo/country/170/change/

image

nchampsavoir commented 8 years ago

This is really shaping up quite nicely. :)

2016-02-17 16:39 GMT+01:00 Kaspars Sprogis notifications@github.com:

I know many of you will like these features that I just deployed ;)

  • Two column change form with submit row on right (with responsive fallback to bottom)
  • AutoSized textarea

You can see full list of updates in v2 branch commit log: https://github.com/darklow/django-suit/commits/v2

v2 demo: http://v2.djangosuit.com/admin/demo/country/170/change/

[image: image] https://cloud.githubusercontent.com/assets/445304/13114625/f301e576-d59c-11e5-8290-0131349b6af6.png

v2 demo: http://v2.djangosuit.com/admin/

— Reply to this email directly or view it on GitHub https://github.com/darklow/django-suit/issues/475#issuecomment-185260380 .

darklow commented 8 years ago

If anyone wants to contribute to Django framework and help Django Suit as well, there is a great chance to do it. There is an incomplete pull request at Django repository with a super-valuable feature started, which needs some help to make it to the final line. Author don't have time to finish what he started, however he already did a great job and almost finished it.

Django: Added template-based widget rendering https://code.djangoproject.com/ticket/15667

Pull request and author comments about what still has to be done to finish it: https://github.com/django/django/pull/4848#issuecomment-173802002

I will try to help as much as possible, but i already have my hands full with v2 and other things. If we could get this PR by Django version 1.10 then no more hacks for widgets are needed and anyone can style any widgets with custom templates. I think this is awesome and very very valuable feature.

Thanks.

darklow commented 8 years ago

Isn't this cute? :) Native Django admin Date/Time widgets:

image

image

image

Live demo: http://v2.djangosuit.com/admin/demo/showcase/add/

platzhersh commented 8 years ago

This looks great! good job! Am 18.02.2016 14:11 schrieb "Kaspars Sprogis" notifications@github.com:

Isn't this cute? :) Native Django admin Date/Time widgets:

[image: image] https://cloud.githubusercontent.com/assets/445304/13144158/8d5cac78-d651-11e5-8dc9-e68afb1371b1.png

[image: image] https://cloud.githubusercontent.com/assets/445304/13144196/c078a90e-d651-11e5-8487-dff681331a31.png

[image: image] https://cloud.githubusercontent.com/assets/445304/13144208/d2764850-d651-11e5-9769-7cafc9873da2.png

Live demo: http://v2.djangosuit.com/admin/demo/showcase/add/

— Reply to this email directly or view it on GitHub https://github.com/darklow/django-suit/issues/475#issuecomment-185711858 .

luflow commented 8 years ago

Awesome!

darklow commented 8 years ago

Some users with existing licenses asked if they can contribute or buy an upgrade fee for v2 in advance. So even if this is complete rewrite, all you current licenses will be valid for v2 and therefore will be no upgrade fee. If you want to show your appreciation and support development of v2, you can use Donate feature or buy an extra license here: http://djangosuit.com/pricing/#v2 Thank you!

darklow commented 8 years ago

Sortables for change list and tabular inlines are ready! http://v2.djangosuit.com/admin/demo/continent/ http://v2.djangosuit.com/admin/demo/continent/9/change/

Tips and Tricks By these years I've learned a lot of how to extend Django admin and in new v2 documentation I will share a lot of my knowledge how to do that too.

Just added to demo app how to extend submit_line.html, object-tools or add custom admin actions for specific ModelAdmin: http://v2.djangosuit.com/admin/demo/showcase/1/change/ https://github.com/darklow/django-suit/blob/v2/demo/demo/templatetags/demo_tags.py#L6 https://github.com/darklow/django-suit/blob/v2/demo/demo/admin.py#L190 https://github.com/darklow/django-suit/blob/v2/demo/demo/admin.py#L119

Hope you find it useful ;)

SalahAdDin commented 8 years ago

:+1:

darklow commented 8 years ago

Stacked inlines including Sortable Stacked inlines are now ready! http://v2.djangosuit.com/admin/demo/showcase/1/change/ image

SalahAdDin commented 8 years ago

:+1: I like it man!

darklow commented 8 years ago

Anyone using v2.0 alpha in development already or is it just me? :)

otondin commented 8 years ago

It's getting gorgeous! :+1:

landaverdelbo commented 8 years ago

me in mexico, for school management - testing...

darklow commented 8 years ago

Happy to announce next two handy features that are finished:

Beta release is coming closer by each day! http://v2.djangosuit.com/admin/demo/country/170/change/

image

image

willseward commented 8 years ago

This is awesome! Keep up the good work!

Nekmo commented 8 years ago

This looks good! :D

Thanks for your work.

Un cordial saludo: -- Nekmo.

Sitio web: http://nekmo.com Dirección de contacto: contacto@nekmo.com XMPP/Jabber: contacto@nekmo.com Google+: Nekmo Com

2016-03-09 18:14 GMT+01:00 Wills Ward notifications@github.com:

This is awesome! Keep up the good work!

— Reply to this email directly or view it on GitHub https://github.com/darklow/django-suit/issues/475#issuecomment-194405456 .

ghost commented 8 years ago

Yes, it's a great software... but, please, we support their development http://djangosuit.com/pricing/#v2

SalahAdDin commented 8 years ago

Eh, put a 400 error template please.

oesah commented 8 years ago

Awesome work, can't wait for V2!!!

lsgd commented 8 years ago

Do you plan to support a left-sided navigation like in v1? Most monitors have more space in the width than height and I would really prefer of move the navigation to the left instead of top. :-)

darklow commented 8 years ago

@lukas-schulze I am thinking of left-sided navigation. But stick has two ends. Submit button column is also right sided. So by adding left side menu the space for form content is narrowing even more down. Users were complaining about that in v1. Maybe narrowing top navigation could be a solution as well.

darklow commented 8 years ago

@eviltnan and others. Please use new Github +1 feature for comment or whole issue instead of a comment with text +1.

Sovetnikov commented 8 years ago

This makes django admin enter to the new level! Two usability features that will make life even better with Suit:

  1. Drag'n'Drop for ordering (instead of up/down arrows)
  2. New, redesigned filter_horizontal widget (as in groups and permissions for user changeform). At now it is very ugly and can be used only on small amounts of items available for select, it even lacks filtering in selected items list.
gamesbook commented 8 years ago

@lukas-schulze This topic was raised earlier in this issue and @darklow said he would support it.

Apart from the very good reason of it maximising available screen use, its also important for maintaining continuity with existing deployments; end users get a bit cranky if you "improve" things without really solid justification.

joseph2002 commented 8 years ago

the package installed via pip install https://github.com/darklow/django-suit/tarball/v2 does not include bootstrap css? How can I deal with this?

darklow commented 8 years ago

@joseph2002 Django Suit v2 doesn't have separate bootstrap.css file. It is all compiled using sass into single suit.css file: https://github.com/darklow/django-suit/tree/v2/suit/static/suit/css

joseph2002 commented 8 years ago

@darklow It's ok now after I cleared my browser's cache. before that I can not see any styles, just plain texts. maybe something conflict with previous version of suit. thank you!

darklow commented 8 years ago

If you're already using v2 or playing with it, until there are no official docs, read my comments here if you're interested in how to control form sizing in v2: https://github.com/darklow/django-suit/issues/500

kcolton commented 8 years ago

@darklow 👍 We've been happy suit 1.0 users, then happy suit bs3 branch users, and look forward to being happy suit 2.0 users. Donated as a small token of our appreciation. Cheers 🍻

http://djangosuit.com/pricing/#v2

darklow commented 8 years ago

@kcolton Thank you, I appreciate it. Next week I have few important deadlines and after that I am planning to finish things that are still missing and release v2 beta and put it on pypi.

darklow commented 8 years ago

For those who are using v2, just added missing style for two-select/column selector widget which is used for permissions: http://v2.djangosuit.com/admin/auth/group/add/

luto commented 8 years ago

Just donated to your awesome project to show our thanks. Keep up the good work on v2! :+1:

darklow commented 8 years ago

@luto Maybe you donated to somebody, but definitely not me or DjangoSuit :) Thanks for good intentions, though! :)

luto commented 8 years ago

well, my boss donated a few weeks ago, by buying a license :) "just" was maybe the wrong word :sweat_smile:

darklow commented 8 years ago

Another awesome feature migrated: Added suit_row_attributes, suit_cell_attributes callables for row/cell/column styling based on object and field and added one new suit_column_attributes callable for column header styling:

Demo: http://v2.djangosuit.com/admin/demo/continent/ https://github.com/darklow/django-suit/blob/v2/demo/demo/admin.py#L140

Preview: image

henriquechehad commented 8 years ago

👍

kamilgregorczyk commented 8 years ago

How about inline in inline? it is very necessary for many projects

darklow commented 8 years ago

@uniqe15 Inline in inline is way too complicated, there are few apps that does that, I tried, but they are always outdated and have many bugs and limitations.

However I have implemented in on of my projects "kind of" inline in inline solution, where you can edit 2nd level inline items in a popup. This is 100% valid solution using only Django admin templates to achieve this. I will include in the demo app to show how it could be done. Here is a preview of stacked inline which has more related items in it: image

Popup once you click "Edit related": image

kamilgregorczyk commented 8 years ago

I cannot wait to try it out! Is there any official release date?

darklow commented 8 years ago

@uniqe15 No official release date yet, but I am using v2-dev already in 3 projects in production. You can try it out already. Most important features are there.

kamilgregorczyk commented 8 years ago

I'm writing a project for graduation (poll app) and i have a lot of inline-in-inline stuff, is there a way to clone this v2-dev package? I'm not going to use it in production ofc but it will make my work muuch easier.