djangocms-admin-style


Namedjangocms-admin-style JSON
Version 3.3.1 PyPI version JSON
download
home_pagehttps://github.com/django-cms/djangocms-admin-style
SummaryAdds pretty CSS styles for the django CMS admin interface.
upload_time2024-02-29 22:12:45
maintainerDjango CMS Association and contributors
docs_urlNone
authorDivio AG
requires_python>=3.7
licenseBSD-3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ======================
django CMS Admin Style
======================

|pypi| |python| |django| |djangocms| |djangocms4| |coverage|

Adds pretty CSS styles for the django CMS admin interface. Supports optional
``django-admin-shortcuts`` package.


.. note::

    This project is considered 3rd party (no supervision by the `django CMS Association <https://www.django-cms.org/en/about-us/>`_). Join us on `Slack                 <https://www.django-cms.org/slack/>`_ for more information.

+---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+
| .. image:: https://raw.githubusercontent.com/divio/djangocms-admin-style/master/preview/dashboard.png   | .. image:: https://raw.githubusercontent.com/divio/djangocms-admin-style/master/preview/listview.png   |
+---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+
| .. image:: https://raw.githubusercontent.com/divio/djangocms-admin-style/master/preview/datepicker.png  | .. image:: https://raw.githubusercontent.com/divio/djangocms-admin-style/master/preview/shortcuts.png  |
+---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+

The shortcuts you see on top of the dashboard are from `django-admin-shortcuts <https://github.com/alesdotio/django-admin-shortcuts/>`_

*******************************************
Contribute to this project and win rewards
*******************************************

Because this is a an open-source project, we welcome everyone to
`get involved in the project <https://www.django-cms.org/en/contribute/>`_ and
`receive a reward <https://www.django-cms.org/en/bounty-program/>`_ for their contribution.
Become part of a fantastic community and help us make django CMS the best CMS in the world.

We'll be delighted to receive your
feedback in the form of issues and pull requests. Before submitting your
pull request, please review our `contribution guidelines
<http://docs.django-cms.org/en/latest/contributing/index.html>`_.

We're grateful to all contributors who have helped create and maintain this package.
Contributors are listed at the `contributors <https://github.com/django-cms/djangocms-admin-style/graphs/contributors>`_
section.


Documentation
=============

See ``REQUIREMENTS`` in the `setup.py <https://github.com/divio/djangocms-admin-style/blob/master/setup.py>`_
file for additional dependencies:



Installation
------------

For a manual install:

* run ``pip install djangocms-admin-style``
* add ``djangocms_admin_style`` to your ``INSTALLED_APPS`` just before ``'django.contrib.admin'``
* run ``python manage.py migrate djangocms_admin_style``


Configuration
-------------

The django CMS Admin Style overrides django admin's ``base_site.html``,
but you can still partially customize this page. Look at the source of
``templates/admin/base_site.html`` and override the templates that are included
in various blocks. For example, you can add your own CSS in
``templates/admin/inc/extrastyle.html``.

The following additional settings can be set:

* ``CMS_ENABLE_UPDATE_CHECK = True``
  Set to ``False`` to disable the update notification.
* ``CMS_UPDATE_CHECK_TYPE = ('minor')``
  Set to ``('patch')`` to get only patch notifications.
  (minor = 3.x.x, patch = 3.4.x)

The update checker does not gather or record any data.

To **compile CSS** run the following commands using **node 16**:

* ``nvm use``
* ``npm install``
* ``npx gulp icons sass bundle``


For further options have a look at the ``gulpfile.js``.

Dark mode support
-----------------

Django supports a dark mode admin since version 3.1. djangocms-admin-style
introduces css variables that contain color codes and change with the selected
mode:

+-------------------------------+-----------+---------------------------+-----------+
| **CMS variable name**         | **Color** | **Django admin fallback** | **Color** |
+-------------------------------+-----------+---------------------------+-----------+
| ``--dca-white``               | #ffffff   | ``--body-bg``             | #ffffff   |
+-------------------------------+-----------+---------------------------+-----------+
| ``--dca-black``               | #000000   | ``--body-fg``             | #303030   |
+-------------------------------+-----------+---------------------------+-----------+
| ``--dca-gray``                | #666      | ``--body-quiet-color``    | #666      |
+-------------------------------+-----------+---------------------------+-----------+
| ``--dca-gray-lightest``       | #f2f2f2   | ``--darkened-bg``         | #f8f8f8   |
+-------------------------------+-----------+---------------------------+-----------+
| ``--dca-gray-lighter``        | #ddd      | ``--border-color``        | #ccc      |
+-------------------------------+-----------+---------------------------+-----------+
| ``--dca-gray-light``          | #999      | ``--close-button-bg``     | #888      |
+-------------------------------+-----------+---------------------------+-----------+
| ``--dca-gray-darker``         | #454545   |                           |           |
+-------------------------------+-----------+---------------------------+-----------+
| ``--dca-gray-darkest``        | #333      |                           |           |
+-------------------------------+-----------+---------------------------+-----------+
| ``--dca-gray-super-lightest`` | #f7f7f7   |                           |           |
+-------------------------------+-----------+---------------------------+-----------+
| ``--dca-primary``             | #00bbff   | ``--primary``             | #79aec8   |
+-------------------------------+-----------+---------------------------+-----------+


Extending styles in your own app
---------------------------------

If your project or app requires specific styles if djangocms-admin-style is
installed (e.g., to better adjust to the django CMS style) you can add selective
styling by adding the ``.djangocms-admin-style`` selector::

    // Show widget in CMS colors if djangocms-admin-style is installed
    .djangocms-admin-style #my-widget {
        color:  var(--dca-primary, black);
    }

We recommend to following rules for your app's admin css:

- Try avoid using ``color``, ``background`` etc. styles where possible and meaningful
- If necessary use as few as possible standard django CMS colors (preferably
  from see above list with fallback colors)
