Skip to content

Django Suit version 2.0 #475

Open
Open
@darklow

Description

@darklow

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

  • Based on Bootstrap 4.0 (currently v4-alpha):
    • Moved from Less to Sass.
    • Flexbox usage and support.
    • Responsive sizing using rem units. To increase whole admin sizing (font-sizes, margins), all you have to do is change font-size for body tag.
  • Django 1.9+
  • Menu rewrite to MenuItem classes
  • FontAwesome icons
  • Demo app is part of Django Suit repository now
  • Toggle-able list top actions if any row is selected
  • Menu:
    • Horizontal navigation
    • Aligned right menu
    • Rewrite whole menu builder to MenuItem classes

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

image

Todo:

  • CSS: Base layout
  • CSS: List base layout
  • Menu builder rewrite
  • Custom admin view example
  • CSS: List states / cell / row attributes
  • CSS: Popups
  • CSS: Forms
    • CSS: Forms base
    • CSS: Regular and collapsible fieldsets
    • Form sizing handling (label and field column proportions)
    • Two column change form with submit row on right
    • Submit buttons debounce - avoid clicking submit twice
    • Form inlines
    • Tabular Inlines
    • Stacked Inlines
    • CSS: Submit row
    • CSS: Floating/fixed Submit row
    • CSS: Delete confirmation
    • Sticky submit box
  • CSS: Alerts & messages
  • Suit Widgets
    • AutosizedTextarea
    • EnclosedInput
    • LinkedSelect
  • Native Widgets
    • CSS: Date & Date time picker
    • CSS: Side to Side chooser
    • CSS: Many to Many select
    • CSS: Many to Many checkboxes
  • CSS: Footer
  • CSS: Responsiveness
  • CSS: Login
  • CSS: Left side menu
  • Horizontal list filters
  • Form Tabs
  • Form Includes
  • Warning on leaving if unconfirmed changes
  • Print styles for list and forms.
  • Sortables
    • For tabular inline
    • For Stacked inline
    • For admin change list
  • Django support:
    • Django 1.9
    • Django 1.10
    • Django 1.11
  • Examples:
  • Documentation

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions