Django Suit version 2.0 #475

Open
darklow opened this Issue Jan 31, 2016 · 116 comments

Projects

None yet
@darklow
Owner
darklow commented Jan 31, 2016 edited

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
  • 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.8 (haven't tested fully)
    • Django 1.9
  • Examples:
    • "Kind of" inlines in inlines / nested inlines solution #475 (comment)
    • Multiple admin sites
    • Django select2 widget
  • 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.

@darklow darklow added the v2 label Jan 31, 2016
@chris-erickson

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

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

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
gamesbook commented Feb 2, 2016 edited

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
Owner
darklow commented Feb 2, 2016

@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

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

@gamesbook

@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
Owner
darklow commented Feb 4, 2016

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

Status update:

  • List layout fixes
  • Forms base
  • Submit row
  • Delete confimations

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

image

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

@darklow darklow referenced this issue Feb 14, 2016
Closed

MPTT Bug in bs3 #483

@darklow
Owner
darklow commented Feb 17, 2016

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

@nchampsavoir

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
#475 (comment)
.

@darklow
Owner
darklow commented Feb 18, 2016

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:
django/django#4848 (comment)

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
Owner
darklow commented Feb 18, 2016

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

image

image

image

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

@krautnerds

Awesome!

@darklow
Owner
darklow commented Feb 19, 2016

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
Owner
darklow commented Feb 19, 2016

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

👍

@darklow
Owner
darklow commented Mar 3, 2016

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

@SalahAdDin

👍 I like it man!

@darklow
Owner
darklow commented Mar 3, 2016

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

@otondin
otondin commented Mar 3, 2016

It's getting gorgeous! 👍

@landaverdelbo

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

@darklow
Owner
darklow commented Mar 5, 2016

Happy to announce next two handy features that are finished:

  • Form Tabs
  • Form Includes

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

image

image

@willseward

This is awesome! Keep up the good work!

@Nekmo
Nekmo commented Mar 9, 2016

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
#475 (comment)
.

@mauriciobaeza

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

@SalahAdDin

Eh, put a 400 error template please.

@oesah
oesah commented Mar 22, 2016

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

@lukas-schulze

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
Owner
darklow commented Mar 24, 2016

@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
Owner
darklow commented Mar 24, 2016

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

@Sovetnikov

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

@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

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
Owner
darklow commented Apr 24, 2016 edited

@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

@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
Owner
darklow commented Apr 28, 2016

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:
#500

@kcolton
kcolton commented May 1, 2016

@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
Owner
darklow commented May 1, 2016

@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
Owner
darklow commented May 12, 2016 edited

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
luto commented Jun 5, 2016

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

@darklow
Owner
darklow commented Jun 6, 2016

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

@luto
luto commented Jun 6, 2016

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

@darklow
Owner
darklow commented Jun 13, 2016 edited

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

👍

@kamilgregorczyk

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

@darklow
Owner
darklow commented Jul 12, 2016 edited

@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

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

@darklow
Owner
darklow commented Jul 12, 2016 edited

@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

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.

@darklow
Owner
darklow commented Jul 12, 2016

@uniqe15 In my first post in this issue I wrote how to install v2-dev: #475 (comment) however there is no example for inlines in inlines included yet.

@geekashu

@darklow It seems django-debug-toolbar is not working with v2. Would appreciate if you could please check at your end.

@darklow
Owner
darklow commented Jul 12, 2016 edited

@geekashu It is working but is getting hidden. It bootstrap fault, this line hides it https://github.com/twbs/bootstrap/blob/v4-dev/scss/_reboot.scss#L391
I will look forward to override it somehow.

@darklow
Owner
darklow commented Jul 13, 2016

@geekashu I just fixed Django Debug Toolbar problem, just reinstall v2-dev:

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

thank you,.. hoping for nested inline demo soon..

@geekashu

yup it works now... thanku...

@mzbyszewska

I' using Django Suit v2. Is it possible to show Suit menu at frontend?

@darklow
Owner
darklow commented Aug 22, 2016

@mzbyszewska I don't think so, at least not in an easy way, Django Suit is "skin/addon" specifically for Django admin app and highly relies on it's context variables.

@mzbyszewska

It seems that I should slightly overwritte your get_menu tag in case "if not available_apps" and fake available_apps for frontend. Then the MenuManager will has chance to read custom SuitConfig.

@geekashu

I am using custom formset for my inline admin, inline formset are doing some custom validation and raises a ValidationError if certain criteria doesn't met for all the forms.

Now it seems triggered error messages are not able to use errorlist css class from suit.css and renders them as plain black colored text.

@darklow
Owner
darklow commented Aug 24, 2016

@geekashu please open new issue and provide a screenshot, I can't reproduce.

@dwasyl
dwasyl commented Aug 25, 2016

@darklow this update looks great, just looking into trying this out for the first time. That said, nested inlines is a huge feature for a few projects of mine and it would be great to see support for it. At the moment, I've used dj-nested-inlines before, and it seems that django-nested-admin has support for the current version of django-suit. It would be great to see this continue through a 3rd party module or just be builtin.

While there aren't necessarily a ton of use-cases there are a few where it's pretty indispensable.

@darklow
Owner
darklow commented Aug 29, 2016 edited

Note about v2 support for Django 1.8 (LTE) @gamesbook.

For a few days I've been trying to add support for Django 1.8 and it isn't so easy and I am considering not adding it for upcoming v2. Although 1.8 is long-term release it is missing some important features which made Django Suit v2 so easy and clean to develop.

The thing is in Django 1.9+ template loader was updated and improved which made possible to extend Django admin templates in very simple and clean way without overriding whole change_form.html and other main Django admin templates files, but just few parts of it.

In order to support Django 1.8 I would need to go back to fully copy/pasting full change_form.html and other file content and making appropriate changes, which would make problems supporting 3rd party apps "out-of-the-box" and other issues.

Current Django v2-dev already supports Django 1.9 and Django 1.10.

I think I must look forward this time and not breaking nice and simple things I created to support Django 1.8 for which mainstream support has already ended and only security fixes will be added.
https://www.djangoproject.com/download/

By the way Django 1.10 which is already out has support until December 2017 (just 4x months difference to Django 1.8)

For those who need Django 1.8 version support, let me know what you think.
PS. Django 1.8 users can still use 0.2.x branch.

@darklow
Owner
darklow commented Aug 29, 2016

@chris-erickson, @gamesbook good news!

Forget my previous post, persistent trying and tests resulted in success and I found a way to support all three Django 1.8, 1.9 and 1.10 versions.
I merged inv2-django18 branch into https://github.com/darklow/django-suit/tree/v2 and now you can try it out.

Django 1.8 still have some cosmetic issues and some legacy css classes that need some attention, but so far it works.

Feel free to test it with Django 1.8:

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

That is good news. We are scheduled to update to 1.8 soon and would like to
sync this change with Suitv2.

On 29 August 2016 at 17:13, Kaspars Sprogis notifications@github.com
wrote:

@chris-erickson https://github.com/chris-erickson, @gamesbook
https://github.com/gamesbook good news!

Forget my previous post, persistent trying and tests resulted in success
and I found a way to support all three Django 1.8, 1.9 and 1.10 versions.
I merged inv2-django18 branch into https://github.com/darklow/
django-suit/tree/v2 and now you can try it out.

Django 1.8 still have some cosmetic issues and some legacy css classes
that need some attention, but so far it works.

Feel free to test it with Django 1.8:

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


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#475 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAVm67H1NcSRcmNTWiNZKjMeEfGCIQJKks5qkvcngaJpZM4HP7vt
.

@keyvanm
keyvanm commented Oct 3, 2016

suit.js:199 Uncaught ReferenceError: Suit is not defined

@darklow
Owner
darklow commented Oct 3, 2016

@keyvanm Please open separate issue with more details, Django version etc.

@heathernicoale

Love V2 so far! Convinced my supervisors to user for our development project. Question: are drop down lists for filters feasible for this version? Instead of or in place of the list_filter default?

@darklow
Owner
darklow commented Oct 3, 2016 edited

@heathernicoale Yes, I will reimplement them as well for v2.
"Horizontal list filters" checkbox in feature list

@heathernicoale

@darklow - I see. I overlooked that, I apologize! Can't wait! :)

@heathernicoale
heathernicoale commented Oct 13, 2016 edited

Just out of curiosity - do you have a general idea of the release date for V2? :) This is such a great product so far!

