Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d46dfafc2 | |||
| 3f076578bb | |||
| cc4c379465 | |||
| c9f0795a95 | |||
| 042e93a84b | |||
| c9e800b5ab | |||
| 7257fbffb3 | |||
| 1f690978bf | |||
| 3d9cfd134d | |||
| 017f905330 |
@@ -0,0 +1,29 @@
|
||||
name: Create release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*.*.*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Extract release notes
|
||||
id: extract-release-notes
|
||||
uses: ffurrer2/extract-release-notes@v1
|
||||
|
||||
- name: Create release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
body: ${{ steps.extract-release-notes.outputs.release_notes }}
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Python package
|
||||
name: Test package
|
||||
|
||||
on:
|
||||
- push
|
||||
@@ -24,18 +24,24 @@ jobs:
|
||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install psycopg2 prerequisites
|
||||
run: sudo apt-get install libpq-dev
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install -r requirements-test.txt
|
||||
pip install tox tox-gh-actions
|
||||
|
||||
- name: Test with tox
|
||||
run: tox
|
||||
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.18.4](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.4) - 2022-01-05
|
||||
- Added official django 4.0 support.
|
||||
- Added link to admin home page on logo and title. #147
|
||||
- Fixed collapsed inlines rounded bottom borders.
|
||||
- Fixed missing comma in tests settings `MIDDLEWARE_CLASSES`. #145
|
||||
|
||||
## [0.18.3](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.3) - 2021-12-07
|
||||
- Added official python 3.10 support.
|
||||
- Replaced travis with GitHub action workflow. #142
|
||||
|
||||
@@ -18,6 +18,8 @@ django-admin-interface is a modern **responsive flat admin interface customizabl
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
- Beautiful default **django-theme**
|
||||
- Themes management and customization *(you can **customize admin title, logo and colors**)*
|
||||
@@ -37,6 +39,8 @@ django-admin-interface is a modern **responsive flat admin interface customizabl
|
||||
- `django-tabbed-admin`
|
||||
- `sorl-thumbnail`
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
- Run `pip install django-admin-interface`
|
||||
- Add `admin_interface`, `flat_responsive`, `flat` and `colorfield` to `settings.INSTALLED_APPS` **before** `django.contrib.admin`
|
||||
@@ -66,6 +70,8 @@ SILENCED_SYSTEM_CHECKS = ['security.W019']
|
||||
- Run ``python manage.py collectstatic --clear``
|
||||
- Restart your application server
|
||||
|
||||
---
|
||||
|
||||
## Optional themes
|
||||
This package ships with optional themes as fixtures, they can be installed using the [loaddata admin command](https://docs.djangoproject.com/en/1.11/ref/django-admin/#django-admin-loaddata). Optional themes are activated on installation.
|
||||
|
||||
@@ -120,6 +126,7 @@ You can add **theme support to existing third-party libraries** using the follow
|
||||
- `--admin-interface-related-modal-background-color`
|
||||
- `--admin-interface-related-modal-background-opacity`
|
||||
|
||||
---
|
||||
|
||||
## Screenshots
|
||||
###### Admin login
|
||||
@@ -134,11 +141,50 @@ You can add **theme support to existing third-party libraries** using the follow
|
||||
###### Admin theme customization
|
||||

|
||||
|
||||
---
|
||||
|
||||
## FAQ
|
||||
- #### I already have a custom `base_site.html`, how can I make it work?
|
||||
|
||||
### Custom `base-site.html`
|
||||
> I already have a custom `base_site.html`, how can I make it work?
|
||||
|
||||
You can use [django-apptemplates](https://github.com/bittner/django-apptemplates), then add `{% extends "admin_interface:admin/base_site.html" %}` to your `base_site.html`
|
||||
|
||||
### Language Chooser not showing
|
||||
> I have enabled the **Language Chooser**, but it is not visible in the admin, what should I do?
|
||||
|
||||
You must configure multilanguage `settings` and `urls` correctly:
|
||||
```python
|
||||
LANGUAGES = (
|
||||
('en', _('English')),
|
||||
('it', _('Italiano')),
|
||||
('fr', _('Française')),
|
||||
# more than one language is expected here
|
||||
)
|
||||
LANGUAGE_CODE = 'en'
|
||||
USE_I18N = True
|
||||
MIDDLEWARE = [
|
||||
# ...
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
# ...
|
||||
]
|
||||
```
|
||||
|
||||
```python
|
||||
from django.conf.urls.i18n import i18n_patterns
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
|
||||
# ...
|
||||
|
||||
urlpatterns = [
|
||||
path('i18n/', include('django.conf.urls.i18n')),
|
||||
]
|
||||
urlpatterns += i18n_patterns(path('admin/', admin.site.urls))
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# create python virtual environment
|
||||
@@ -162,22 +208,13 @@ python setup.py test
|
||||
python -m django test --settings "tests.settings"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
Released under [MIT License](LICENSE.txt).
|
||||
|
||||
---
|
||||
|
||||
## Supporting
|
||||
|
||||
I would like to spend more time on this project, especially to improve it and adding new features.
|
||||
|
||||
As everyone knows open-source projects takes up a lot of time that is unpaid. :money_with_wings:
|
||||
|
||||
If you are using this package in commercial project(s), please consider the idea to become a sponsor or donating once:
|
||||
|
||||
- [GitHub Sponsor](https://github.com/sponsors/fabiocaccamo)
|
||||
- [PayPal](https://www.paypal.me/fabiocaccamo)
|
||||
|
||||
## See also
|
||||
|
||||
- [`django-colorfield`](https://github.com/fabiocaccamo/django-colorfield) - simple color field for models with a nice color-picker in the admin. 🎨
|
||||
|
||||
@@ -66,6 +66,7 @@ flat-theme admin-interface
|
||||
{% block branding %}
|
||||
{% get_admin_interface_theme as theme %}
|
||||
<h1 id="site-name">
|
||||
<a href="{% url 'admin:index' %}">
|
||||
{% if theme.logo_visible %}
|
||||
{% if theme.logo %}
|
||||
<img class="logo" style="display:none;" src="{{ theme.logo.url }}" {% if theme.logo.width %}width="{{ theme.logo.width }}"{% endif %} {% if theme.logo.height %}height="{{ theme.logo.height }}"{% endif %}>
|
||||
@@ -76,6 +77,7 @@ flat-theme admin-interface
|
||||
{% if theme.title_visible %}
|
||||
<span>{% if theme.title %}{% trans theme.title %}{% else %}{{ site_header|default:_('Django administration') }}{% endif %}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -137,6 +137,10 @@
|
||||
color: {{ theme.title_color }};
|
||||
}
|
||||
|
||||
.admin-interface #branding h1 a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.admin-interface #branding h1 .logo.default {
|
||||
background-color: transparent;
|
||||
background-repeat: no-repeat;
|
||||
@@ -431,6 +435,14 @@
|
||||
border-bottom-right-radius:0;
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
.admin-interface .module.collapse.collapsed h2 {
|
||||
/* fix collapsed inlines rounded bottom borders */
|
||||
{% if theme.css_module_rounded_corners %}
|
||||
border-bottom-left-radius:4px;
|
||||
border-bottom-right-radius:4px;
|
||||
{% endif %}
|
||||
}
|
||||
/* end fix */
|
||||
|
||||
.admin-interface #content-related {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
__version__ = '0.18.3'
|
||||
__version__ = '0.18.4'
|
||||
|
||||
@@ -56,6 +56,7 @@ setup(
|
||||
'Framework :: Django :: 3.0',
|
||||
'Framework :: Django :: 3.1',
|
||||
'Framework :: Django :: 3.2',
|
||||
'Framework :: Django :: 4.0',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Natural Language :: English',
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ INSTALLED_APPS += [
|
||||
if django.VERSION < (2, 0):
|
||||
MIDDLEWARE_CLASSES = [
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware'
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
]
|
||||
|
||||
@@ -5,7 +5,7 @@ envlist =
|
||||
py37-{dj20,dj21,dj22,dj30,dj31,dj32}-{sqlite,postgres},
|
||||
py38-{dj22,dj30,dj31,dj32}-{sqlite,postgres},
|
||||
py39-{dj22,dj30,dj31,dj32}-{sqlite,postgres},
|
||||
py310-{dj32}-{sqlite,postgres},
|
||||
py310-{dj32,dj40}-{sqlite,postgres},
|
||||
|
||||
[gh-actions]
|
||||
python =
|
||||
@@ -30,6 +30,7 @@ deps =
|
||||
dj30: Django == 3.0.*
|
||||
dj31: Django == 3.1.*
|
||||
dj32: Django == 3.2.*
|
||||
dj40: Django == 4.0.*
|
||||
# mysql: mysqlclient
|
||||
postgres: psycopg2-binary
|
||||
coverage
|
||||
|
||||
Reference in New Issue
Block a user