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

Django Suit version 2.0 #475

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

Comments

Projects
None yet
@darklow
Owner

darklow commented Jan 31, 2016

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:
    • "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

This comment has been minimized.

Show comment
Hide comment
@chris-erickson

chris-erickson Jan 31, 2016

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.

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

This comment has been minimized.

Show comment
Hide comment
@fyaconiello

fyaconiello Feb 1, 2016

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.

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

This comment has been minimized.

Show comment
Hide comment
@gamesbook

gamesbook Feb 2, 2016

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

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

This comment has been minimized.

Show comment
Hide comment
@gamesbook

gamesbook Feb 2, 2016

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.

gamesbook commented Feb 2, 2016

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

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Feb 2, 2016

Owner

@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.

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

This comment has been minimized.

Show comment
Hide comment
@SalahAdDin

SalahAdDin Feb 3, 2016

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

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

@gamesbook

This comment has been minimized.

Show comment
Hide comment
@gamesbook

gamesbook Feb 3, 2016

@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 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

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Feb 4, 2016

Owner

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/

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

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Feb 17, 2016

Owner

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

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 comment has been minimized.

Show comment
Hide comment
@nchampsavoir

nchampsavoir Feb 17, 2016

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)
.

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

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Feb 18, 2016

Owner

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.

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

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Feb 18, 2016

Owner

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

image

image

image

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

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/

@platzhersh

This comment has been minimized.

Show comment
Hide comment
@krautnerds

This comment has been minimized.

Show comment
Hide comment

Awesome!

@darklow

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Feb 19, 2016

Owner

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!

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

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Feb 19, 2016

Owner

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 ;)

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

This comment has been minimized.

Show comment
Hide comment

👍

@darklow

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Mar 3, 2016

Owner

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

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

This comment has been minimized.

Show comment
Hide comment
@SalahAdDin

SalahAdDin Mar 3, 2016

👍 I like it man!

👍 I like it man!

@darklow

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Mar 3, 2016

Owner

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

Owner

darklow commented Mar 3, 2016

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

@otondin

This comment has been minimized.

Show comment
Hide comment
@otondin

otondin Mar 3, 2016

It's getting gorgeous! 👍

otondin commented Mar 3, 2016

It's getting gorgeous! 👍

@landaverdelbo

This comment has been minimized.

Show comment
Hide comment
@landaverdelbo

landaverdelbo Mar 4, 2016

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

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

@darklow

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Mar 5, 2016

Owner

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

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 comment has been minimized.

Show comment
Hide comment
@willseward

willseward Mar 9, 2016

This is awesome! Keep up the good work!

This is awesome! Keep up the good work!

@Nekmo

This comment has been minimized.

Show comment
Hide comment
@Nekmo

Nekmo 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)
.

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

This comment has been minimized.

Show comment
Hide comment
@mauriciobaeza

mauriciobaeza Mar 9, 2016

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

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

@SalahAdDin

This comment has been minimized.

Show comment
Hide comment
@SalahAdDin

SalahAdDin Mar 15, 2016

Eh, put a 400 error template please.

Eh, put a 400 error template please.

@oesah

This comment has been minimized.

Show comment
Hide comment
@oesah

oesah Mar 22, 2016

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

oesah commented Mar 22, 2016

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

@lsgd

This comment has been minimized.

Show comment
Hide comment
@lsgd

lsgd Mar 24, 2016

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. :-)

lsgd commented Mar 24, 2016

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

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Mar 24, 2016

Owner

@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.

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

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Mar 24, 2016

Owner

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

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 comment has been minimized.

Show comment
Hide comment
@Sovetnikov

Sovetnikov Mar 24, 2016

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.

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

This comment has been minimized.

Show comment
Hide comment
@gamesbook

gamesbook Mar 25, 2016

@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.

@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.

@darklow

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Jun 30, 2017

Owner

@gamesbook It is quite easy actually, here are some docs (See section Compiling SASS):
https://github.com/darklow/django-suit/blob/v2/docs/contribute.rst

Here are all the base colours defined:
https://github.com/darklow/django-suit/blob/v2/suit/sass/_variables.scss

Owner

darklow commented Jun 30, 2017

@gamesbook It is quite easy actually, here are some docs (See section Compiling SASS):
https://github.com/darklow/django-suit/blob/v2/docs/contribute.rst

Here are all the base colours defined:
https://github.com/darklow/django-suit/blob/v2/suit/sass/_variables.scss

@gamesbook

This comment has been minimized.