@ganmedia

Can you explain how to install version 2 on Digital Ocean Django One-Click Install Image?
I have been trying using your tutorial but it never works.

Thanks.

@darklow
Owner
darklow commented Oct 24, 2016

@ganmedia I am not familiar with Digital Ocean and have no idea what One-Click install means.
To install django-suit v2 you need to run:

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

Or if you're using requirements.txt file then use following line (keeping space as first char):

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

I did it but I got always the same error:

TemplateSyntaxError at /admin/
'suit_tags' is not a valid tag library: ImportError raised loading suit.templatetags.suit_tags: No module named apps

@darklow
Owner
darklow commented Oct 24, 2016

@ganmedia please open a separate issue with some more details, full stacktrace, Django & python versions etc.

@darklow
Owner
darklow commented Oct 24, 2016

Two new features just added to v2-dev:

  • Django Suit now supports multiple admin instances - you can define settings / menus per each admin_site.
  • Define def menu_handler(items, request, context): return items method to config class to manipulate menu items right before they are being rendered.
@gamesbook

Hoping that we'll see an "official" release before year end - this would be a fantastic upgrade to offer clients for next year!

@darklow
Owner
darklow commented Oct 25, 2016 edited

@gamesbook me too :) Funny or not one thing that holds me back for releasing something like public beta is not having done left side navigation. Since I like top/horizontal navigation much more I wouldn't use left side anymore. Hard to make/do something when you don't need it. You will never run out of vertical space, but you will run out of horizontal eventually and left side nav will help you do that even faster and then I got tens of issues about "my inlines doesn't fit in horizontally and wraps" kind of issues.

