Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update V2 with bootstrap 4.5.x, bug corrected on horizontal filters, upgrade django version and more #774

Open
wants to merge 60 commits into
base: v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d7ec7a2
close #768 : On my side with these modifications, the demo can run wi…
Nov 11, 2020
2011b2c
Upgrade node dependencies and gulp script
Nov 11, 2020
9326e51
Upgrade bootstrap alpha6
Nov 11, 2020
1717af9
Set 12px for regular font-size
Nov 11, 2020
6131a4a
Revert "Set 12px for regular font-size"
Nov 11, 2020
6d6c74d
prepare for migration to django 2 and bootstrap future upgrade
Nov 12, 2020
058276a
Bootstrap v4.0.0 (#1)
pulse-mind Nov 14, 2020
6da87ad
migrate to bootstrap v4.1
Nov 14, 2020
167dfa0
migrate to bootstrap v4.1
Nov 14, 2020
a9f017d
Merge remote-tracking branch 'origin/v2' into v2
Nov 14, 2020
f68eda8
migrate to bootstrap v4.1
Nov 14, 2020
8286ae5
migrate to bootstrap v4.1.3
Nov 14, 2020
223d65b
migrate to bootstrap v4.2.1
Nov 14, 2020
dec32eb
migrate to bootstrap v4.3.1
Nov 14, 2020
2a06d3e
migrate to bootstrap v4.4.1
Nov 14, 2020
4e62e22
migrate to bootstrap v4.5.0
Nov 14, 2020
c192b74
migrate to bootstrap v4.5.0 (#2)
pulse-mind Nov 14, 2020
d622c33
migrate to bootstrap v4.5.3
Nov 15, 2020
70db6a5
migrate to django 2.2.x
Nov 15, 2020
91b50c5
Reduce size 14px to 13px and h2 - h5
Nov 16, 2020
e6d6c7a
Addlink button (#3)
pulse-mind Nov 17, 2020
113547b
Update djangosuit version
Nov 17, 2020
98fdae8
Migrate to Django3.0.x (#4)
pulse-mind Nov 18, 2020
d35bf27
Update django suit version
Nov 18, 2020
fe4dbb8
Merge remote-tracking branch 'origin/v2' into v2
Nov 18, 2020
3406a42
Migration to Django 3.1.x (#5)
pulse-mind Nov 19, 2020
d92b2c0
Django31 (#6)
pulse-mind Nov 19, 2020
7dbe970
Migrate to Django3.1 (#7)
pulse-mind Nov 24, 2020
8319ac8
Migrate to Django 3.2 (#8)
pulse-mind Apr 14, 2021
4cc3953
Override content_subtitle that was introduce in django 3.2 and not di…
May 13, 2021
39fadd1
Update some dependencies
Aug 1, 2021
0e7682d
Element content-wrap is required for delete template (#10)
mireq Dec 22, 2021
f287207
upgrade to boostrap 4.6.1 (#11)
pulse-mind Dec 22, 2021
4f94d41
Fixed deprecated JQuery selector in sortables
Dec 22, 2021
8a4fda6
Upgrade node dependencies : including sass
Dec 23, 2021
aff2685
Upgrade to bootstrap 5
Dec 23, 2021
c02a47c
restore the background color of the inputs after bootstrap5 upgrade
Dec 24, 2021
4855329
restore media-breakpoint-down after bootstrap5 upgrade:
Dec 24, 2021
2586ead
restore text-muted after bootstrap5 upgrade for text-help messages
Dec 24, 2021
1ea02bd
Upgrade to bootstrap5 : .custom-select is now .form-select.
Dec 24, 2021
61e9e26
Upgrade to bootstrap5 : add bootstrap utilities for text-mute and d-n…
Dec 24, 2021
9e1e838
Upgrade to bootstrap5 : added background-color for results row
Dec 24, 2021
a6ab59d
added a table and a model in custom view
Dec 25, 2021
13664ea
Added suit.css for debug and min version
Dec 26, 2021
e869861
Bug corrected when displaying the addlink. It was working for admin b…
Dec 27, 2021
65732c3
Added the possibility to add url params in the menu
Dec 28, 2021
8be84eb
Add github workflow instead of travis.ci (#12)
pulse-mind Dec 29, 2021
4f0a585
heroku deploy (#14)
pulse-mind Dec 29, 2021
1188f17
Django 4.0 (#15)
pulse-mind Jan 25, 2022
627a8a7
Update readme to add Django 4
Jan 25, 2022
b2ac397
Added pypi build
Jan 25, 2022
37666c6
Added pypi build in readme
Jan 27, 2022
b29ae3e
Change default action top behavior (#16)
pulse-mind Mar 17, 2022
24c9f8b
Upgrade package dependencies
Mar 19, 2022
bd4fbad
Improvements on calendarbox and clockbox to display then with a highe…
Apr 21, 2022
21292b1
Update django version in github workflow
Apr 21, 2022
d95230e
Remove comment in js
Apr 22, 2022
23ddb7a
Bump version
Apr 22, 2022
b40ed96
Django42 (#17)
pulse-mind Feb 12, 2024
f00d692
upgrade requirements
pulse-mind Feb 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: django-suit

on: [push]

jobs:
test:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.9', '3.10.13' ]
django-version: [ '3.2.10', '4.0.10', '4.1.13', '4.2.9' ]
exclude:
- os: macos-latest
python-version: '3.8'
- os: windows-latest
python-version: '3.6'

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install Django==${{ matrix.django-version }}
- name: Run Tests
run: |
python manage.py test suit --settings=suit.tests.settings
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ docs/_build/
/bower_components/
/node_modules/
/env/
/package-lock.json
/.pypirc
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: mkdir -p demo/demo/static && python demo/manage.py collectstatic && python demo/manage.py runserver 0.0.0.0:$PORT
46 changes: 14 additions & 32 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,36 @@ Django Suit

Django Suit is alternative theme/skin/extension for `Django <http://www.djangoproject.com>`_ administration interface.

* Project home: http://djangosuit.com/
* Live demo v1: http://djangosuit.com/admin/
* Live demo v2.0 alpha 1: http://v2.djangosuit.com/admin/
v2 version is working with Django 3.2 and Django 4.0, it is using Bootstrap 5.1

* Project home: http://djangosuit.com/ (not maintained)


License
=======

(not maintained)
* Django Suit is licensed under `Creative Commons Attribution-NonCommercial 3.0 <http://creativecommons.org/licenses/by-nc/3.0/>`_ license.
* Licence and pricing: http://djangosuit.com/pricing/


Docs & Support
==============

* Documentation v2: http://django-suit.readthedocs.org/en/v2/
* Documentation v1: http://django-suit.readthedocs.org/en/latest/
* Support: http://djangosuit.com/support/
* Follow `on Twitter <http://twitter.com/DjangoSuit>`_ to get latest news

* Documentation v2: http://django-suit.readthedocs.org/en/v2/ (not maintained)
* Support: http://djangosuit.com/support/ (not maintained)

Changelog
=========

**Note:** Django Suit v2.0 is in active development and not yet ready for production use.

Read more here: Todo: Add issue refernce
Read more here: Todo: Add issue reference

Install
=========
Install Django Suit v2 using ``pip`` or ``easy_install``::

pip install django-suit-v2-pm


Contributing
Expand All @@ -44,25 +47,4 @@ See `Contributing documentation <http://django-suit.readthedocs.org/en/v2/contri
Build Status
============

Django Suit uses Travis CI to perform tests on different Django and Python versions.

Tested using Python: 2.7-3.4 and PyPy. Django: 1.9+ and Django Suit v2.0 alpha:

.. |v2| image:: https://travis-ci.org/darklow/django-suit.png?branch=v2
:alt: Build Status - v2 branch
:target: http://travis-ci.org/darklow/django-suit

.. |develop| image:: https://travis-ci.org/darklow/django-suit.png?branch=develop
:alt: Build Status - develop branch
:target: http://travis-ci.org/darklow/django-suit

|v2| |develop|


Preview
=======


.. image:: https://cloud.githubusercontent.com/assets/445304/12699480/3eee898e-c7c5-11e5-931c-ba1b0cabdecb.png
:alt: Django Suit Preview
:target: http://v2.djangosuit.com/admin/
Tested using Python: 3.8 and PyPy + Django: 3.2 (LTS), Django 4.0, Django 4.1, Django 4.2 (LTS)
19 changes: 0 additions & 19 deletions bower.json

This file was deleted.

Binary file modified demo/db.sqlite3
Binary file not shown.
35 changes: 26 additions & 9 deletions demo/demo/admin.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from django.conf import settings
from django.conf.urls import url
from django.contrib import admin
from django.forms import ModelForm, Select, TextInput, NumberInput
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib import messages
from django.shortcuts import redirect
from django.urls import re_path
from django_select2.forms import ModelSelect2Widget
from suit import apps

Expand Down Expand Up @@ -46,9 +43,9 @@ class Meta:
attrs={'placeholder': 'Country area'}),
'population': EnclosedInput(
prepend='fa-users',
append='<button class="btn btn-secondary" type="button" '
'onclick="window.open(\'https://www.google.com/\')">Search</button>',
append_class='btn', attrs={'placeholder': 'Human population'}),
append='Search',
onclick_append="window.open(\'https://www.google.com/\')",
append_class='addon', attrs={'placeholder': 'Human population' }),
'description': AutosizedTextarea,
'architecture': AutosizedTextarea,
}
Expand All @@ -66,7 +63,7 @@ class PopulationFilter(IsNullFieldListFilter):
class CountryAdmin(RelatedFieldAdmin):
form = CountryForm
search_fields = ('name', 'code')
list_display = ('name', 'code', 'link_to_continent', 'independence_day')
list_display = ('name', 'code', 'independence_day')
list_filter = ('continent', 'independence_day', 'code', ('population', PopulationFilter))
suit_list_filter_horizontal = ('code', 'population')
list_select_related = True
Expand Down Expand Up @@ -314,7 +311,7 @@ def get_urls(self):
"""
urls = super(ShowcaseAdmin, self).get_urls()
my_urls = [
url(r'^(\d+)/clickme/$', showcase_custom_view_example, name='demo_showcase_clickme')
re_path(r'^(\d+)/clickme/$', showcase_custom_view_example, name='demo_showcase_clickme')
]
return my_urls + urls

Expand All @@ -327,3 +324,23 @@ def showcase_custom_view_example(request, pk):
messages.success(request, 'Something legendary was done to "%s"' % instance)

return redirect('admin:demo_showcase_change', pk)

#
# class LargeFilterHorizontalForm(ModelForm):
# class Meta:
# pass
#
#
# @admin.register(LargeFilterHorizontal)
# class LargeFilterHorizontalAdmin(RelatedFieldAdmin):
# form = LargeFilterHorizontalForm
# search_fields = ('title',)
# list_display = ('horizontal_choices1', 'horizontal_choices2', 'horizontal_choices3', 'horizontal_choices4',)
# list_filter = ('horizontal_choices1', 'horizontal_choices2', 'horizontal_choices3', 'horizontal_choices4',
# 'horizontal_choices5', 'horizontal_choices6', 'horizontal_choices7', 'horizontal_choices8')
# suit_list_filter_horizontal = list_filter
#
# fieldsets = [
# ('Main', {'fields': ['horizontal_choices1', 'horizontal_choices2', 'horizontal_choices3', 'horizontal_choices4',
# 'horizontal_choices5', 'horizontal_choices6', 'horizontal_choices7', 'horizontal_choices8']}),
# ]
2 changes: 1 addition & 1 deletion demo/demo/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class SuitConfig(DjangoSuitConfig):
menu = (
ParentItem('Content', children=[
ChildItem(model='demo.country'),
ChildItem(model='demo.country', params={'o': '1.2'}),
ChildItem(model='demo.continent'),
ChildItem(model='demo.showcase'),
ChildItem('Custom view', url='/admin/custom/'),
Expand Down
94 changes: 94 additions & 0 deletions demo/demo/migrations/0013_auto_20201112_1223.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Generated by Django 2.1.15 on 2020-11-12 11:23

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('demo', '0012_auto_20170407_1131'),
]

operations = [
migrations.AlterField(
model_name='book',
name='rating',
field=models.SmallIntegerField(choices=[(1, 'Awesome'), (2, 'Good'), (3, 'Normal'), (4, 'Bad')], help_text='Choose wisely'),
),
migrations.AlterField(
model_name='country',
name='code',
field=models.CharField(help_text='ISO 3166-1 alpha-2 - two character country code', max_length=2),
),
migrations.AlterField(
model_name='country',
name='description',
field=models.TextField(blank=True, help_text='Try and enter few some more lines'),
),
migrations.AlterField(
model_name='movie',
name='rating',
field=models.SmallIntegerField(choices=[(1, 'Awesome'), (2, 'Good'), (3, 'Normal'), (4, 'Bad')], default=2),
),
migrations.AlterField(
model_name='showcase',
name='boolean_with_help',
field=models.BooleanField(default=False, help_text='Boolean field with help text'),
),
migrations.AlterField(
model_name='showcase',
name='choices',
field=models.SmallIntegerField(choices=[(1, 'Tall'), (2, 'Normal'), (3, 'Short')], default=3, help_text='Help text'),
),
migrations.AlterField(
model_name='showcase',
name='country',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='demo.Country'),
),
migrations.AlterField(
model_name='showcase',
name='country2',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='showcase_country2_set', to='demo.Country', verbose_name='Django Select 2'),
),
migrations.AlterField(
model_name='showcase',
name='help_text',
field=models.CharField(help_text='Enter fully qualified name', max_length=64),
),
migrations.AlterField(
model_name='showcase',
name='horizontal_choices',
field=models.SmallIntegerField(choices=[(1, 'Awesome'), (2, 'Good'), (3, 'Normal'), (4, 'Bad')], default=1, help_text='Horizontal choices look like this'),
),
migrations.AlterField(
model_name='showcase',
name='multiple_in_row',
field=models.CharField(help_text='Help text for multiple', max_length=64),
),
migrations.AlterField(
model_name='showcase',
name='raw_id_field',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='showcase_raw_set', to='demo.Country'),
),
migrations.AlterField(
model_name='showcase',
name='readonly_field',
field=models.CharField(default='Some value here', max_length=127),
),
migrations.AlterField(
model_name='showcase',
name='textfield',
field=models.TextField(blank=True, help_text='Try and enter few some more lines', verbose_name='Autosized textfield'),
),
migrations.AlterField(
model_name='showcase',
name='time_only',
field=models.TimeField(blank=True, null=True, verbose_name='Time'),
),
migrations.AlterField(
model_name='showcase',
name='vertical_choices',
field=models.SmallIntegerField(choices=[(1, 'Hot'), (2, 'Normal'), (3, 'Cold')], default=2, help_text='Some help on vertical choices'),
),
]
Loading