Show comment
Hide comment
@gamesbook

gamesbook Jun 30, 2017

@darklow Thanks - should I define my own custom.scss file which overrides some of these and add that file to my project's CSS folder? (PS I also just came across https://atom.io/packages/pigments which looks t be very useful for Atom users)

gamesbook commented Jun 30, 2017

@darklow Thanks - should I define my own custom.scss file which overrides some of these and add that file to my project's CSS folder? (PS I also just came across https://atom.io/packages/pigments which looks t be very useful for Atom users)

@darklow

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Jun 30, 2017

Owner

@gamesbook It is up to you how you want to structure customised version, but end result will still be one suit.css file for you client project, it will be quite hard with overriding by extra css file. If you have more questions about extending v2, let's open separate issue. Thanks.

Owner

darklow commented Jun 30, 2017

@gamesbook It is up to you how you want to structure customised version, but end result will still be one suit.css file for you client project, it will be quite hard with overriding by extra css file. If you have more questions about extending v2, let's open separate issue. Thanks.

@prince-tanapong

This comment has been minimized.

Show comment
Hide comment
@prince-tanapong

prince-tanapong Jun 30, 2017

@darklow Do you have a plan to implement this feature Warning on leaving if unconfirmed changes? I think it is the important one for prevent user exit when they have some changed.

Thanks

@darklow Do you have a plan to implement this feature Warning on leaving if unconfirmed changes? I think it is the important one for prevent user exit when they have some changed.

Thanks

@gamesbook

This comment has been minimized.

Show comment
Hide comment
@madthew

This comment has been minimized.

Show comment
Hide comment
@madthew

madthew Jul 19, 2017

Hey, guys I'm not getting something... I'm defining my config as the following and those models exists but someone the menu don't show up the link... it just shows custom. I don't know what I'm duing wrong.

class SuitConfig(DjangoSuitConfig):
    layout = 'vertical'
    menu = (
        ParentItem('Content', children=[
            ChildItem(model='WebGateway.RuleGroup'),
            ChildItem('Custom view', url='/admin/custom/'),
        ], icon='fa fa-leaf'),
        ParentItem('Integrations', children=[
            ChildItem(model='demo.city'),
        ]),
        ParentItem('Users', children=[
            ChildItem(model='auth.user'),
            ChildItem('User groups', 'auth.group'),
        ], icon='fa fa-users'),
    )

madthew commented Jul 19, 2017

Hey, guys I'm not getting something... I'm defining my config as the following and those models exists but someone the menu don't show up the link... it just shows custom. I don't know what I'm duing wrong.

class SuitConfig(DjangoSuitConfig):
    layout = 'vertical'
    menu = (
        ParentItem('Content', children=[
            ChildItem(model='WebGateway.RuleGroup'),
            ChildItem('Custom view', url='/admin/custom/'),
        ], icon='fa fa-leaf'),
        ParentItem('Integrations', children=[
            ChildItem(model='demo.city'),
        ]),
        ParentItem('Users', children=[
            ChildItem(model='auth.user'),
            ChildItem('User groups', 'auth.group'),
        ], icon='fa fa-users'),
    )
@darklow

This comment has been minimized.

Show comment
Hide comment
@darklow

darklow Jul 19, 2017

Owner

@madthew Please post a separate issue as this is issue to discuss v2 features not specific issues:

  1. When posting issue add content of your settings.py.
  2. Also try horizontal layout and see if it works there. direction in general.
  3. Do you see non of menu items or just some? I see your are using CamelCase for WebGateway.RuleGroup you should use lowercase unless your WebGateway directory is actually called in such way.
Owner

darklow commented Jul 19, 2017

@madthew Please post a separate issue as this is issue to discuss v2 features not specific issues:

  1. When posting issue add content of your settings.py.
  2. Also try horizontal layout and see if it works there. direction in general.
  3. Do you see non of menu items or just some? I see your are using CamelCase for WebGateway.RuleGroup you should use lowercase unless your WebGateway directory is actually called in such way.
@jorenham

This comment has been minimized.

Show comment
Hide comment
@jorenham

jorenham Aug 13, 2017

FYI Bootstrap 4.0.0-beta has been released

FYI Bootstrap 4.0.0-beta has been released

@jturmel

This comment has been minimized.

Show comment
Hide comment
@jturmel

jturmel Aug 15, 2017

Is there any sort of target date for having responsiveness complete? We went ahead and bought a paid license because we enjoy this project, but one of the things we're most needing is v2 in responsive.