I've said it couple of times - I am already using v2-dev branch on all my production projects with no issues. In a way it is even more stable than master or discontinued bs3 branch. I guess that is another reason holding back. But I am close to releasing "official" version. As soon as I got my hands on new Documentation.

@SanderTuit

@darklow Have you considered collapsible side navigation? It seems like that would work great on mobile and smaller screens: that way it wouldn't take up horizontal space if there isn't enough space.

@darklow
Owner
darklow commented Oct 25, 2016 edited

@SanderTuit Yes I have, and that was my intention, but as you know for responsiveness you need extra time to handle all the layout changes, collapses etc. But in terms of essential features it wasn't in my priority list so far. First I wanted to deal with features that doesn't have alternative solutions. Right now list filters as dropdowns are next ones in the list.

@gamesbook

@darklow In principle, you are right - infinite scrolling. But the trick is to fit the key data into limited vertical space without users having to scroll. I limit the default view to 10 or 15 rows for that reason. An optional "hider" on the sidebar (like bitbucket uses) also makes sense.

@darklow
Owner
darklow commented Nov 12, 2016 edited

Had quite productive day.

  • Updated to latest Bootstrap v4-alpha5.
  • Vertical menu layout. (work still in progress and polishing details, but base is there).
  • Icon support.

Todo:

  • Vertical menu responsiveness.

Suggestions and feedback are welcomed.

pip uninstall django-suit
pip install https://github.com/darklow/django-suit/tarball/v2
#apps.py
class SuitConfig(DjangoSuitConfig):
    layout = 'vertical'

image

@gamesbook

Very happy to see "Return of the Left Menu". Will the location of the little icons (between the title and the menu itself) be repositionable? In the current version, the menu starts directly below top name; and we need as much vertical space as possible.

@ganmedia

Great news, but where should I place apps.py to override SuitConfig?

@darklow
Owner
darklow commented Nov 14, 2016

@ganmedia You can put apps.py anywhere you want, but by Django documentation it should be in your main project main app directory.

This is the new way of configuring 3rd party apps which was introduced in Django 1.7 already:
https://docs.djangoproject.com/en/1.10/ref/applications/

See example in demo/demo app:
https://github.com/darklow/django-suit/blob/v2/demo/demo/apps.py
https://github.com/darklow/django-suit/blob/v2/demo/demo/settings.py#L39

@darklow
Owner
darklow commented Nov 14, 2016

@gamesbook Currently both horizontal and vertical layouts use same template and CSS is what puts them left or top. To manipulate position of .header .user-tools template you could override base-site.html although not too much places elsewhere where you could put them. I really didn't wanted to introduce another header inside center column as it was in v1.
Another option is - you can just override CSS and make these icons position: absolute and move them to the bottom of the left column, would that work to you?

@gamesbook

@darklow I think bottom of the menu (left column) would be fine; but I
should also get feedback from some of the users.

On 14 November 2016 at 12:14, Kaspars Sprogis notifications@github.com
wrote:

@gamesbook https://github.com/gamesbook Currently both horizontal and
vertical layouts use same template and CSS is what puts them left or top.
To manipulate position of .header .user-tools template you could override
base-site.html although not too much places elsewhere where you could put
them. I really didn't wanted to introduce another header inside center
column as it was in v1.
Another option is - you can just override CSS and make these icons
position: absolute and move them to the bottom of the left column, would
that work to you?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#475 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAVm6-28fMe-rPjxzjSNaJTDJiyYOBByks5q-DR8gaJpZM4HP7vt
.

@heathernicoale

@darklow - this is shaping up great so far! :) Question though - I followed the uninstall, install instructions, however the vertical menu isn't display even after restarting the server. Any ideas what may cause it to not display? It's also been added to the SuitConfig.

@ganmedia

@heathernicoale In settings.py add this line to INSTALLED_APPS:
'django_project.apps.SuitConfig'

Then add a file called apps.py in the root of your project directory (same where settings.py is) and add this:

from suit.apps import DjangoSuitConfig
class SuitConfig(DjangoSuitConfig):
    layout = 'vertical'
@heathernicoale

@ganmedia Hey! :) Thanks for the response! I have done this. I had my menu already configured and set up. so all of the parent / child items are in place already. Everything is there, the apps.py, DjangoSuitConfig, InstalledApps, etc...

@darklow
Owner
darklow commented Nov 15, 2016 edited

@heathernicolae read carefully my commet, v2 vertical is on another branch: #475 (comment)

@Nofcale
Nofcale commented Nov 15, 2016

Hi @darklow is really great the job you have done. I have been using suit v2 for almost 4 months and it has been outstanding. I was expecting the left menu and now I will wait the responsiveness feature. I want to use it in a recent project I am working on. Just wanted to thank you.

@AliPolat
AliPolat commented Nov 18, 2016 edited

Thank you for this beautiful admin interface.

I couldn't make work 'show_change_link' option of InlineModelAdmin .

@darklow
Owner
darklow commented Nov 23, 2016 edited

@AliPolat just fixed in e997f71 #553
Now there is global config form_inlines_hide_original = False for SuitConfig configuration class which may be overridden per individual Inlines as suit_form_inlines_hide_original = True
Demo with show_change_link: http://v2.djangosuit.com/admin/demo/continent/7/change/

@AliPolat

Thank you, It has very nice appearance...

@heathernicoale

@darklow - absolutely LOVE Django Suit V2 - your development has significantly progressed our own development on our company's project.

Question - have you considered adding 'Print' actions or ability in Django Suit V2? I'm surprised this isn't already included in Django Admin anyhow. Working on creating a custom one for our project. But it made me think to ask. :) Keep up the great work!

@darklow
Owner
darklow commented Dec 11, 2016 edited

@heathernicoale Thanks, glad you like v2 and it helps you so much.
I don't think many users need visible Print actions and print actions are always available from browser menus.
However having print styles (hiding redundant menus) to improve printing of lists and forms is a good idea. I'll add it to the feature list.

@darklow
Owner
darklow commented Dec 11, 2016

v2-vertical branch has been merged into v2.

@darklow
Owner
darklow commented Dec 11, 2016 edited

@gamesbook Is Django 1.8 support really so necessary for you?
I keep fighting issues with Django 1.8 and circular imports because of outdated template loaders, which were fixed and rewritten in Django 1.9. Keep spending time, which could be spent on moving forward with v2 :/

@gamesbook

@darklow At this rate (no official release of v2 as yet), we can delay upgrading until April 2017, which is when Django 1.11LTS comes out. Can I assume Suit will be supported in that release?

@darklow
Owner
darklow commented Dec 11, 2016 edited

@gamesbook I was thinking more of - are you really considering moving your existing clients who uses Django 1.8 to suit v2 as v1 and v2 are not exactly compatible, some config and other changes will be required. So maybe my work for 1.8 is really redundant.

I will try my best to release v2 this year. Instead, today I spent 4 hours just trying to deal with Django 1.8 compatibility and still haven't found good solution that nicely would work for 1.8 and 1.9/1.10. I really don't want to use some custom extends template tag for all suit templates to fix circular imports for Django 1.8.

Django 1.11 will be supported and for future I was thinking of keeping up supporting 3 versions of Django with one version of suit.

@kcolton
kcolton commented Dec 12, 2016