- Usage: ``var(--dca-color-var, var(--fallback-color-var, #xxxxxx))`` where
  ``#xxxxxx`` represents the light version of the color.

Running Tests
-------------

You can run tests by executing::

    virtualenv env
    source env/bin/activate
    pip install -r tests/requirements/base.txt
    python setup.py test

In order to run **integration tests** you need to have Docker installed,
then run the following command::

    make test

To test other Django versions simply append `VERSION=4.1``. You can also
run the test server through::

    make run

The integration tests are written using Casperjs, phantomcss and
djangocms-casper-helpers.


.. |pypi| image:: https://badge.fury.io/py/djangocms-admin-style.svg
    :target: http://badge.fury.io/py/djangocms-admin-style
.. |build| image:: https://travis-ci.org/django-cms/djangocms-admin-style.svg?branch=master
    :target: https://travis-ci.org/django-cms/djangocms-admin-style
.. |coverage| image:: https://codecov.io/gh/django-cms/djangocms-admin-style/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/django-cms/djangocms-admin-style

.. |python| image:: https://img.shields.io/badge/python-3.5+-blue.svg
    :target: https://pypi.org/project/djangocms-admin-style/
.. |django| image:: https://img.shields.io/badge/django-2.2%2B-blue.svg
    :target: https://www.djangoproject.com/
.. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.6%2B-blue.svg
    :target: https://www.django-cms.org/
.. |djangocms4| image:: https://img.shields.io/badge/django%20CMS-4-blue.svg
    :target: https://www.django-cms.org/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/django-cms/djangocms-admin-style",
    "name": "djangocms-admin-style",
    "maintainer": "Django CMS Association and contributors",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "info@django-cms.org",
    "keywords": "",
    "author": "Divio AG",
    "author_email": "info@divio.ch",
    "download_url": "https://files.pythonhosted.org/packages/6c/1e/47b2d031c6d8f4ac5394b4b3dc863a8f21fd6d92aadf260ba1fc633b286f/djangocms-admin-style-3.3.1.tar.gz",
    "platform": null,
    "description": "======================\ndjango CMS Admin Style\n======================\n\n|pypi| |python| |django| |djangocms| |djangocms4| |coverage|\n\nAdds pretty CSS styles for the django CMS admin interface. Supports optional\n``django-admin-shortcuts`` package.\n\n\n.. note::\n\n    This project is considered 3rd party (no supervision by the `django CMS Association <https://www.django-cms.org/en/about-us/>`_). Join us on `Slack                 <https://www.django-cms.org/slack/>`_ for more information.\n\n+---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+\n| .. image:: https://raw.githubusercontent.com/divio/djangocms-admin-style/master/preview/dashboard.png   | .. image:: https://raw.githubusercontent.com/divio/djangocms-admin-style/master/preview/listview.png   |\n+---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+\n| .. image:: https://raw.githubusercontent.com/divio/djangocms-admin-style/master/preview/datepicker.png  | .. image:: https://raw.githubusercontent.com/divio/djangocms-admin-style/master/preview/shortcuts.png  |\n+---------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+\n\nThe shortcuts you see on top of the dashboard are from `django-admin-shortcuts <https://github.com/alesdotio/django-admin-shortcuts/>`_\n\n*******************************************\nContribute to this project and win rewards\n*******************************************\n\nBecause this is a an open-source project, we welcome everyone to\n`get involved in the project <https://www.django-cms.org/en/contribute/>`_ and\n`receive a reward <https://www.django-cms.org/en/bounty-program/>`_ for their contribution.\nBecome part of a fantastic community and help us make django CMS the best CMS in the world.\n\nWe'll be delighted to receive your\nfeedback in the form of issues and pull requests. Before submitting your\npull request, please review our `contribution guidelines\n<http://docs.django-cms.org/en/latest/contributing/index.html>`_.\n\nWe're grateful to all contributors who have helped create and maintain this package.\nContributors are listed at the `contributors <https://github.com/django-cms/djangocms-admin-style/graphs/contributors>`_\nsection.\n\n\nDocumentation\n=============\n\nSee ``REQUIREMENTS`` in the `setup.py <https://github.com/divio/djangocms-admin-style/blob/master/setup.py>`_\nfile for additional dependencies:\n\n\n\nInstallation\n------------\n\nFor a manual install:\n\n* run ``pip install djangocms-admin-style``\n* add ``djangocms_admin_style`` to your ``INSTALLED_APPS`` just before ``'django.contrib.admin'``\n* run ``python manage.py migrate djangocms_admin_style``\n\n\nConfiguration\n-------------\n\nThe django CMS Admin Style overrides django admin's ``base_site.html``,\nbut you can still partially customize this page. Look at the source of\n``templates/admin/base_site.html`` and override the templates that are included\nin various blocks. For example, you can add your own CSS in\n``templates/admin/inc/extrastyle.html``.\n\nThe following additional settings can be set:\n\n* ``CMS_ENABLE_UPDATE_CHECK = True``\n  Set to ``False`` to disable the update notification.\n* ``CMS_UPDATE_CHECK_TYPE = ('minor')``\n  Set to ``('patch')`` to get only patch notifications.\n  (minor = 3.x.x, patch = 3.4.x)\n\nThe update checker does not gather or record any data.\n\nTo **compile CSS** run the following commands using **node 16**:\n\n* ``nvm use``\n* ``npm install``\n* ``npx gulp icons sass bundle``\n\n\nFor further options have a look at the ``gulpfile.js``.\n\nDark mode support\n-----------------\n\nDjango supports a dark mode admin since version 3.1. djangocms-admin-style\nintroduces css variables that contain color codes and change with the selected\nmode:\n\n+-------------------------------+-----------+---------------------------+-----------+\n| **CMS variable name**         | **Color** | **Django admin fallback** | **Color** |\n+-------------------------------+-----------+---------------------------+-----------+\n| ``--dca-white``               | #ffffff   | ``--body-bg``             | #ffffff   |\n+-------------------------------+-----------+---------------------------+-----------+\n| ``--dca-black``               | #000000   | ``--body-fg``             | #303030   |\n+-------------------------------+-----------+---------------------------+-----------+\n| ``--dca-gray``                | #666      | ``--body-quiet-color``    | #666      |\n+-------------------------------+-----------+---------------------------+-----------+\n| ``--dca-gray-lightest``       | #f2f2f2   | ``--darkened-bg``         | #f8f8f8   |\n+-------------------------------+-----------+---------------------------+-----------+\n| ``--dca-gray-lighter``        | #ddd      | ``--border-color``        | #ccc      |\n+-------------------------------+-----------+---------------------------+-----------+\n| ``--dca-gray-light``          | #999      | ``--close-button-bg``     | #888      |\n+-------------------------------+-----------+---------------------------+-----------+\n| ``--dca-gray-darker``         | #454545   |                           |           |\n+-------------------------------+-----------+---------------------------+-----------+\n| ``--dca-gray-darkest``        | #333      |                           |           |\n+-------------------------------+-----------+---------------------------+-----------+\n| ``--dca-gray-super-lightest`` | #f7f7f7   |                           |           |\n+-------------------------------+-----------+---------------------------+-----------+\n| ``--dca-primary``             | #00bbff   | ``--primary``             | #79aec8   |\n+-------------------------------+-----------+---------------------------+-----------+\n\n\nExtending styles in your own app\n---------------------------------\n\nIf your project or app requires specific styles if djangocms-admin-style is\ninstalled (e.g., to better adjust to the django CMS style) you can add selective\nstyling by adding the ``.djangocms-admin-style`` selector::\n\n    // Show widget in CMS colors if djangocms-admin-style is installed\n    .djangocms-admin-style #my-widget {\n        color:  var(--dca-primary, black);\n    }\n\nWe recommend to following rules for your app's admin css:\n\n- Try avoid using ``color``, ``background`` etc. styles where possible and meaningful\n- If necessary use as few as possible standard django CMS colors (preferably\n  from see above list with fallback colors)\n- Usage: ``var(--dca-color-var, var(--fallback-color-var, #xxxxxx))`` where\n  ``#xxxxxx`` represents the light version of the color.\n\nRunning Tests\n-------------\n\nYou can run tests by executing::\n\n    virtualenv env\n    source env/bin/activate\n    pip install -r tests/requirements/base.txt\n    python setup.py test\n\nIn order to run **integration tests** you need to have Docker installed,\nthen run the following command::\n\n    make test\n\nTo test other Django versions simply append `VERSION=4.1``. You can also\nrun the test server through::\n\n    make run\n\nThe integration tests are written using Casperjs, phantomcss and\ndjangocms-casper-helpers.\n\n\n.. |pypi| image:: https://badge.fury.io/py/djangocms-admin-style.svg\n    :target: http://badge.fury.io/py/djangocms-admin-style\n.. |build| image:: https://travis-ci.org/django-cms/djangocms-admin-style.svg?branch=master\n    :target: https://travis-ci.org/django-cms/djangocms-admin-style\n.. |coverage| image:: https://codecov.io/gh/django-cms/djangocms-admin-style/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/django-cms/djangocms-admin-style\n\n.. |python| image:: https://img.shields.io/badge/python-3.5+-blue.svg\n    :target: https://pypi.org/project/djangocms-admin-style/\n.. |django| image:: https://img.shields.io/badge/django-2.2%2B-blue.svg\n    :target: https://www.djangoproject.com/\n.. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.6%2B-blue.svg\n    :target: https://www.django-cms.org/\n.. |djangocms4| image:: https://img.shields.io/badge/django%20CMS-4-blue.svg\n    :target: https://www.django-cms.org/\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Adds pretty CSS styles for the django CMS admin interface.",
    "version": "3.3.1",
    "project_urls": {
        "Homepage": "https://github.com/django-cms/djangocms-admin-style"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a6f2e0ed0cf8036708f7b7a26a4586a27b5e53891cf8d965f1e4751bf4f50de3",
                "md5": "1da2aa3eb02d1acae373b101c4ab79c2",
                "sha256": "9b76aafda245205e0a88d57efd5097a96c1a7fcb78d7f3efa50955eb980079de"
            },
            "downloads": -1,
            "filename": "djangocms_admin_style-3.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1da2aa3eb02d1acae373b101c4ab79c2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 408789,
            "upload_time": "2024-02-29T22:12:42",
            "upload_time_iso_8601": "2024-02-29T22:12:42.557078Z",
            "url": "https://files.pythonhosted.org/packages/a6/f2/e0ed0cf8036708f7b7a26a4586a27b5e53891cf8d965f1e4751bf4f50de3/djangocms_admin_style-3.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c1e47b2d031c6d8f4ac5394b4b3dc863a8f21fd6d92aadf260ba1fc633b286f",
                "md5": "233b4baca409ced9f4c500709e4cce5e",
                "sha256": "da20de3831f1a1a74de33fe12bbd3865a0027a982878c02aa1d102b1c799d767"
            },
            "downloads": -1,
            "filename": "djangocms-admin-style-3.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "233b4baca409ced9f4c500709e4cce5e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 319126,
            "upload_time": "2024-02-29T22:12:45",
            "upload_time_iso_8601": "2024-02-29T22:12:45.167448Z",
            "url": "https://files.pythonhosted.org/packages/6c/1e/47b2d031c6d8f4ac5394b4b3dc863a8f21fd6d92aadf260ba1fc633b286f/djangocms-admin-style-3.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-29 22:12:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "django-cms",
    "github_project": "djangocms-admin-style",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "djangocms-admin-style"
}
        
Elapsed time: 0.24091s