jturmel commented Aug 15, 2017

Is there any sort of target date for having responsiveness complete? We went ahead and bought a paid license because we enjoy this project, but one of the things we're most needing is v2 in responsive.

@mhindery

This comment has been minimized.

Show comment
Hide comment
@mhindery

mhindery Sep 9, 2017

The list filters which in the current version show as dropdowns are now shown all in the right column with all options expanded. Will there be a setting to have these as dropdowns on top? From a usability perspective, this change is quite a step backwards when having multiple filters, especially with long lists of choices (e.g. country codes, currencies ...).

mhindery commented Sep 9, 2017

The list filters which in the current version show as dropdowns are now shown all in the right column with all options expanded. Will there be a setting to have these as dropdowns on top? From a usability perspective, this change is quite a step backwards when having multiple filters, especially with long lists of choices (e.g. country codes, currencies ...).

@darklow

This comment has been minimized.

Show comment
Hide comment
@gamesbook

This comment has been minimized.

Show comment
Hide comment
@gamesbook

gamesbook Sep 10, 2017

@darklow It seems a few people missed this feature - perhaps worth adding to the docs (apologies if it is already there).

@darklow It seems a few people missed this feature - perhaps worth adding to the docs (apologies if it is already there).

@ganmedia

This comment has been minimized.

Show comment
Hide comment
@ganmedia

ganmedia Oct 8, 2017

Can I use CKEditorWidget or RedactorWidget in v2?
I tried following the documentation but WYSIWYG editor is not loading.

This is the documentation I used: http://django-suit.readthedocs.io/en/develop/wysiwyg.html

ganmedia commented Oct 8, 2017

Can I use CKEditorWidget or RedactorWidget in v2?
I tried following the documentation but WYSIWYG editor is not loading.

This is the documentation I used: http://django-suit.readthedocs.io/en/develop/wysiwyg.html

@JacoBezuidenhout

This comment has been minimized.

Show comment
Hide comment
@JacoBezuidenhout

JacoBezuidenhout Oct 10, 2017

Hi @ganmedia. I am using django-tinymce in my project that runs on Suit V2. Maybe this helps... in my models.py