@gamesbook This is going to come across rude, but it comes entirely from my own history of mistakes (as i've gotten stuck in dependency hell and fallen behind on being able to upgrade important frameworks and know its also often completely out of ones control).

Without knowing anything about your situation, FWIW if you are stuck on 1.8, Django Admin being BS4 should probably not be high on the priority list. If you need Bootstrap, I would actually recommend the no longer maintained BS3 branch of suit. We used it in production for quite a while and it worked basically fine.

IMNHO I think BS4 itself is suffering from it's own "backwards compatability" issues. By the time they get to an RC, flexbox will be so universally supported it wont matter that it has table support.

BS3 was a big step forward in that it just said screw it, * { box-sizing: content-box; } and any of the poor souls who needed to support older IE was "stuck" with a still perfectly usable BS2.

1.8 is was labeled LTS, and they have a duty to support that, but third party packages don't have the same support ecosystem and you can always pin older versions of packages.

Unfortunately, pip is not so magical to work the other way around, otherwise @darklow could just pip install django-suit==2.0.0 and there would be no problem. 😆

@heathernicoale

@darklow - thanks! Great idea! :) I had just been reading up on print styles last week. The only reason I had been looking into print options (or actions for that matter) was because we have so many rows of data. We can set up filters, but it still exceeds the visible print view and the pagination is also playing a factor in that as well. I was trying to add a print action / function to print ALL the rows in a dataset (even if it's not all visible in the browser window) -based on the filters or ordering set. Of course there may be another way to do this - I'm still a bit of a rookie. Thanks!

@gamesbook

Our plan was to upgrade to 1.8LTS, but we need to keep using Django Suit (everyone we show it to reacts very well to the "look and feel") so I was waiting for v2 to support it before running any upgrades. A DSv2/ Django1.11(LTS) is just as valid from our point of view. The only issues might be - as @kcolton points out - other third party packages; but I am hoping they will also move to support 1.11, otherwise we will be forced to use a 1.9 or 1.10 in the interim.

I'd rather vote for an earlier release of v2 without 1.8 support than see it delayed (assuming my vote counts for anything).

@chris-erickson

We have a lot of 1.8 LTS sites (and will until 1.11) so I would love to see 1.8 well supported. That said, I can appreciate the difficulty doing so, and desire to get better prepared for the next LTS first. We're I to vote, it would probably be to defer 1.8 support, so that the community as a while is better served - v1 works just fine for now.

@darklow
Owner
darklow commented Dec 22, 2016

@gamesbook @chris-erickson @kcolton Thank you for your feedback on Django 1.8. Since it was broke and I wasn't able to fix it, I am removing partial Django 1.8 support for now and will try one more time when v2 is finished.

@darklow
Owner
darklow commented Dec 22, 2016 edited

Current login form seemed little too geeky and was bothering me for a long time. Because first impression is important and login form is the first thing that your (and my) clients see, I did some work on it. Live demo: http://v2.djangosuit.com/admin/
PS. Graphic is included only on demo, by default there is none. Example how to add one is here: https://github.com/darklow/django-suit/blob/v2/demo/demo/templates/admin/login.html#L4
image
vs old:
image

@SalahAdDin

New login is better.

@darklow
Owner
darklow commented Dec 29, 2016 edited

@gamesbook @kcolton and others. What are 3rd party packages you definitely require to work with Django Suit v2?

I would like to test them out first, how well they work out of the box, before releasing first v2 alpha. My intention from the very beginning was override as less templates as possible and use CSS/JS as first solution. This approach should allow other 3rd party packages to be supported without extra packages or too much work.

@raratiru

Thank you for this great effort.

I would like to mention an old issue ( #367 ) regarding HiddenInput widget just to make sure that it will be fixed.

A very useful app, that I hope it will succeed in staying current and up-to-date, is django-leaflet.

@hebijiandai

Excellent!

@darklow
Owner
darklow commented Jan 2, 2017 edited

If you are using v2 and suit_row_attributes() be aware of backwards incompatible change:
ea9731b

request is now always passed to suit_row_attributes(self, obj, request) as second argument. Previously to keep BC in v1 argspec was used to determine if request is defined in args. Time to drop that in v2.

class MyAdmin(ModelAdmin):
    # ...
    def suit_row_attributes(self, obj, request):
        return {'class': 'type-%s' % obj.type}
@a-trost
a-trost commented Jan 6, 2017

Been loving this update. Is there a way to change the "Suit Admin" header at the top left to an image instead?

@darklow
Owner
darklow commented Jan 6, 2017 edited

@a-trost Sure, extend or replace {% block branding %} in your base_site.html file.
https://github.com/darklow/django-suit/blob/v2/suit/templates/admin/base.html#L15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment