Base templates for management interfaces
Go to file
Frédéric Péters 72f6f0b1b0
gitea/gadjo/pipeline/head This commit looks good Details
js: add data-close-button-text to give a label to the close button (#83616)
2023-11-24 09:11:41 +01:00
debian debian: apply new pre-commit-debian (#77727) 2023-05-27 21:40:23 +02:00
gadjo js: add data-close-button-text to give a label to the close button (#83616) 2023-11-24 09:11:41 +01:00
icons add lingo icon alias (#69021) 2022-09-13 14:11:51 +02:00
tests misc: apply double-quote-string-fixer (#79788) 2023-08-16 10:12:11 +02:00
.eslintrc.yml js: configure javascript linter (#75132) 2023-03-28 11:08:01 +02:00
.git-blame-ignore-revs misc: update git-blame-ignore-revs to ignore quote changes (#79788) 2023-08-16 10:12:11 +02:00
.gitignore widgets: add MultiSelectWidget (#75655) 2023-03-31 16:25:14 +02:00
.pre-commit-config.yaml misc: add pre commit hook to force single quotes (#79788) 2023-08-16 10:12:11 +02:00
AUTHORS initial commit with authors and license 2014-03-23 21:32:17 +01:00
COPYING initial commit with authors and license 2014-03-23 21:32:17 +01:00
Jenkinsfile ci: build deb package for bookworm (#78968) 2023-06-23 15:15:57 +02:00 distribute 2020-06-10 15:11:15 +02:00
README.txt misc: remove unused settings.CDNS (#64434) 2022-04-21 16:49:01 +02:00 trivial: apply pre-commit configuration 2022-06-17 20:08:13 +02:00
pylint.rc ci: run pre-commit & pylint 2022-06-17 20:08:13 +02:00 ci: run pre-commit & pylint 2022-06-17 20:08:13 +02:00
pytest.ini ci: introduce tests (#75681) 2023-05-07 17:50:15 +02:00 setup: compute pep440 compliant dirty version number (#81731) 2023-10-30 17:20:31 +01:00
tox.ini ci: keep on using pylint 2 while pylint-django is not ready (#81905) 2023-10-03 06:19:16 +02:00



Gadjo is a base template for Django applications, tailored for
management interfaces, built to provide a nice and modern look, while
using progressive enhancement and responsive designs to adapt to
different environments.


Make your application base template {% extends "gadjo/base.html" %}.

You should add gadjo.finders.XStaticFinder to STATICFILES_FINDERS,

  from django.conf import global_settings


Additional static files

Additional static files libraries can be added via INSTALLED_APPS,
for example 'xstatic.pkg.jquery_tablesorter'; its static files can
then be referred in a template using the xstatic template tag:

  {% xstatic 'jquery_tablesorter' 'jquery.tablesorter.js' %}

Progressive enhancement -- Dialogs

Links marked with rel="popup" will be opened into dialog boxes.

The dialog title is extracted from "#appbar h2" (this selector can be
changed with a @data-title-selector attribute on the anchor tag).

The dialog content is extracted from "form" (this selector can be
changed with a @data-selector attribute).

Buttons (both <button> and <a>) are extracted from the content and
converted into proper dialog buttons.  A button with "cancel" as its
class will have its action changed to simply close the dialog, without
server processing.

After loading the dialog content, a gadjo:dialog-loaded event is
triggered on the anchor with the dialog content as argument.

Alternatively the server may notice the ajax request and answer with
an appropriate JSON response. In that case it should have a 'content'
attribute with the HTML content, or a 'location' attribute in case of
a redirect.

In case of such a redirect, a gadjo:dialog-done event is triggered on
the anchor and can be cancelled to prevent the default redirect


Python, Javascript and CSS files are published under the GNU AFFERO GENERAL
PUBLIC LICENSE (see the COPYING file for the complete text).

gadjo/static/images/info-icon.png and icons/*.svg are derived work of icons
from gnome-icon-theme-symbolic, published under the Creative Commons
Attribution-Share Alike 3.0 United States License by the GNOME Project, see

gadjo/static/css/header-03.jpeg is copied from let's encrypt website, licensed
under Mozilla Public License Version 2.0, see their repository at

The querystring template tag is originally from django-tables2, copyright (c)
2011, Bradley Ayers, copyright (c) 2008, Michael Elsdörfer, published under
the MIT license.