from tinymce.models import HTMLField
....
gp_temp = models.CharField(max_length=255, null=True, blank=True)
medical_note = models.TextField(null=True, blank=True)
-- > note = HTMLField(null=True, blank=True)
dependant_code = models.CharField(max_length=2, null=True, blank=True, choices=(
('00', 'Main Member'),
('01', 'Spouse'),
....

Hi @ganmedia. I am using django-tinymce in my project that runs on Suit V2. Maybe this helps... in my models.py

from tinymce.models import HTMLField
....
gp_temp = models.CharField(max_length=255, null=True, blank=True)
medical_note = models.TextField(null=True, blank=True)
-- > note = HTMLField(null=True, blank=True)
dependant_code = models.CharField(max_length=2, null=True, blank=True, choices=(
('00', 'Main Member'),
('01', 'Spouse'),
....

@larryhq

This comment has been minimized.

Show comment
Hide comment
@larryhq

larryhq Nov 21, 2017

Hello, I want ask a question about list_filter and suit_list_filter_horizontal,
when I custom a filter extent SimpleListFilter,like this

from django.contrib.admin.filters import SimpleListFilter

from ..projects.models import Project
from .models import Order


class ProjectFilter(SimpleListFilter):
    title = '所属项目'
    parameter_name = '所属项目'

    def lookups(self, request, model_admin):
        project_list = [item.project_id for item in Order.objects.values('project_id')]
        choices_list = [(0, '----')]
        for project in Project.objects.filter(id__in=project_list):
            choices_list.append((project.id, project.name))
        return choices_list

    def queryset(self, request, queryset):
        qs = Order.objects.filter(parent_id=0, is_active=True)
        if self.value() == 0:
            return qs
        else:
            qs = qs.filter(project_id=self.value())

In my Admin.py

list_filter = ['status', ProjectFilter]
suit_list_filter_horizontal = list_filter

but the project show like this:

I want it show on top like status field, how to.

larryhq commented Nov 21, 2017

Hello, I want ask a question about list_filter and suit_list_filter_horizontal,
when I custom a filter extent SimpleListFilter,like this

from django.contrib.admin.filters import SimpleListFilter

from ..projects.models import Project
from .models import Order


class ProjectFilter(SimpleListFilter):
    title = '所属项目'
    parameter_name = '所属项目'

    def lookups(self, request, model_admin):
        project_list = [item.project_id for item in Order.objects.values('project_id')]
        choices_list = [(0, '----')]
        for project in Project.objects.filter(id__in=project_list):
            choices_list.append((project.id, project.name))
        return choices_list

    def queryset(self, request, queryset):
        qs = Order.objects.filter(parent_id=0, is_active=True)
        if self.value() == 0:
            return qs
        else:
            qs = qs.filter(project_id=self.value())

In my Admin.py

list_filter = ['status', ProjectFilter]
suit_list_filter_horizontal = list_filter

but the project show like this:

I want it show on top like status field, how to.

@Datajuristes

This comment has been minimized.

Show comment
Hide comment
@Datajuristes

Datajuristes Nov 23, 2017

Hi thanks for your work, i love django suit
I juste have a question: why don't you make the django suit admin responsive ? It might be possible with bootstrap

Hi thanks for your work, i love django suit
I juste have a question: why don't you make the django suit admin responsive ? It might be possible with bootstrap

@bskim45

This comment has been minimized.

Show comment
Hide comment

bskim45 commented Nov 24, 2017

@Datajuristes its in TODO list

@larryhq

This comment has been minimized.

Show comment
Hide comment
@larryhq

larryhq Dec 12, 2017

suit2.0 not support django2.0

larryhq commented Dec 12, 2017

suit2.0 not support django2.0

@jrthorne

This comment has been minimized.

Show comment
Hide comment
@jrthorne

jrthorne Dec 15, 2017

The documentation on configuration is pretty sparse. In the end trial and error and following
https://docs.djangoproject.com/en/1.11/ref/contrib/admin/#adminsite-attributes
https://docs.djangoproject.com/en/2.0/ref/applications/

Essentially, you need to have an 'apps.py' file containing the config (my app was called common),

from suit.apps import DjangoSuitConfig
from suit.menu import ParentItem, ChildItem

class SuitConfig(DjangoSuitConfig):
    layout = 'horizontal'
    verbose_name = 'Introtravel Shopping Cart'
    menu = (
        ParentItem('Batch Processes', children=[
            ChildItem('Queued Tasks', url='/backend/common/queuedtask/'),
            ChildItem('Cron Tasks', url='/backend/common/crontask/'),
        ], icon='fa fa-leaf'),
        ParentItem('Money', children=[
            ChildItem('Transactions', url='/backend/products/transaction/'),
            ChildItem('Paypal Records', url='/backend/pro/paypalnvp/'),
            ChildItem('Prices', url='/backend/products/price/')
        ], icon='fa fa-money'),
        ParentItem('Products', children=[
            ChildItem('Bookings', url='/backend/products/booking/'),
            ChildItem('Tours', url='/backend/products/basetour/')
        ],icon='fa fa-flag'),
        ParentItem('Users', children=[
            ChildItem(model='auth.user'),
            ChildItem('User groups', 'auth.group'),
            ChildItem('Guests', url='/backend/common/guest/')
        ], icon='fa fa-users'),
        ParentItem('Right Side Menu', children=[
            ChildItem('Password change', url='admin:password_change'),
            ChildItem('Open Help Doc', url='https://docs.google.com/document/d/1o-_pdaMYLexnyhmBaKsVXp1L_5tq1dSONExPijH09X0/edit', target_blank=True),

        ], align_right=True, icon='fa fa-cog'),
    )

    admin_name = 'Cart'`

Then in your settings. py

INSTALLED_APPS = [...
'common.apps.SuitConfig',...
]

You can't use django.core.urlresolvers.reverse, you can't import any models. This is pretty limiting, and hardwiring urls this way not very pythonic. I guess I am missing something here, but putting the site config in an application's directory makes no sense. I love the look and feel, but the config made more sense when it was int settings.py as a key value pair.

jrthorne commented Dec 15, 2017

The documentation on configuration is pretty sparse. In the end trial and error and following
https://docs.djangoproject.com/en/1.11/ref/contrib/admin/#adminsite-attributes
https://docs.djangoproject.com/en/2.0/ref/applications/

Essentially, you need to have an 'apps.py' file containing the config (my app was called common),

from suit.apps import DjangoSuitConfig
from suit.menu import ParentItem, ChildItem

class SuitConfig(DjangoSuitConfig):
    layout = 'horizontal'
    verbose_name = 'Introtravel Shopping Cart'
    menu = (
        ParentItem('Batch Processes', children=[
            ChildItem('Queued Tasks', url='/backend/common/queuedtask/'),
            ChildItem('Cron Tasks', url='/backend/common/crontask/'),
        ], icon='fa fa-leaf'),
        ParentItem('Money', children=[
            ChildItem('Transactions', url='/backend/products/transaction/'),
            ChildItem('Paypal Records', url='/backend/pro/paypalnvp/'),
            ChildItem('Prices', url='/backend/products/price/')
        ], icon='fa fa-money'),
        ParentItem('Products', children=[
            ChildItem('Bookings', url='/backend/products/booking/'),
            ChildItem('Tours', url='/backend/products/basetour/')
        ],icon='fa fa-flag'),
        ParentItem('Users', children=[
            ChildItem(model='auth.user'),
            ChildItem('User groups', 'auth.group'),
            ChildItem('Guests', url='/backend/common/guest/')
        ], icon='fa fa-users'),
        ParentItem('Right Side Menu', children=[
            ChildItem('Password change', url='admin:password_change'),
            ChildItem('Open Help Doc', url='https://docs.google.com/document/d/1o-_pdaMYLexnyhmBaKsVXp1L_5tq1dSONExPijH09X0/edit', target_blank=True),

        ], align_right=True, icon='fa fa-cog'),
    )

    admin_name = 'Cart'`

Then in your settings. py

INSTALLED_APPS = [...
'common.apps.SuitConfig',...
]

You can't use django.core.urlresolvers.reverse, you can't import any models. This is pretty limiting, and hardwiring urls this way not very pythonic. I guess I am missing something here, but putting the site config in an application's directory makes no sense. I love the look and feel, but the config made more sense when it was int settings.py as a key value pair.

@novelview9

This comment has been minimized.

Show comment
Hide comment
@novelview9

novelview9 Dec 17, 2017

Thanks all about awesome v2 feature!
I wonder fieldsets options full-width on v2

Thanks all about awesome v2 feature!
I wonder fieldsets options full-width on v2

@cometsong

This comment has been minimized.

Show comment
Hide comment
@cometsong

cometsong Dec 18, 2017

@larryhq The suit_list_filter-horizontal uses the parameter_name or field name, not the Filter class name. As shown in issue: #592

@larryhq The suit_list_filter-horizontal uses the parameter_name or field name, not the Filter class name. As shown in issue: #592

@larryhq

This comment has been minimized.

Show comment
Hide comment
@larryhq

larryhq Dec 21, 2017

@cometsong Thank you very much.

larryhq commented Dec 21, 2017

@cometsong Thank you very much.

@wanghepeng1986

This comment has been minimized.

Show comment
Hide comment
@wanghepeng1986

wanghepeng1986 Dec 28, 2017

when can suit2.0 support django2.0 ?

when can suit2.0 support django2.0 ?

@kamilgregorczyk

This comment has been minimized.

Show comment
Hide comment
@kamilgregorczyk

kamilgregorczyk Jan 1, 2018

Yeah, ModuleNotFoundError: No module named 'django.core.urlresolvers' on django 2.0

Yeah, ModuleNotFoundError: No module named 'django.core.urlresolvers' on django 2.0

@Arlington1985

This comment has been minimized.

Show comment
Hide comment
@Arlington1985

Arlington1985 Jan 10, 2018

is it possible to create menu parentitem without childitem?

is it possible to create menu parentitem without childitem?

@larryhq

This comment has been minimized.

Show comment
Hide comment
@larryhq

larryhq Jan 11, 2018

@Arlington1985 use app can without childitem, like this:

ParentItem(_('accounts'), app='accounts', icon='fa fa-user'),

larryhq commented Jan 11, 2018

@Arlington1985 use app can without childitem, like this:

ParentItem(_('accounts'), app='accounts', icon='fa fa-user'),
@larryhq

This comment has been minimized.

Show comment
Hide comment
@larryhq

larryhq Jan 11, 2018

Hi, I'm defining my suit config as the following and those models exists but the second menu don't show, it just shows the first one link. I don't know what I'm duing wrong.

ParentItem(_('yx_order'), children=[ChildItem(model='yx_orders.delivery'),
                                        ChildItem(model='yx_orders.deliveryorder')], icon='fa fa-leaf'),

larryhq commented Jan 11, 2018

Hi, I'm defining my suit config as the following and those models exists but the second menu don't show, it just shows the first one link. I don't know what I'm duing wrong.

ParentItem(_('yx_order'), children=[ChildItem(model='yx_orders.delivery'),
                                        ChildItem(model='yx_orders.deliveryorder')], icon='fa fa-leaf'),
@Arlington1985

This comment has been minimized.

Show comment
Hide comment
@Arlington1985

Arlington1985 Jan 11, 2018

@larryhq, maybe I haven't wrote clearly, but I want to create a menu item without having sub-menu. Your suggestion lists all the models under the app as a submenu accounts app. I would like to show user model only as a standalone menu item, without being a child any parent(accounts) menu

@larryhq, maybe I haven't wrote clearly, but I want to create a menu item without having sub-menu. Your suggestion lists all the models under the app as a submenu accounts app. I would like to show user model only as a standalone menu item, without being a child any parent(accounts) menu

@larryhq

This comment has been minimized.

Show comment
Hide comment
@larryhq

larryhq Jan 12, 2018

@Arlington1985

ParentItem(_('test'), url='/admin/accounts/', icon='fa fa-leaf')

like this?

larryhq commented Jan 12, 2018

@Arlington1985

ParentItem(_('test'), url='/admin/accounts/', icon='fa fa-leaf')

like this?

@Arlington1985

This comment has been minimized.

Show comment
Hide comment
@Arlington1985

Arlington1985 Jan 12, 2018

@larryhq, thanks.
This is what I want. So it's only possible with url.

@larryhq, thanks.
This is what I want. So it's only possible with url.

@larryhq

This comment has been minimized.

Show comment
Hide comment
@larryhq

larryhq Jan 12, 2018

@Arlington1985 You're welcome! 😄

larryhq commented Jan 12, 2018

@Arlington1985 You're welcome! 😄

@larryhq

This comment has been minimized.

Show comment
Hide comment
@larryhq

larryhq Jan 26, 2018

Can I filter queryset from start_time to end_time?

larryhq commented Jan 26, 2018

Can I filter queryset from start_time to end_time?

@george72

This comment has been minimized.

Show comment
Hide comment
@george72

george72 Mar 27, 2018

Any news on the v2 release date? is it fully Django 2.0 compatible? I was able to install it on Django 2.0.3 and it is working fine but have some minor issues and will ask for support but would like to know the status and roadmap.

george72 commented Mar 27, 2018

Any news on the v2 release date? is it fully Django 2.0 compatible? I was able to install it on Django 2.0.3 and it is working fine but have some minor issues and will ask for support but would like to know the status and roadmap.

@SMaciej

This comment has been minimized.

Show comment
Hide comment
@SMaciej

SMaciej Mar 28, 2018

Great to see that you are working on a new version! 👍
Do you considered mobile devices. For now on smartphone resolutions vertical menu covers the content, the horizontal one will take too much space, if there are lots of elements.

SMaciej commented Mar 28, 2018

Great to see that you are working on a new version! 👍
Do you considered mobile devices. For now on smartphone resolutions vertical menu covers the content, the horizontal one will take too much space, if there are lots of elements.

@jdruiter

This comment has been minimized.

Show comment
Hide comment
@jdruiter

jdruiter Apr 11, 2018

Great to see more potential compatability with third party django apps. I do like the previous css better and haven't found any improvement worthy enough to upgrade. It just introduces new problems. I'm sticking with the v1.

jdruiter commented Apr 11, 2018

Great to see more potential compatability with third party django apps. I do like the previous css better and haven't found any improvement worthy enough to upgrade. It just introduces new problems. I'm sticking with the v1.

@eborrell

This comment has been minimized.

Show comment
Hide comment
@eborrell

eborrell Apr 20, 2018

@darklow we are already using v2 on production. The 'LinkedSelect' feature and links to foreign keys and second order foreign keys on the admin list are great. However, we are not able to put the actions on top of the list view.

ModelAdmin.actions_on_top = True

does not work anymore.

@darklow we are already using v2 on production. The 'LinkedSelect' feature and links to foreign keys and second order foreign keys on the admin list are great. However, we are not able to put the actions on top of the list view.

ModelAdmin.actions_on_top = True

does not work anymore.

@wdschn

This comment has been minimized.

Show comment
Hide comment
@wdschn

wdschn Jun 12, 2018

Lost style in your demo.

wdschn commented Jun 12, 2018

Lost style in your demo.

@odwrotnie

This comment has been minimized.

Show comment
Hide comment
@odwrotnie

odwrotnie Jun 14, 2018

What about the Responsiveness and Bootstrap production version?

What about the Responsiveness and Bootstrap production version?

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